Compare commits

...

25 Commits

Author SHA1 Message Date
jhc
6d0ff34680 修改 2025-02-22 15:44:16 +08:00
jhc
7ecadf2721 修改 2025-02-22 15:31:21 +08:00
d6dd566524 解决冲突 2025-02-22 15:10:59 +08:00
e3ca223dea 添加文件上传 2025-02-22 15:10:20 +08:00
ccb0a16dd5 Merge branch 'jng' into dev 2025-02-22 13:54:49 +08:00
35ff407466 修改redis 2025-02-22 13:54:40 +08:00
jhc
9d6661ae83 修改 2025-02-22 13:51:31 +08:00
jhc
4c3ff729d5 修改 2025-02-22 13:34:48 +08:00
jhc
22044cd3c6 修改 2025-02-22 13:32:46 +08:00
697cce5685 修改 2025-02-22 12:46:15 +08:00
jhc
be5549e1f6 修改文件 2025-02-22 12:04:49 +08:00
4e15ec6e76 Merge branch 'jng' into dev 2025-02-22 10:45:43 +08:00
81a84448cf add 2025-02-22 10:45:35 +08:00
98e8da4a76 Merge branch 'jng' into dev 2025-02-22 10:35:01 +08:00
d69d6237ad add clear.sh 2025-02-22 10:34:50 +08:00
005f9fd969 解决冲突 2025-02-22 10:31:07 +08:00
59dcdfa852 修改 2025-02-22 10:30:39 +08:00
jhc
d01b31e4ea 套餐 逻辑 首次提交 2025-02-21 21:09:29 +08:00
bf24293974 Merge branch 'jng' into dev 2025-02-21 17:49:20 +08:00
6808771732 修改 2025-02-21 17:49:13 +08:00
91913ed787 Merge branch 'jng' into dev 2025-02-21 17:05:34 +08:00
70348b930d 修改 2025-02-21 17:05:27 +08:00
e89ca81d7c 修改 2025-02-21 13:29:53 +08:00
bd21a4998c 更新 2025-02-21 13:29:17 +08:00
jhc
15808c58d9 套餐相关更新 2025-02-20 20:55:54 +08:00
51 changed files with 39775 additions and 2477 deletions

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@ service Account {
rpc Remove (RemoveRequest) returns (RemoveResponse) {}
rpc Update (UpdateRequest) returns (UpdateResponse) {}
rpc UsersByTel (UsersByTelRequest) returns (ListResponse) {}
rpc UserByTel (UserByTelRequest) returns (InfoResponse) {}
rpc UserByTel (UserByTelRequest) returns (UserInfoResponse) {}
rpc OnlySendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //
rpc OnlyCheckMsg (CheckMsgRequest) returns (SendMsgStatusResponse) {}//
rpc MailAccountByNickName(MailAccountByNickNameRequest) returns(MaiAccountResponse){} //
@ -58,6 +58,42 @@ service Account {
rpc Register (RegistRequest) returns (RegisterResponse) {}//
rpc UserList (UserListRequest) returns (UserListResponse) {}//
rpc CheckRealName (CheckRealNameRequest) returns (CheckRealNameResponse) {}//
rpc GenerateSliderCaptcha(GenerateSliderCaptchaRequest) returns (GenerateSliderCaptchaResponse) {}// +
rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}//
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} // --
}
message SendNationMsgRequest {
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
string TelNum = 2 [json_name = "telNum",(validator.field) = {string_not_empty: true,human_error: "70001"}];
string Project = 3 [json_name = "project"];
uint32 signNo = 4;
uint32 mId = 5;
string scope = 6;//
}
message VerifySliderCaptchaResponse {
string nonceStr = 1;
}
message VerifySliderCaptchaRequest {
string nonceStr = 1;
float blockX = 2;
}
message GenerateSliderCaptchaResponse {
string nonceStr = 1;
string canvasSrc = 2;
string blockSrc = 3;
uint64 blockY = 4;
uint64 faceY = 5;
uint64 blockX = 6;
}
message GenerateSliderCaptchaRequest {
uint64 canvasWidth = 1;
uint64 canvasHeight = 2;
uint64 blockWidth = 3;
uint64 blockHeight = 4;
uint64 blockRadius = 5;
uint64 place = 6;
}
message CheckRealNameResponse{
uint64 id =1;
@ -91,6 +127,7 @@ message UserListInfo{
string subNum = 14;
string notPassRemarks = 15;
string telNum = 16;
string telAreaCode = 17;
}
message UserListRequest{
string domain = 1;
@ -117,6 +154,7 @@ message UserInfoResponse{
string attachment = 11;
string subNum = 12;
string notPassRemarks = 13;
string domain = 14;
}
message RealNameResponse{
uint64 id = 1;
@ -355,11 +393,13 @@ message ListByIDsRequest {
message SendMsgRequest {
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
string TelNum = 2 [json_name = "telNum",(validator.field) = {regex: "^1\\d{10}$",human_error: "70002"}];
string TelNum = 2 [json_name = "telNum"];
//string TelNum = 2 [json_name = "telNum",(validator.field) = {regex: "^1\\d{10}$",human_error: "70002"}];
string Project = 3 [json_name = "project"];
uint32 signNo = 4;
uint32 mId = 5;
string scope = 6;//
string scope = 6; //
string zone = 7; //
}
message SendCustomMsgRequest {
@ -375,9 +415,10 @@ message SendCustomMsgRequest {
message CheckMsgRequest {
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
string TelNum = 2 [json_name = "telNum",(validator.field) = {regex: "^1\\d{10}$",human_error: "70002"}];
string TelNum = 2 [json_name = "telNum"];
string Code = 3 [json_name = "code",(validator.field) = {string_not_empty: true,human_error: "70003"} ];
string scope = 4;//
string zone = 5; //
}
message SendMsgStatusResponse {
@ -545,11 +586,12 @@ message RegistRequest {
message LoginRequest {
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
string TelNum = 2 [json_name = "telNum",(validator.field) = {regex: "^1\\d{10}$",human_error: "70002"}];
string TelNum = 2 [json_name = "telNum"];
string Code = 3 [json_name = "code"];
string Password = 4 [json_name = "password"];
string Ip = 5 [json_name = "ip"];
bool passCheckIp = 6 ;
string telAreaCode = 7;
}
message TokenInfo {

View File

@ -17,6 +17,27 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *SendNationMsgRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
if this.TelNum == "" {
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70001`))
}
return nil
}
func (this *VerifySliderCaptchaResponse) Validate() error {
return nil
}
func (this *VerifySliderCaptchaRequest) Validate() error {
return nil
}
func (this *GenerateSliderCaptchaResponse) Validate() error {
return nil
}
func (this *GenerateSliderCaptchaRequest) Validate() error {
return nil
}
func (this *CheckRealNameResponse) Validate() error {
return nil
}
@ -191,16 +212,10 @@ func (this *ListByIDsRequest) Validate() error {
}
return nil
}
var _regex_SendMsgRequest_TelNum = regexp.MustCompile(`^1\d{10}$`)
func (this *SendMsgRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
if !_regex_SendMsgRequest_TelNum.MatchString(this.TelNum) {
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`))
}
return nil
}
@ -215,16 +230,10 @@ func (this *SendCustomMsgRequest) Validate() error {
}
return nil
}
var _regex_CheckMsgRequest_TelNum = regexp.MustCompile(`^1\d{10}$`)
func (this *CheckMsgRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
if !_regex_CheckMsgRequest_TelNum.MatchString(this.TelNum) {
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`))
}
if this.Code == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Code", fmt.Errorf(`70003`))
}
@ -353,16 +362,10 @@ func (this *RequestStatus) Validate() error {
func (this *RegistRequest) Validate() error {
return nil
}
var _regex_LoginRequest_TelNum = regexp.MustCompile(`^1\d{10}$`)
func (this *LoginRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
if !_regex_LoginRequest_TelNum.MatchString(this.TelNum) {
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`))
}
return nil
}
func (this *TokenInfo) Validate() error {

View File

@ -53,7 +53,7 @@ type AccountClient interface {
Remove(ctx context.Context, in *RemoveRequest, opts ...grpc_go.CallOption) (*RemoveResponse, common.ErrorWithAttachment)
Update(ctx context.Context, in *UpdateRequest, opts ...grpc_go.CallOption) (*UpdateResponse, common.ErrorWithAttachment)
UsersByTel(ctx context.Context, in *UsersByTelRequest, opts ...grpc_go.CallOption) (*ListResponse, common.ErrorWithAttachment)
UserByTel(ctx context.Context, in *UserByTelRequest, opts ...grpc_go.CallOption) (*InfoResponse, common.ErrorWithAttachment)
UserByTel(ctx context.Context, in *UserByTelRequest, opts ...grpc_go.CallOption) (*UserInfoResponse, common.ErrorWithAttachment)
OnlySendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
OnlyCheckMsg(ctx context.Context, in *CheckMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
MailAccountByNickName(ctx context.Context, in *MailAccountByNickNameRequest, opts ...grpc_go.CallOption) (*MaiAccountResponse, common.ErrorWithAttachment)
@ -64,6 +64,9 @@ type AccountClient interface {
Register(ctx context.Context, in *RegistRequest, opts ...grpc_go.CallOption) (*RegisterResponse, common.ErrorWithAttachment)
UserList(ctx context.Context, in *UserListRequest, opts ...grpc_go.CallOption) (*UserListResponse, common.ErrorWithAttachment)
CheckRealName(ctx context.Context, in *CheckRealNameRequest, opts ...grpc_go.CallOption) (*CheckRealNameResponse, common.ErrorWithAttachment)
GenerateSliderCaptcha(ctx context.Context, in *GenerateSliderCaptchaRequest, opts ...grpc_go.CallOption) (*GenerateSliderCaptchaResponse, common.ErrorWithAttachment)
VerifySliderCaptcha(ctx context.Context, in *VerifySliderCaptchaRequest, opts ...grpc_go.CallOption) (*VerifySliderCaptchaResponse, common.ErrorWithAttachment)
SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
}
type accountClient struct {
@ -95,7 +98,7 @@ type AccountClientImpl struct {
Remove func(ctx context.Context, in *RemoveRequest) (*RemoveResponse, error)
Update func(ctx context.Context, in *UpdateRequest) (*UpdateResponse, error)
UsersByTel func(ctx context.Context, in *UsersByTelRequest) (*ListResponse, error)
UserByTel func(ctx context.Context, in *UserByTelRequest) (*InfoResponse, error)
UserByTel func(ctx context.Context, in *UserByTelRequest) (*UserInfoResponse, error)
OnlySendMsg func(ctx context.Context, in *SendMsgRequest) (*SendMsgStatusResponse, error)
OnlyCheckMsg func(ctx context.Context, in *CheckMsgRequest) (*SendMsgStatusResponse, error)
MailAccountByNickName func(ctx context.Context, in *MailAccountByNickNameRequest) (*MaiAccountResponse, error)
@ -106,6 +109,9 @@ type AccountClientImpl struct {
Register func(ctx context.Context, in *RegistRequest) (*RegisterResponse, error)
UserList func(ctx context.Context, in *UserListRequest) (*UserListResponse, error)
CheckRealName func(ctx context.Context, in *CheckRealNameRequest) (*CheckRealNameResponse, error)
GenerateSliderCaptcha func(ctx context.Context, in *GenerateSliderCaptchaRequest) (*GenerateSliderCaptchaResponse, error)
VerifySliderCaptcha func(ctx context.Context, in *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
SendNationMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
}
func (c *AccountClientImpl) GetDubboStub(cc *triple.TripleConn) AccountClient {
@ -264,8 +270,8 @@ func (c *accountClient) UsersByTel(ctx context.Context, in *UsersByTelRequest, o
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UsersByTel", in, out)
}
func (c *accountClient) UserByTel(ctx context.Context, in *UserByTelRequest, opts ...grpc_go.CallOption) (*InfoResponse, common.ErrorWithAttachment) {
out := new(InfoResponse)
func (c *accountClient) UserByTel(ctx context.Context, in *UserByTelRequest, opts ...grpc_go.CallOption) (*UserInfoResponse, common.ErrorWithAttachment) {
out := new(UserInfoResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UserByTel", in, out)
}
@ -330,6 +336,24 @@ func (c *accountClient) CheckRealName(ctx context.Context, in *CheckRealNameRequ
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CheckRealName", in, out)
}
func (c *accountClient) GenerateSliderCaptcha(ctx context.Context, in *GenerateSliderCaptchaRequest, opts ...grpc_go.CallOption) (*GenerateSliderCaptchaResponse, common.ErrorWithAttachment) {
out := new(GenerateSliderCaptchaResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GenerateSliderCaptcha", in, out)
}
func (c *accountClient) VerifySliderCaptcha(ctx context.Context, in *VerifySliderCaptchaRequest, opts ...grpc_go.CallOption) (*VerifySliderCaptchaResponse, common.ErrorWithAttachment) {
out := new(VerifySliderCaptchaResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/VerifySliderCaptcha", in, out)
}
func (c *accountClient) SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment) {
out := new(SendMsgStatusResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SendNationMsg", in, out)
}
// AccountServer is the server API for Account service.
// All implementations must embed UnimplementedAccountServer
// for forward compatibility
@ -359,7 +383,7 @@ type AccountServer interface {
Remove(context.Context, *RemoveRequest) (*RemoveResponse, error)
Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
UsersByTel(context.Context, *UsersByTelRequest) (*ListResponse, error)
UserByTel(context.Context, *UserByTelRequest) (*InfoResponse, error)
UserByTel(context.Context, *UserByTelRequest) (*UserInfoResponse, error)
OnlySendMsg(context.Context, *SendMsgRequest) (*SendMsgStatusResponse, error)
OnlyCheckMsg(context.Context, *CheckMsgRequest) (*SendMsgStatusResponse, error)
MailAccountByNickName(context.Context, *MailAccountByNickNameRequest) (*MaiAccountResponse, error)
@ -370,6 +394,9 @@ type AccountServer interface {
Register(context.Context, *RegistRequest) (*RegisterResponse, error)
UserList(context.Context, *UserListRequest) (*UserListResponse, error)
CheckRealName(context.Context, *CheckRealNameRequest) (*CheckRealNameResponse, error)
GenerateSliderCaptcha(context.Context, *GenerateSliderCaptchaRequest) (*GenerateSliderCaptchaResponse, error)
VerifySliderCaptcha(context.Context, *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
mustEmbedUnimplementedAccountServer()
}
@ -450,7 +477,7 @@ func (UnimplementedAccountServer) Update(context.Context, *UpdateRequest) (*Upda
func (UnimplementedAccountServer) UsersByTel(context.Context, *UsersByTelRequest) (*ListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UsersByTel not implemented")
}
func (UnimplementedAccountServer) UserByTel(context.Context, *UserByTelRequest) (*InfoResponse, error) {
func (UnimplementedAccountServer) UserByTel(context.Context, *UserByTelRequest) (*UserInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UserByTel not implemented")
}
func (UnimplementedAccountServer) OnlySendMsg(context.Context, *SendMsgRequest) (*SendMsgStatusResponse, error) {
@ -483,6 +510,15 @@ func (UnimplementedAccountServer) UserList(context.Context, *UserListRequest) (*
func (UnimplementedAccountServer) CheckRealName(context.Context, *CheckRealNameRequest) (*CheckRealNameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckRealName not implemented")
}
func (UnimplementedAccountServer) GenerateSliderCaptcha(context.Context, *GenerateSliderCaptchaRequest) (*GenerateSliderCaptchaResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenerateSliderCaptcha not implemented")
}
func (UnimplementedAccountServer) VerifySliderCaptcha(context.Context, *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VerifySliderCaptcha not implemented")
}
func (UnimplementedAccountServer) SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendNationMsg not implemented")
}
func (s *UnimplementedAccountServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
@ -1526,6 +1562,93 @@ func _Account_CheckRealName_Handler(srv interface{}, ctx context.Context, dec fu
return interceptor(ctx, in, info, handler)
}
func _Account_GenerateSliderCaptcha_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GenerateSliderCaptchaRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("GenerateSliderCaptcha", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _Account_VerifySliderCaptcha_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(VerifySliderCaptchaRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("VerifySliderCaptcha", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _Account_SendNationMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SendNationMsgRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("SendNationMsg", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
// Account_ServiceDesc is the grpc_go.ServiceDesc for Account service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -1673,6 +1796,18 @@ var Account_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "CheckRealName",
Handler: _Account_CheckRealName_Handler,
},
{
MethodName: "GenerateSliderCaptcha",
Handler: _Account_GenerateSliderCaptcha_Handler,
},
{
MethodName: "VerifySliderCaptcha",
Handler: _Account_VerifySliderCaptcha_Handler,
},
{
MethodName: "SendNationMsg",
Handler: _Account_SendNationMsg_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "api/account/account.proto",

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.32.0
// protoc v5.29.0--rc3
// protoc-gen-go v1.26.0
// protoc v3.10.1
// source: pb/bundle.proto
package bundle
@ -25,7 +25,8 @@ type CommonResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`
}
func (x *CommonResponse) Reset() {
@ -67,6 +68,13 @@ func (x *CommonResponse) GetMsg() string {
return ""
}
func (x *CommonResponse) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
type BundleProfile struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -472,7 +480,7 @@ type OrderRecord struct {
PayTime string `protobuf:"bytes,12,opt,name=payTime,proto3" json:"payTime,omitempty"`
CheckoutSessionId string `protobuf:"bytes,13,opt,name=checkoutSessionId,proto3" json:"checkoutSessionId,omitempty"`
CheckoutSessionUrl string `protobuf:"bytes,14,opt,name=checkoutSessionUrl,proto3" json:"checkoutSessionUrl,omitempty"`
Status string `protobuf:"bytes,15,opt,name=status,proto3" json:"status,omitempty"`
Status int64 `protobuf:"varint,15,opt,name=status,proto3" json:"status,omitempty"`
OrderNo string `protobuf:"bytes,16,opt,name=orderNo,proto3" json:"orderNo,omitempty"`
BundleName string `protobuf:"bytes,17,opt,name=bundleName,proto3" json:"bundleName,omitempty"`
}
@ -607,11 +615,11 @@ func (x *OrderRecord) GetCheckoutSessionUrl() string {
return ""
}
func (x *OrderRecord) GetStatus() string {
func (x *OrderRecord) GetStatus() int64 {
if x != nil {
return x.Status
}
return ""
return 0
}
func (x *OrderRecord) GetOrderNo() string {
@ -645,6 +653,7 @@ type OrderRecordsRequest struct {
EndSignedTime string `protobuf:"bytes,10,opt,name=endSignedTime,proto3" json:"endSignedTime,omitempty"`
StartPayTime string `protobuf:"bytes,11,opt,name=startPayTime,proto3" json:"startPayTime,omitempty"`
EndPayTime string `protobuf:"bytes,12,opt,name=endPayTime,proto3" json:"endPayTime,omitempty"`
CustomerID string `protobuf:"bytes,13,opt,name=customerID,proto3" json:"customerID,omitempty"`
}
func (x *OrderRecordsRequest) Reset() {
@ -763,6 +772,13 @@ func (x *OrderRecordsRequest) GetEndPayTime() string {
return ""
}
func (x *OrderRecordsRequest) GetCustomerID() string {
if x != nil {
return x.CustomerID
}
return ""
}
type OrderRecordsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -823,7 +839,8 @@ type OrderRecordsDetailRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
OrderNo string `protobuf:"bytes,2,opt,name=orderNo,proto3" json:"orderNo,omitempty"`
}
func (x *OrderRecordsDetailRequest) Reset() {
@ -865,6 +882,13 @@ func (x *OrderRecordsDetailRequest) GetUuid() string {
return ""
}
func (x *OrderRecordsDetailRequest) GetOrderNo() string {
if x != nil {
return x.OrderNo
}
return ""
}
type OrderRecordsDetailResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -924,168 +948,177 @@ var File_pb_bundle_proto protoreflect.FileDescriptor
var file_pb_bundle_proto_rawDesc = []byte{
0x0a, 0x0f, 0x70, 0x62, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x22, 0x0a, 0x0e, 0x43, 0x6f, 0x6d,
0x6f, 0x12, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x36, 0x0a, 0x0e, 0x43, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d,
0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xf9, 0x01,
0x0a, 0x0d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75,
0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a,
0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a,
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x26, 0x0a, 0x10, 0x44, 0x65, 0x6c,
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69,
0x64, 0x22, 0x71, 0x0a, 0x11, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61,
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x22, 0x5b, 0x0a, 0x12, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69,
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x75,
0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x75,
0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x22, 0x29, 0x0a, 0x13, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x14,
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75,
0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e,
0x64, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xa5, 0x04, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e,
0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62,
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a,
0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69,
0x64, 0x22, 0xf9, 0x01, 0x0a, 0x0d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70,
0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e,
0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e,
0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67,
0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x08,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12,
0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x26, 0x0a,
0x10, 0x44, 0x65, 0x6c, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x71, 0x0a, 0x11, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c,
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18,
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x5b, 0x0a, 0x12, 0x42, 0x75, 0x6e, 0x64,
0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f,
0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12,
0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x29, 0x0a, 0x13, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64,
0x22, 0x57, 0x0a, 0x14, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64,
0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52,
0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xa5, 0x04, 0x0a, 0x0b, 0x4f, 0x72,
0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a,
0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a,
0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a,
0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12,
0x22, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e,
0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20,
0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61,
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73,
0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12,
0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a,
0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a,
0x07, 0x70, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
0x70, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x54, 0x69,
0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x68,
0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
0x2e, 0x0a, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x68, 0x65,
0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12,
0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72,
0x4e, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e,
0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d,
0x65, 0x22, 0xb1, 0x03, 0x0a, 0x13, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a,
0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x63,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52,
0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x43,
0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73,
0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73,
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67,
0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73,
0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79,
0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x79, 0x54,
0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a,
0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f,
0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x63,
0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72,
0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75,
0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x10,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x1e, 0x0a,
0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x91, 0x03,
0x0a, 0x13, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67,
0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67,
0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74,
0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x62,
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x55, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x55, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72,
0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a,
0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a,
0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65,
0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x69, 0x67,
0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x53, 0x69,
0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x65, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a,
0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18,
0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d,
0x65, 0x22, 0x65, 0x0a, 0x14, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x6f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x2f, 0x0a, 0x19, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x65, 0x0a, 0x1a, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72,
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62,
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x52, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67,
0x32, 0x9c, 0x05, 0x0a, 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x62, 0x75,
0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0c,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x62,
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a,
0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, 0x2e,
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x45, 0x0a, 0x0a, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12,
0x19, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c,
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x75, 0x6e,
0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x42, 0x75, 0x6e, 0x64,
0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1b, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42,
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x13, 0x2e, 0x62, 0x75,
0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x12, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73,
0x12, 0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x4f, 0x0a, 0x10, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x4c,
0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1c, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x5d, 0x0a, 0x12, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73,
0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x55, 0x49, 0x44, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x55, 0x49, 0x44, 0x12,
0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d,
0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64,
0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x72,
0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65,
0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d,
0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61,
0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x54,
0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x64, 0x50, 0x61,
0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
0x72, 0x49, 0x44, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x65, 0x72, 0x49, 0x44, 0x22, 0x65, 0x0a, 0x14, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a,
0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x49, 0x0a, 0x19,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61,
0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x75, 0x6e, 0x64,
0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a,
0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x22, 0x65, 0x0a, 0x1a, 0x4f, 0x72, 0x64, 0x65, 0x72,
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x75, 0x6e,
0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52,
0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03,
0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0xe7,
0x05, 0x0a, 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x62, 0x75, 0x6e, 0x64,
0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0c, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x62, 0x75, 0x6e,
0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0c, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, 0x2e, 0x62, 0x75,
0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x45, 0x0a, 0x0a, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x2e,
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65,
0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1b, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e,
0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x1a, 0x16, 0x2e,
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x13, 0x2e, 0x62,
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x1a, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x42, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64,
0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x1a, 0x16,
0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x10, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x62,
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x75, 0x6e, 0x64,
0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x12, 0x4f, 0x72, 0x64,
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12,
0x21, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x75,
0x6e, 0x64, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1125,21 +1158,23 @@ var file_pb_bundle_proto_depIdxs = []int32{
2, // 6: bundle.Bundle.DeleteBundle:input_type -> bundle.DelBundleRequest
3, // 7: bundle.Bundle.BundleList:input_type -> bundle.BundleListRequest
5, // 8: bundle.Bundle.BundleDetail:input_type -> bundle.BundleDetailRequest
7, // 9: bundle.Bundle.CreateOrderRecords:input_type -> bundle.OrderRecord
7, // 10: bundle.Bundle.UpdateOrderRecords:input_type -> bundle.OrderRecord
8, // 11: bundle.Bundle.OrderRecordsList:input_type -> bundle.OrderRecordsRequest
10, // 12: bundle.Bundle.OrderRecordsDetail:input_type -> bundle.OrderRecordsDetailRequest
0, // 13: bundle.Bundle.CreateBundle:output_type -> bundle.CommonResponse
0, // 14: bundle.Bundle.UpdateBundle:output_type -> bundle.CommonResponse
0, // 15: bundle.Bundle.DeleteBundle:output_type -> bundle.CommonResponse
4, // 16: bundle.Bundle.BundleList:output_type -> bundle.BundleListResponse
6, // 17: bundle.Bundle.BundleDetail:output_type -> bundle.BundleDetailResponse
0, // 18: bundle.Bundle.CreateOrderRecords:output_type -> bundle.CommonResponse
0, // 19: bundle.Bundle.UpdateOrderRecords:output_type -> bundle.CommonResponse
9, // 20: bundle.Bundle.OrderRecordsList:output_type -> bundle.OrderRecordsResponse
11, // 21: bundle.Bundle.OrderRecordsDetail:output_type -> bundle.OrderRecordsDetailResponse
13, // [13:22] is the sub-list for method output_type
4, // [4:13] is the sub-list for method input_type
7, // 9: bundle.Bundle.CreateOrderRecord:input_type -> bundle.OrderRecord
7, // 10: bundle.Bundle.UpdateOrderRecord:input_type -> bundle.OrderRecord
7, // 11: bundle.Bundle.UpdateOrderRecordByOrderNo:input_type -> bundle.OrderRecord
8, // 12: bundle.Bundle.OrderRecordsList:input_type -> bundle.OrderRecordsRequest
10, // 13: bundle.Bundle.OrderRecordsDetail:input_type -> bundle.OrderRecordsDetailRequest
0, // 14: bundle.Bundle.CreateBundle:output_type -> bundle.CommonResponse
0, // 15: bundle.Bundle.UpdateBundle:output_type -> bundle.CommonResponse
0, // 16: bundle.Bundle.DeleteBundle:output_type -> bundle.CommonResponse
4, // 17: bundle.Bundle.BundleList:output_type -> bundle.BundleListResponse
6, // 18: bundle.Bundle.BundleDetail:output_type -> bundle.BundleDetailResponse
0, // 19: bundle.Bundle.CreateOrderRecord:output_type -> bundle.CommonResponse
0, // 20: bundle.Bundle.UpdateOrderRecord:output_type -> bundle.CommonResponse
0, // 21: bundle.Bundle.UpdateOrderRecordByOrderNo:output_type -> bundle.CommonResponse
9, // 22: bundle.Bundle.OrderRecordsList:output_type -> bundle.OrderRecordsResponse
11, // 23: bundle.Bundle.OrderRecordsDetail:output_type -> bundle.OrderRecordsDetailResponse
14, // [14:24] is the sub-list for method output_type
4, // [4:14] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name

View File

@ -11,8 +11,9 @@ service Bundle {
rpc BundleList(BundleListRequest) returns (BundleListResponse) {}
rpc BundleDetail(BundleDetailRequest) returns (BundleDetailResponse) {}
rpc CreateOrderRecords(OrderRecord) returns (CommonResponse) {}
rpc UpdateOrderRecords(OrderRecord) returns (CommonResponse) {}
rpc CreateOrderRecord(OrderRecord) returns (CommonResponse) {}
rpc UpdateOrderRecord(OrderRecord) returns (CommonResponse) {}
rpc UpdateOrderRecordByOrderNo(OrderRecord) returns (CommonResponse) {}
rpc OrderRecordsList(OrderRecordsRequest) returns (OrderRecordsResponse) {}
rpc OrderRecordsDetail(OrderRecordsDetailRequest) returns (OrderRecordsDetailResponse) {}
@ -20,6 +21,7 @@ service Bundle {
message CommonResponse {
string msg = 1 [json_name = "msg"];
string uuid = 2 [json_name = "uuid"];
}
message BundleProfile {
@ -74,7 +76,7 @@ message OrderRecord {
string payTime = 12 [json_name = "payTime"];
string checkoutSessionId = 13 [json_name = "checkoutSessionId"];
string checkoutSessionUrl = 14 [json_name = "checkoutSessionUrl"];
string status = 15 [json_name = "status"];
int64 status = 15 [json_name = "status"];
string orderNo = 16 [json_name = "orderNo"];
string bundleName = 17 [json_name = "bundleName"];
}
@ -92,6 +94,7 @@ message OrderRecordsRequest {
string endSignedTime = 10 [json_name = "endSignedTime"];
string startPayTime = 11 [json_name = "startPayTime"];
string endPayTime = 12 [json_name = "endPayTime"];
string customerID = 13 [json_name = "customerID"];
}
message OrderRecordsResponse {
@ -101,6 +104,7 @@ message OrderRecordsResponse {
message OrderRecordsDetailRequest {
string uuid = 1 [json_name = "uuid"];
string orderNo = 2 [json_name = "orderNo"];
}
message OrderRecordsDetailResponse {

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v5.29.0--rc3
// - protoc-gen-go-triple v1.0.8
// - protoc v3.10.1
// source: pb/bundle.proto
package bundle
@ -33,8 +33,9 @@ type BundleClient interface {
DeleteBundle(ctx context.Context, in *DelBundleRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
BundleList(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
BundleDetail(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponse, common.ErrorWithAttachment)
CreateOrderRecords(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
UpdateOrderRecords(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
CreateOrderRecord(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
UpdateOrderRecord(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
UpdateOrderRecordByOrderNo(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
OrderRecordsList(ctx context.Context, in *OrderRecordsRequest, opts ...grpc_go.CallOption) (*OrderRecordsResponse, common.ErrorWithAttachment)
OrderRecordsDetail(ctx context.Context, in *OrderRecordsDetailRequest, opts ...grpc_go.CallOption) (*OrderRecordsDetailResponse, common.ErrorWithAttachment)
}
@ -44,15 +45,16 @@ type bundleClient struct {
}
type BundleClientImpl struct {
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
CreateOrderRecords func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
UpdateOrderRecords func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
CreateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
UpdateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
}
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
@ -97,16 +99,22 @@ func (c *bundleClient) BundleDetail(ctx context.Context, in *BundleDetailRequest
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleDetail", in, out)
}
func (c *bundleClient) CreateOrderRecords(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
func (c *bundleClient) CreateOrderRecord(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateOrderRecords", in, out)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateOrderRecord", in, out)
}
func (c *bundleClient) UpdateOrderRecords(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
func (c *bundleClient) UpdateOrderRecord(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateOrderRecords", in, out)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateOrderRecord", in, out)
}
func (c *bundleClient) UpdateOrderRecordByOrderNo(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateOrderRecordByOrderNo", in, out)
}
func (c *bundleClient) OrderRecordsList(ctx context.Context, in *OrderRecordsRequest, opts ...grpc_go.CallOption) (*OrderRecordsResponse, common.ErrorWithAttachment) {
@ -130,8 +138,9 @@ type BundleServer interface {
DeleteBundle(context.Context, *DelBundleRequest) (*CommonResponse, error)
BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error)
BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error)
CreateOrderRecords(context.Context, *OrderRecord) (*CommonResponse, error)
UpdateOrderRecords(context.Context, *OrderRecord) (*CommonResponse, error)
CreateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error)
UpdateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error)
UpdateOrderRecordByOrderNo(context.Context, *OrderRecord) (*CommonResponse, error)
OrderRecordsList(context.Context, *OrderRecordsRequest) (*OrderRecordsResponse, error)
OrderRecordsDetail(context.Context, *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
mustEmbedUnimplementedBundleServer()
@ -157,11 +166,14 @@ func (UnimplementedBundleServer) BundleList(context.Context, *BundleListRequest)
func (UnimplementedBundleServer) BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BundleDetail not implemented")
}
func (UnimplementedBundleServer) CreateOrderRecords(context.Context, *OrderRecord) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateOrderRecords not implemented")
func (UnimplementedBundleServer) CreateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateOrderRecord not implemented")
}
func (UnimplementedBundleServer) UpdateOrderRecords(context.Context, *OrderRecord) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateOrderRecords not implemented")
func (UnimplementedBundleServer) UpdateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateOrderRecord not implemented")
}
func (UnimplementedBundleServer) UpdateOrderRecordByOrderNo(context.Context, *OrderRecord) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateOrderRecordByOrderNo not implemented")
}
func (UnimplementedBundleServer) OrderRecordsList(context.Context, *OrderRecordsRequest) (*OrderRecordsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method OrderRecordsList not implemented")
@ -342,7 +354,7 @@ func _Bundle_BundleDetail_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
func _Bundle_CreateOrderRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
func _Bundle_CreateOrderRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(OrderRecord)
if err := dec(in); err != nil {
return nil, err
@ -355,7 +367,7 @@ func _Bundle_CreateOrderRecords_Handler(srv interface{}, ctx context.Context, de
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("CreateOrderRecords", args, invAttachment)
invo := invocation.NewRPCInvocation("CreateOrderRecord", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
@ -371,7 +383,7 @@ func _Bundle_CreateOrderRecords_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
func _Bundle_UpdateOrderRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
func _Bundle_UpdateOrderRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(OrderRecord)
if err := dec(in); err != nil {
return nil, err
@ -384,7 +396,36 @@ func _Bundle_UpdateOrderRecords_Handler(srv interface{}, ctx context.Context, de
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("UpdateOrderRecords", args, invAttachment)
invo := invocation.NewRPCInvocation("UpdateOrderRecord", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _Bundle_UpdateOrderRecordByOrderNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(OrderRecord)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("UpdateOrderRecordByOrderNo", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
@ -486,12 +527,16 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
Handler: _Bundle_BundleDetail_Handler,
},
{
MethodName: "CreateOrderRecords",
Handler: _Bundle_CreateOrderRecords_Handler,
MethodName: "CreateOrderRecord",
Handler: _Bundle_CreateOrderRecord_Handler,
},
{
MethodName: "UpdateOrderRecords",
Handler: _Bundle_UpdateOrderRecords_Handler,
MethodName: "UpdateOrderRecord",
Handler: _Bundle_UpdateOrderRecord_Handler,
},
{
MethodName: "UpdateOrderRecordByOrderNo",
Handler: _Bundle_UpdateOrderRecordByOrderNo_Handler,
},
{
MethodName: "OrderRecordsList",

25636
api/order/order.pb.go Normal file

File diff suppressed because it is too large Load Diff

2107
api/order/order.proto Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5976
api/order/order_triple.pb.go Normal file

File diff suppressed because it is too large Load Diff

3
clear.sh Normal file
View File

@ -0,0 +1,3 @@
ls api/account/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
ls api/bundle/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
ls api/order/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';

View File

@ -20,8 +20,6 @@ package main
import (
"fmt"
"fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/cache"
"fonchain-fiee/pkg/common/gpt"
"fonchain-fiee/pkg/router"
)
@ -45,16 +43,16 @@ func bootstrap() (err error) {
fmt.Println(configEnv)
fmt.Println(config.AppConfig)
//redis
redisConfig := cache.RedisConfig{
RedisDB: configEnv.Redis.RedisDB,
RedisAddr: configEnv.Redis.RedisAddr,
RedisPw: configEnv.Redis.RedisPW,
RedisDbName: configEnv.Redis.RedisDBNAme,
}
cache.LoadRedis(redisConfig)
gpt.InitSet(configEnv.Ai.Host, configEnv.Ai.TelNum, configEnv.Ai.Password)
////redis
//redisConfig := cache.RedisConfig{
// RedisDB: configEnv.Redis.RedisDB,
// RedisAddr: configEnv.Redis.RedisAddr,
// RedisPw: configEnv.Redis.RedisPW,
// RedisDbName: configEnv.Redis.RedisDBNAme,
//}
//
//cache.LoadRedis(redisConfig)
//
//gpt.InitSet(configEnv.Ai.Host, configEnv.Ai.TelNum, configEnv.Ai.Password)
return nil
}

View File

@ -114,7 +114,14 @@ type System struct {
Host string
RedirectUri string
}
type Oss struct {
AccessKeyId string
AccessKeySecret string
Endpoint string
BucketName string
BaseDir string
CdnHost string
}
type Mobile struct {
SK string
AK string
@ -133,6 +140,7 @@ type Config struct {
System System `toml:"system"`
Mobile Mobile `toml:"mobile"`
Ai Ai `toml:"ai"`
Oss Oss `toml:"oss"`
}
/********start-配置信息*********/
@ -171,7 +179,7 @@ func LoadEnvFromFileInfo(data string) (*Config, error) {
return AppConfig, nil
}
func GetOptions() {
func GetOptions1() {
iniConf, err := common.GetConf()
if err != nil {
panic("iniConf error")

View File

@ -8,11 +8,18 @@ RedirectUri = "/api/redirect/url"
[bos]
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
Sk = "d2ecaa9d75114d3b9f42b99014198306"
BucketName = "dci-file-new"
BucketName = "dci-file-new"
BosUrl = ".bj.bcebos.com"
BosBaseDir = "fonchain-main"
BosHttp = "https://"
BosDomain = "cdns.fontree.cn"
[oss]
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
BucketName = "fontree-test"
BaseDir = "fonchain-main"
CdnHost = "https://cdn-test.szjixun.cn"
[redis]
RedisDB = "1"
RedisAddr = "127.0.0.1:6379"

View File

@ -9,8 +9,12 @@ dubbo:
AccountClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.common.account
interface: com.fontree.microservices.common.micro.account
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
# params:
# .accessKeyId: "Accountksl"
# .secretAccessKey: "BSDY-FDF1-Fontree_account"
# .secretAccessKey: "BSDY-FDF1-Fontree_account"
BundleClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java

1
data/init.go Normal file
View File

@ -0,0 +1 @@
package data

45
docs/dev/conf.ini Normal file
View File

@ -0,0 +1,45 @@
[system]
Domain = "artistinfo"
AppMode = "debug"
HttpPort = ":8085"
Host = "https://common.szjixun.cn"
RedirectUri = "/api/redirect/url"
[bos]
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
Sk = "d2ecaa9d75114d3b9f42b99014198306"
BucketName = "dci-file-new"
BosUrl = ".bj.bcebos.com"
BosBaseDir = "fonchain-main"
BosHttp = "https://"
BosDomain = "cdns.fontree.cn"
[oss]
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
BucketName = "fontree-test"
BaseDir = "fonchain-main"
CdnHost = "https://cdn-test.szjixun.cn"
[redis]
RedisDB = "1"
RedisAddr = "172.16.100.114:6379"
RedisPW = "kP6tW4tS3qB2dW4aE6uI5cX2"
RedisDBNAme = "1"
[ai]
Host = "https://erpapi.fontree.cn"
TelNum = "18021272627"
Password = "Gy.123456"
[stripe]
Webhookkey = "we_1QuursAB1Vm8VfJquKmHQSVg"
[oss]
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
BucketName = "fontree-test"
BaseDir = "fiee"
CdnHost = "https://cdn-test.szjixun.cn"

29
docs/dev/dubbogo.yaml Normal file
View File

@ -0,0 +1,29 @@
dubbo:
registries:
demoZK:
protocol: zookeeper
timeout: 3s
# address: 121.229.45.214:9004
address: 172.16.100.93:2181
# address: 127.0.0.1:2181
# address: 114.218.158.24:2181
consumer:
filter: tracing
request-timeout: 30s
references:
OrderClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.common.order # must be compatible with grpc or dubbo-java
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
params:
.accessKeyId: "SYD8-order-04"
.secretAccessKey: "Al-order-FDF112"
BundleClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
AccountClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.common.micro.account

View File

@ -22,4 +22,12 @@ RedisDBNAme = "1"
[ai]
Host = "https://erpapi.fontree.cn"
TelNum = "18021272627"
Password = "Gy.123456"
Password = "Gy.123456"
[oss]
AccessKeyId = "LTAI5tHfjSmWXHqfWgaL7Uo5"
AccessKeySecret = "kOPctFZ3DHsbdSSym1fLyDK39hkzPI"
Endpoint = "oss-cn-hangzhou-internal.aliyuncs.com"
BucketName = "erp-k8s-store"
BaseDir = "fiee"
CdnHost = "https://e-cdn.fontree.cn"

29
docs/prod/dubbogo.yaml Normal file
View File

@ -0,0 +1,29 @@
dubbo:
registries:
demoZK:
protocol: zookeeper
timeout: 3s
# address: 121.229.45.214:9004
address: 127.0.0.1:2181
# address: 114.218.158.24:2181
consumer:
filter: tracing
request-timeout: 30s
references:
OrderClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.common.order # must be compatible with grpc or dubbo-java
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
params:
.accessKeyId: "SYD8-order-04"
.secretAccessKey: "Al-order-FDF112"
BundleClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
AccountClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.common.micro.account

8
docs/test/dubbogo.yaml Normal file
View File

@ -0,0 +1,8 @@
dubbo:
registries:
demoZK:
protocol: zookeeper
timeout: 3s
# address: 121.229.45.214:9004
address: 127.0.0.1:2181
# address: 114.218.158.24:2181

55
go.mod
View File

@ -2,29 +2,22 @@ module fonchain-fiee
go 1.18
replace (
//github.com/fonchain_enterprise/utils/aes => ./docs/utils/aes
//github.com/fonchain_enterprise/utils/chain => ./docs/utils/chain
//github.com/fonchain_enterprise/utils/jwt => ./docs/utils/jwt
//github.com/fonchain_enterprise/utils/logger => ./docs/utils/logger
//github.com/fonchain_enterprise/utils/rand => ./docs/utils/rand
//github.com/fonchain_enterprise/utils/aes => ./docs/utils/aes
//github.com/fonchain_enterprise/utils/chain => ./docs/utils/chain
//github.com/fonchain_enterprise/utils/jwt => ./docs/utils/jwt
//github.com/fonchain_enterprise/utils/logger => ./docs/utils/logger
//github.com/fonchain_enterprise/utils/rand => ./docs/utils/rand
github.com/fonchain/electronic-contract => ../../electronic-contract
github.com/fonchain_enterprise/utils/aes => ../utils/aes
github.com/fonchain_enterprise/utils/baidu => ../utils/baidu
github.com/fonchain_enterprise/utils/bankQuery => ../utils/bankQuery
github.com/fonchain_enterprise/utils/chain => ../utils/chain
github.com/fonchain_enterprise/utils/feie => ../utils/feie
github.com/fonchain_enterprise/utils/ipAddrQuery => ../utils/ipAddrQuery
github.com/fonchain_enterprise/utils/jwt => ../utils/jwt
github.com/fonchain_enterprise/utils/logger => ../utils/logger
github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
github.com/fonchain_enterprise/utils/ocr => ../utils/ocr
github.com/fonchain_enterprise/utils/pay => ../utils/pay
github.com/fonchain_enterprise/utils/rand => ../utils/rand
github.com/fonchain_enterprise/utils/utils => ../utils/utils
)
//github.com/fonchain/electronic-contract => ../../electronic-contract
//github.com/fonchain_enterprise/utils/aes => ../utils/aes
//github.com/fonchain_enterprise/utils/baidu => ../utils/baidu
//github.com/fonchain_enterprise/utils/bankQuery => ../utils/bankQuery
//github.com/fonchain_enterprise/utils/chain => ../utils/chain
//github.com/fonchain_enterprise/utils/feie => ../utils/feie
//github.com/fonchain_enterprise/utils/ipAddrQuery => ../utils/ipAddrQuery
//github.com/fonchain_enterprise/utils/jwt => ../utils/jwt
//github.com/fonchain_enterprise/utils/logger => ../utils/logger
replace github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-/utils/objstorage
require (
dubbo.apache.org/dubbo-go/v3 v3.0.2
@ -34,10 +27,10 @@ require (
//github.com/fonchain_enterprise/utils/logger v0.0.0-00010101000000-000000000000
github.com/gin-contrib/gzip v0.0.5
github.com/gin-gonic/gin v1.9.1
github.com/golang/protobuf v1.5.2
github.com/golang/protobuf v1.5.4
github.com/mwitkow/go-proto-validators v0.3.2
github.com/pkg/errors v0.9.1 // indirect
google.golang.org/protobuf v1.31.0
google.golang.org/protobuf v1.33.0
gopkg.in/ini.v1 v1.67.0
)
@ -94,7 +87,7 @@ require (
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/statsd_exporter v0.21.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
github.com/shirou/gopsutil v3.20.11+incompatible // indirect
github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
@ -102,7 +95,7 @@ require (
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.21.0 // indirect
go.uber.org/zap v1.21.0
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.18.0 // indirect
@ -115,10 +108,16 @@ require (
require (
github.com/BurntSushi/toml v1.2.1
github.com/disintegration/imaging v1.6.2
github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000
github.com/gin-contrib/pprof v1.4.0
github.com/go-redis/redis v6.15.9+incompatible
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
github.com/signintech/gopdf v0.29.2
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/spf13/viper v1.7.1
github.com/u2takey/ffmpeg-go v0.5.0
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8
)
require (
@ -126,6 +125,8 @@ require (
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect
github.com/alibaba/sentinel-golang v1.0.4 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect
github.com/aws/aws-sdk-go v1.38.20 // indirect
github.com/baidubce/bce-sdk-go v0.9.123 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.2.1 // indirect
@ -162,6 +163,7 @@ require (
github.com/nxadm/tail v1.4.11 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.18.1 // indirect
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 // indirect
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
github.com/polarismesh/polaris-go v1.1.0 // indirect
github.com/shirou/gopsutil/v3 v3.21.6 // indirect
@ -176,6 +178,7 @@ require (
github.com/tklauser/go-sysconf v0.3.6 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/u2takey/go-utils v0.3.1 // indirect
github.com/zouyx/agollo/v3 v3.4.5 // indirect
go.etcd.io/etcd/api/v3 v3.5.4 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.4 // indirect

32
go.sum
View File

@ -69,6 +69,7 @@ github.com/alibaba/sentinel-golang v1.0.4 h1:i0wtMvNVdy7vM4DdzYrlC4r/Mpk1OKUUBur
github.com/alibaba/sentinel-golang v1.0.4/go.mod h1:Lag5rIYyJiPOylK8Kku2P+a23gdKMMqzQS7wTnjWEpk=
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 h1:zOVTBdCKFd9JbCKz9/nt+FovbjPFmb7mUnp8nH9fQBA=
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk=
github.com/aliyun/aliyun-oss-go-sdk v2.2.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible h1:KXeJoM1wo9I/6xPTyt6qCxoSZnmASiAjlrr0dyTUKt8=
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
@ -88,6 +89,8 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.38.20 h1:QbzNx/tdfATbdKfubBpkt84OM6oBkxQZRw6+bW2GyeA=
github.com/aws/aws-sdk-go v1.38.20/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw=
@ -99,6 +102,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72H
github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk=
github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g=
github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/baidubce/bce-sdk-go v0.9.123 h1:3VvDG9o8cNRUmzFfT7OSeYcHEkl+Kg4Bn4SsfAuM+/I=
github.com/baidubce/bce-sdk-go v0.9.123/go.mod h1:zbYJMQwE4IZuyrJiFO8tO8NbtYiKTFTbwh4eIsqjVdg=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@ -174,6 +179,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 h1:XoR8SSVziXe698dt4uZYDfsmHpKLemqAgFyndQsq5Kw=
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
@ -263,6 +270,7 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
@ -343,8 +351,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
@ -655,6 +664,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
github.com/panjf2000/ants/v2 v2.4.2/go.mod h1:f6F0NZVFsGCp5A7QW/Zj/m92atWwOkY0OIhFxRNFr4A=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
@ -665,6 +675,8 @@ github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZO
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 h1:zyWXQ6vu27ETMpYsEMAsisQ+GqJ4e1TPvSNfdOPF0no=
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI=
@ -738,6 +750,8 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc=
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
@ -750,6 +764,8 @@ github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMT
github.com/shirou/gopsutil/v3 v3.21.6 h1:vU7jrp1Ic/2sHB7w6UNs7MIkn7ebVtTb5D9j45o9VYE=
github.com/shirou/gopsutil/v3 v3.21.6/go.mod h1:JfVbDpIBLVzT8oKbvMg9P3wEIMDDpVn+LwHTKj0ST88=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/signintech/gopdf v0.29.2 h1:ksvYuHNwEBP8Mi/4q5MN1ZdW9OpMbWn3pEn3ewiWoSc=
github.com/signintech/gopdf v0.29.2/go.mod h1:d23eO35GpEliSrF22eJ4bsM3wVeQJTjXTHq5x5qGKjA=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
@ -826,6 +842,10 @@ github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3/go.mod h1:QDlp
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/u2takey/ffmpeg-go v0.5.0 h1:r7d86XuL7uLWJ5mzSeQ03uvjfIhiJYvsRAJFCW4uklU=
github.com/u2takey/ffmpeg-go v0.5.0/go.mod h1:ruZWkvC1FEiUNjmROowOAps3ZcWxEiOpFoHCvk97kGc=
github.com/u2takey/go-utils v0.3.1 h1:TaQTgmEZZeDHQFYfd+AdUT1cT4QJgJn/XVPELhHw4ys=
github.com/u2takey/go-utils v0.3.1/go.mod h1:6e+v5vEZ/6gu12w/DC2ixZdZtCrNokVxD0JUklcqdCs=
github.com/uber/jaeger-client-go v2.29.1+incompatible h1:R9ec3zO3sGpzs0abd43Y+fBZRJ9uiH6lXyR/+u6brW4=
github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg=
@ -909,6 +929,7 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
gocv.io/x/gocv v0.25.0/go.mod h1:Rar2PS6DV+T4FL+PM535EImD/h13hGVaHhnCu1xarBs=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
@ -943,6 +964,8 @@ golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8H
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 h1:hVwzHzIUGRjiF7EcUjqNxk3NCfkPxbDKRdnNE1Rpg0U=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@ -1080,6 +1103,7 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -1130,6 +1154,7 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@ -1304,8 +1329,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@ -1335,6 +1360,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=

9
pkg/common/msg.go Normal file
View File

@ -0,0 +1,9 @@
package common
// upload
const (
ERROR_OPEN_FILE = "打开文件错误"
ErrorImgExt = "图片格式错误"
ErrorImgDecode = "图片解析错误"
ERROR_ROTATE_IMG = "旋转图片出错"
)

View File

@ -100,6 +100,8 @@ var (
// 审批 es index
ApprovalIndex string
Webhookkey string
)
var ConfigData = new(AppConfig)
@ -234,6 +236,8 @@ func LoadServer(file *ini.File) {
// 审批 es index
ApprovalIndex = file.Section("es").Key("ApprovalIndex").String()
Webhookkey = file.Section("stripe").Key("Webhookkey").String()
}
func Viper(iniConf string) (err error) {

View File

@ -29,6 +29,8 @@ const (
Ok = 0
BindError = 2
JsonUnmarshal = 3
ErrorHttp = 5
ErrorBody = 6
NotLogin = 401
SUCCESS = 200
UpdatePasswordSuccess = 201

View File

@ -30,7 +30,7 @@ const (
Status_Out_House //已出库
Status_Not_Pay //未付款
)
const ZoneCn = "86"
const (
DateNormalFormat = "2006-01-02 15:04:05"
DateNormalYMDFormat = "2006-01-02"
@ -46,6 +46,8 @@ var MsgFlags = map[int]string{
InvalidParams: "请求参数错误",
BindError: "参数绑定错误,类型不一致",
JsonUnmarshal: "Json解析错误",
ErrorHttp: "请求错误",
ErrorBody: "响应错误",
ErrorExistNick: "已存在该昵称",
ErrorExistUser: "已存在该用户名",

58
pkg/logic/baidu.go Normal file
View File

@ -0,0 +1,58 @@
package logic
import (
"dubbo.apache.org/dubbo-go/v3/common/logger"
"encoding/json"
"errors"
"fmt"
"fonchain-fiee/pkg/model"
"fonchain-fiee/pkg/utils"
"time"
)
const (
grantType = "client_credentials"
clientId = "SjscdLEybzyxiV7lXKA5iSvZ"
clientSecret = "22fCduMdCarO6WWOi4WiSmt9rIeez3FW"
)
var accessToken string
var expiresIn uint64
func GetImageAccessToken() (string, error) {
var (
resObj model.BaiduAccessToken
err error
// daoAccessToken entity.AccessToken
)
if expiresIn == 0 || expiresIn < uint64(time.Now().Unix()) {
fmt.Println(1)
if resObj, err = getAccessTokenWithApi(); err != nil { //从链上获取
return "", err
}
accessToken = resObj.Access_token
expiresIn = resObj.Expires_in
}
return accessToken, nil
}
func getAccessTokenWithApi() (model.BaiduAccessToken, error) {
var (
resObj model.BaiduAccessToken
err error
)
url := "https://aip.baidubce.com/oauth/2.0/token"
urlReq := "?grant_type=" + grantType + "&client_id=" + clientId + "&client_secret=" + clientSecret
res := utils.Get(url + urlReq)
if err = json.Unmarshal([]byte(res), &resObj); err != nil {
logger.Error("getAccessTokenWithApi json err", err)
return resObj, err
}
if resObj.Error != "" {
logger.Error("getAccessTokenWithApi err", err)
return resObj, errors.New(resObj.Error_description)
}
return resObj, err
}

160
pkg/logic/upload.go Normal file
View File

@ -0,0 +1,160 @@
package logic
import (
"dubbo.apache.org/dubbo-go/v3/common/logger"
"errors"
"fmt"
"fonchain-fiee/pkg/config"
"fonchain-fiee/pkg/e"
"github.com/fonchain_enterprise/utils/objstorage"
"github.com/rwcarlsen/goexif/exif"
"golang.org/x/image/bmp"
"image"
"image/jpeg"
"image/png"
"io/ioutil"
"os"
"path"
"strings"
)
type IUpload interface{}
type Upload struct{}
// ReadOrientation 方向判断
func ReadOrientation(filename string) (direct int, err error) {
file, err := os.Open(filename)
defer file.Close()
if err != nil {
logger.Error("failed to open file, err: ", err)
return
}
x, err := exif.Decode(file)
if err != nil {
logger.Error("failed to decode file, err: ", err)
return
}
orientation, err := x.Get(exif.Orientation)
if err != nil {
logger.Error("failed to orientation file, err: ", err)
return
}
direct, err = orientation.Int(0)
if err != nil {
logger.Error("failed to convert type file, err: ", err)
return
}
return
}
// 旋转90度
func rotate90(m image.Image) image.Image {
rotate90 := image.NewRGBA(image.Rect(0, 0, m.Bounds().Dy(), m.Bounds().Dx()))
// 矩阵旋转
for x := m.Bounds().Min.Y; x < m.Bounds().Max.Y; x++ {
for y := m.Bounds().Max.X - 1; y >= m.Bounds().Min.X; y-- {
// 设置像素点
rotate90.Set(m.Bounds().Max.Y-x, y, m.At(y, x))
}
}
return rotate90
}
// 旋转180度
func rotate180(m image.Image) image.Image {
rotate180 := image.NewRGBA(image.Rect(0, 0, m.Bounds().Dx(), m.Bounds().Dy()))
// 矩阵旋转
for x := m.Bounds().Min.X; x < m.Bounds().Max.X; x++ {
for y := m.Bounds().Min.Y; y < m.Bounds().Max.Y; y++ {
// 设置像素点
rotate180.Set(m.Bounds().Max.X-x, m.Bounds().Max.Y-y, m.At(x, y))
}
}
return rotate180
}
// 旋转270度
func rotate270(m image.Image) image.Image {
rotate270 := image.NewRGBA(image.Rect(0, 0, m.Bounds().Dy(), m.Bounds().Dx()))
// 矩阵旋转
for x := m.Bounds().Min.Y; x < m.Bounds().Max.Y; x++ {
for y := m.Bounds().Max.X - 1; y >= m.Bounds().Min.X; y-- {
// 设置像素点
rotate270.Set(x, m.Bounds().Max.X-y, m.At(y, x))
}
}
return rotate270
}
func MakeThumbnail(imagePath, savePath string) error {
prefix := strings.ToLower(path.Ext("./2.jpg"))
ori, err := ReadOrientation(imagePath)
if err != nil {
return err
}
file, _ := os.Open(imagePath)
defer file.Close()
img, _, err := image.Decode(file)
if err != nil {
return err
}
//苹果手机拍照的图片会有方向属性Orientation
//经过Decode和Encode编码处理后方向属性会丢失导致图片被旋转
switch ori {
case 6: //90度图片旋转
img = rotate90(img)
case 3:
img = rotate180(img)
case 8:
img = rotate270(img)
}
newImg, _ := os.Create(savePath)
defer newImg.Close()
switch prefix {
case ".jpg", ".jpeg":
err = jpeg.Encode(newImg, img, &jpeg.Options{Quality: 100})
case "png":
err = png.Encode(newImg, img)
case "bmp":
err = bmp.Encode(newImg, img)
default:
err = jpeg.Encode(newImg, img, &jpeg.Options{Quality: 100})
}
if err != nil {
logger.Error("Encode err", err)
return err
}
return nil
}
func (u *Upload) PutBos(filePath string, mediaType string, needRemove bool) (url string, err error) {
BOSClient, err := objstorage.NewOSS(config.ConfigData.Oss.AccessKeyId, config.ConfigData.Oss.AccessKeySecret, config.ConfigData.Oss.Endpoint)
if err != nil {
logger.Errorf("PutBos NewOOS err ", err)
err = errors.New(e.GetMsg(e.ErrorUploadBos))
return
}
f, err := os.Open(filePath)
if err != nil {
logger.Errorf("PutBos Open err %+v", err.Error())
return
}
fileBytes, _ := ioutil.ReadAll(f)
f.Close()
//删除本地文件
if needRemove {
os.Remove(filePath)
}
filePath = strings.Replace(filePath, "./runtime", "", 1)
var objectName string = fmt.Sprintf("%s/%s%s", config.ConfigData.Oss.BaseDir, config.Env, filePath)
_, err = BOSClient.PutObjectFromBytes(config.ConfigData.Oss.BucketName, objectName, fileBytes)
if err != nil {
logger.Errorf("PutBos PutObject err %+v", err.Error())
err = errors.New(e.GetMsg(e.ErrorUploadBos))
return
}
//url = fmt.Sprintf("%s%s%s/%s", config.BosHttp, config.BosBucketName, config.BosUrl, objectName)
url = fmt.Sprintf("%s/%s", config.ConfigData.Oss.CdnHost, objectName)
return
}

View File

@ -43,21 +43,23 @@ func CheckLogin(provider *api.AccountClientImpl) gin.HandlerFunc {
service.Error(ctx, err)
return
}
if infoRes.IsExist == false {
service.Error(ctx, errors.New(e.ErrNotLogin))
return
}
info := infoRes.Info
//info := infoRes.Info/
loginInfo := login.Info{
Domain: info.Domain,
ID: info.ID,
Account: info.Account,
NickName: info.NickName,
TelNum: infoRes.Info.TelNum,
Avatar: infoRes.Info.Avatar,
RealName: infoRes.Info.RealName,
IDNum: infoRes.Info.IDNum,
ID: infoRes.Id,
Status: infoRes.Status,
Name: infoRes.Name,
Sex: infoRes.Sex,
Nationality: infoRes.Nationality,
DocumentType: infoRes.DocumentType,
CertificatePicture: infoRes.CertificatePicture,
Validity: infoRes.Validity,
PlaceOfResidence: infoRes.PlaceOfResidence,
GroupPhoto: infoRes.GroupPhoto,
Attachment: infoRes.Attachment,
SubNum: infoRes.SubNum,
NotPassRemarks: infoRes.NotPassRemarks,
Domain: infoRes.Domain,
}
ctx.Set("jwtInfo", loginInfo)

12
pkg/model/baidu.go Normal file
View File

@ -0,0 +1,12 @@
package model
type BaiduAccessToken struct {
Refresh_token string `json:"refresh_token"`
Expires_in uint64 `json:"expires_in"`
Scope string `json:"scope"`
Session_key string `json:"session_key"`
Access_token string `json:"access_token"`
Session_secret string `json:"session_secret"`
Error string `json:"error"`
Error_description string `json:"error_description"`
}

23
pkg/model/common.go Normal file
View File

@ -0,0 +1,23 @@
package model
const (
HttpType = "http://"
HttpsType = "https://"
TmpArtworkDir = "./runtime/tmp/artworks"
TmpArtistDir = "./runtime/tmp/artists"
MediaPath = "./runtime/"
TplPath = "./data/"
ImgActionRotate = "rotate" //旋转
MediaTypeVideo = "video"
MediaTypeImage = "video"
)
const (
DateTimeFormat = "2006-01-02 15:04:05"
DateFormat = "2006-01-02"
)
type RespSendIndexes struct {
Code int `json:"code"`
Msg string `json:"msg"`
}

View File

@ -11,15 +11,20 @@ type WxUser struct {
}
type Info struct {
Domain string `json:"domain"`
ID uint64 `json:"ID"`
Account string `json:"account"`
NickName string `json:"nickName"`
TelNum string `json:"telNum"`
Avatar string `json:"avatar"`
RealName string `json:"realName"`
IDNum string `json:"idNum"`
Coin string `json:"coin"` //追加一个余额
ID uint64 `json:"ID"`
Status int32 `json:"status"`
Name string `json:"name"`
Sex int32 `json:"sex"`
Nationality string `json:"nationality"`
DocumentType int32 `json:"documentType"`
CertificatePicture string `json:"certificatePicture"`
Validity string `json:"validity"`
PlaceOfResidence string `json:"placeOfResidence"`
GroupPhoto string `json:"groupPhoto"`
Attachment string `json:"attachment"`
SubNum string `json:"subNum"`
NotPassRemarks string `json:"notPassRemarks"`
Domain string `json:"domain"`
}
func GetUserInfoFromC(c *gin.Context) Info {

7
pkg/model/upload.go Normal file
View File

@ -0,0 +1,7 @@
package model
type UploadInfo struct {
Url string
Err string
FileKName string
}

27
pkg/router/bundle.go Normal file
View File

@ -0,0 +1,27 @@
package router
import (
"fonchain-fiee/pkg/service/bundle"
"github.com/gin-gonic/gin"
)
func BundleRouter(r *gin.RouterGroup) {
bundleRoute := r.Group("bundle")
// 套餐
{
bundleClientRoute := bundleRoute.Group("system")
{
bundleClientRoute.POST("create", bundle.CreateBundle)
bundleClientRoute.POST("update", bundle.UpdateBundle)
bundleClientRoute.POST("remove", bundle.DeleteBundle)
}
bundleAppRoute := bundleRoute.Group("common")
{
bundleAppRoute.POST("bundle-list", bundle.BundleList)
}
}
}

33
pkg/router/bundleOrder.go Normal file
View File

@ -0,0 +1,33 @@
package router
import (
"fonchain-fiee/pkg/service/bundle"
"github.com/gin-gonic/gin"
)
func BundleOrderRouter(r *gin.RouterGroup) {
r.POST("/stripe-pay/callback", bundle.StripeCheckoutSessionWebhook)
bundleOrderRoute := r.Group("bundle-order")
// 套餐
{
bundleOrderClientRoute := bundleOrderRoute.Group("common")
{
bundleOrderClientRoute.POST("bundle-order-list", bundle.OrderRecordsList)
}
bundleOrderAppRoute := bundleOrderRoute.Group("app")
{
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
bundleOrderAppRoute.POST("update-pay", bundle.UpdateBundleOrderStatusPaid)
bundleOrderAppRoute.POST("order-detail", bundle.OrderRecordsDetail)
// stripe
bundleOrderAppRoute.POST("create-stripe-pay", bundle.CreateStripeCheckoutSession)
}
}
}

View File

@ -8,6 +8,7 @@ import (
"fonchain-fiee/pkg/service/lang"
"fonchain-fiee/pkg/service/qr"
"fonchain-fiee/pkg/service/redirect"
"fonchain-fiee/pkg/service/upload"
"fonchain-fiee/pkg/service/version"
"github.com/gin-contrib/gzip"
"net/http"
@ -36,16 +37,21 @@ func NewRouter() *gin.Engine {
return
})
BundleRouter(privateGroup)
BundleOrderRouter(privateGroup)
{
v1.POST("version", version.Version) //版本号公共
}
//账号模块
{
r.POST("user/register", account.UserRegister) //h5注册登录
r.POST("user/login", account.UserLogin) //后台登录
r.POST("user/send", account.SendMsg) //发送验证码
r.POST("user/logout", account.UserLogout) //登出
r.POST("user/check/msg", account.CheckMsg) //校验验证码
r.POST("user/register", account.UserRegister) //h5注册登录
r.POST("user/login", account.UserLogin) //后台登录
r.POST("user/send", account.SendMsg) //发送验证码
r.POST("user/logout", account.UserLogout) //登出
r.POST("user/check/msg", account.CheckMsg) //校验验证码
r.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
r.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
acRoute := r.Group("/user")
acRoute.Use(middleware.CheckLogin(service.AccountProvider))
{
@ -54,9 +60,15 @@ func NewRouter() *gin.Engine {
}
{
acRoute.POST("list", account.UserList) //用户列表
acRoute.POST("approval", account.UserApproval) //用户列表
acRoute.POST("approval", account.UserApproval) //实名审核
}
}
// 上传
upData := privateGroup.Group("upload")
upData.Use(middleware.CheckLogin(service.AccountProvider))
{
upData.POST("img", upload.UploadImg)
}
{
//图片相关
imageRoute := v1.Group("image")
@ -87,16 +99,6 @@ func NewRouter() *gin.Engine {
redirectRoute.POST("sdk/down/v3", auth.DownImgV3)
}
// 套餐
{
//bundleRoute := r.Group("bundle")
//bundleClientRoute := bundleRoute.Group("system")
{
//bundleClientRoute.POST("create", bundle.CreateBundle)
}
}
//静态文件
r.StaticFS("/static", http.Dir("./runtime"))
r.NoRoute(func(c *gin.Context) {

View File

@ -2,14 +2,18 @@ package account
import (
"context"
"errors"
"fmt"
"fonchain-fiee/api/account"
"fonchain-fiee/pkg/config"
"fonchain-fiee/pkg/cache"
"fonchain-fiee/pkg/e"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/model/union"
"fonchain-fiee/pkg/service"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"github.com/go-redis/redis"
"time"
)
func UserApproval(c *gin.Context) {
@ -58,25 +62,93 @@ func UserInfo(c *gin.Context) {
return
}
// SendMsg 用户登录操作
// SendMsg 用户发送验证码
func SendMsg(c *gin.Context) {
var req account.SendMsgRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
//req.Domain = "app"
req.SignNo = uint32(config.DefaultSignNo)
res, err := service.AccountProvider.SendMsg(context.Background(), &req)
if err != nil {
service.Error(c, err)
req.Project = "fiee"
req.TelNum = req.Zone + req.TelNum
if req.Zone != e.ZoneCn && req.Zone != "" {
// ============================== redis检查ip开始
ip := c.ClientIP()
daykey := "day_sms_limit:" + ip
minutekey := "minute_sms_limit:" + ip
duration := time.Second
isBlacklisted, blackErr := cache.RedisClient.SIsMember("nation_sms_blacklist", ip).Result()
if blackErr != nil {
service.Error(c, errors.New("Redis error"))
return
}
if isBlacklisted {
fmt.Println("当前ip手机号在黑名单中", ip, ";手机号:", req.TelNum, ";domain", req.Domain)
service.Success(c, "succes!")
return
}
// 一分钟5次一天30次
if dayCount, redisErr := cache.RedisClient.Get(daykey).Int(); redisErr == redis.Nil {
cache.RedisClient.Set(daykey, 1, 24*time.Hour)
} else if redisErr != nil {
service.Error(c, errors.New("Redis error"))
return
} else if dayCount >= 30 {
cache.RedisClient.SAdd("nation_sms_blacklist", ip)
cache.RedisClient.Expire("nation_sms_blacklist", 24*time.Hour) // 黑名单记录有效期为24小时
fmt.Println("当前ip手机号在黑名单中", ip, ";手机号:", req.TelNum, ";domain", req.Domain)
service.Success(c, "succes!")
return
}
if minuteCount, redisErr := cache.RedisClient.Get(minutekey).Int(); redisErr == redis.Nil {
cache.RedisClient.Set(minutekey, 1, duration)
} else if redisErr != nil {
service.Error(c, errors.New("Redis error"))
return
} else if minuteCount >= 5 {
fmt.Println("当前ip触发每分钟5次限制", ip, ";手机号:", req.TelNum, ";domain", req.Domain)
service.Success(c, "succes!")
return
}
cache.RedisClient.Incr(daykey)
cache.RedisClient.Incr(minutekey)
// ============================== redis检查ip结束
tempReq := &account.SendNationMsgRequest{
Domain: req.Domain,
TelNum: req.TelNum,
Project: req.Project,
SignNo: req.SignNo,
MId: req.MId,
Scope: req.Scope,
}
res, err := service.AccountProvider.SendNationMsg(context.Background(), tempReq)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
return
} else {
res, err := service.AccountProvider.SendMsg(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
return
}
service.Success(c, res)
return
//req.Domain = "app"
//req.SignNo = uint32(config.DefaultSignNo)
//res, err := service.AccountProvider.SendMsg(context.Background(), &req)
//if err != nil {
// service.Error(c, err)
// return
//}
}
func RealName(c *gin.Context) {
var req account.RealNameRequest
@ -106,7 +178,7 @@ func CheckMsg(c *gin.Context) {
service.Error(c, err)
return
}
req.TelNum = req.Zone + req.TelNum
res, err := service.AccountProvider.CheckMsg(context.Background(), &req)
if err != nil {
service.Error(c, err)
@ -116,7 +188,45 @@ func CheckMsg(c *gin.Context) {
service.Success(c, res)
return
}
func GenerateCaptcha(c *gin.Context) {
req := account.GenerateSliderCaptchaRequest{}
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.AccountProvider.GenerateSliderCaptcha(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func ValidateCaptcha(c *gin.Context) {
req := account.VerifySliderCaptchaRequest{}
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.AccountProvider.VerifySliderCaptcha(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func UserLogout(c *gin.Context) {
req := account.DecryptJwtRequest{}
req.Token = c.GetHeader(e.Authorization)
@ -142,9 +252,10 @@ func UserRegister(c *gin.Context) {
return
}
tokenInfo, err := service.AccountProvider.Login(context.Background(), &account.LoginRequest{
Domain: req.Domain,
TelNum: req.TelNum,
Code: req.Code,
Domain: req.Domain,
TelNum: req.TelNum,
Code: req.Code,
TelAreaCode: req.TelAreaCode,
})
if err != nil {
service.Error(c, err)

View File

@ -8,6 +8,8 @@ import (
const (
Failed = 1
Ok = 0
RetryCode = 2
)
// Response 基础序列化器
@ -16,6 +18,7 @@ type Response struct {
Data interface{} `json:"data"`
Msg string `json:"msg"`
Code int `json:"code"`
Error error `json:"error"`
}
// Success Success(c,someMap) datas传结构体中文会有乱码问题
@ -51,3 +54,19 @@ func Error(c *gin.Context, err error) {
c.Abort()
}
// 重试
func Retry(c *gin.Context, err error) {
errMsg := ""
if err != nil {
errMsg = err.Error()
}
c.JSON(http.StatusOK, Response{
Code: RetryCode,
Msg: errMsg,
Data: struct{}{},
})
c.Abort()
}

View File

@ -0,0 +1,158 @@
package bundle
import (
"context"
"errors"
"fonchain-fiee/api/bundle"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
"fonchain-fiee/pkg/service/bundle/logic"
bundleModel "fonchain-fiee/pkg/service/bundle/model"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"strconv"
)
func CreateBundleOrderSignature(c *gin.Context) {
var req bundle.OrderRecord
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
if req.BundleUuid == "" {
service.Error(c, errors.New(common.MissBundleUUID))
return
}
if req.Signature == "" {
service.Error(c, errors.New(common.MissOrderSignature))
return
}
// 获取 用户信息
userInfo := login.GetUserInfoFromC(c)
req.CustomerNum = userInfo.SubNum
req.CustomerName = userInfo.Name
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
// 获取 套餐信息
bundleDetailReq := &bundle.BundleDetailRequest{
Uuid: req.BundleUuid,
}
bundleDetail, detailErr := service.BundleProvider.BundleDetail(context.Background(), bundleDetailReq)
if detailErr != nil {
service.Error(c, detailErr)
return
}
req.BundleName = bundleDetail.Bundle.Name
req.Amount = bundleDetail.Bundle.Price
req.AmountType = bundleDetail.Bundle.PriceType
// 当前 未将 签名 写入合同中
signContract, signContractErr := logic.SignContract(req.CustomerName, bundleDetail.Bundle.Contract, req.Signature)
if signContractErr != nil {
service.Error(c, signContractErr)
return
}
req.SignContract = signContract
req.SignedTime = common.GetBeijingTime()
req.Status = bundleModel.OrderSigned
res, err := service.BundleProvider.CreateOrderRecord(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func UpdateBundleOrderStatusPaid(c *gin.Context) {
var req bundle.OrderRecord
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
// 获取 用户信息
userInfo := login.GetUserInfoFromC(c)
if req.Uuid == "" {
service.Retry(c, errors.New(common.MissOrderUUID))
return
}
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
Uuid: req.Uuid,
})
if detailErr != nil {
service.Retry(c, detailErr)
return
}
// 判断 是否是 本人操作
if strconv.FormatUint(userInfo.ID, 10) != detail.OrderRecord.CustomerID {
service.Error(c, errors.New(common.NotMatchOrderInfo))
return
}
req.Status = bundleModel.OrderPaid
req.PayTime = common.GetBeijingTime()
res, err := service.BundleProvider.UpdateOrderRecord(context.Background(), &req)
if err != nil {
service.Retry(c, detailErr)
return
}
service.Success(c, res)
}
func OrderRecordsList(c *gin.Context) {
var req bundle.OrderRecordsRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
// 获取 用户信息
res, err := service.BundleProvider.OrderRecordsList(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func OrderRecordsDetail(c *gin.Context) {
var req bundle.OrderRecordsDetailRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
// 获取 用户信息
res, err := service.BundleProvider.OrderRecordsDetail(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}

View File

@ -0,0 +1,78 @@
package bundle
import (
"context"
"fonchain-fiee/api/bundle"
"fonchain-fiee/pkg/service"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
)
func CreateBundle(c *gin.Context) {
var req bundle.BundleProfile
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.CreateBundle(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func UpdateBundle(c *gin.Context) {
var req bundle.BundleProfile
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.UpdateBundle(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func DeleteBundle(c *gin.Context) {
var req bundle.DelBundleRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.DeleteBundle(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}
func BundleList(c *gin.Context) {
var req bundle.BundleListRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.BundleList(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
}

View File

@ -0,0 +1,28 @@
package common
// 套餐
const (
MissBundleUUID = "缺少套餐UUID"
MissOrderSignature = "缺少客户签名信息"
ErrorInsertSignature = "插入签名失败"
)
// 订单
const (
MissOrderNo = "缺少订单号"
MissOrderUUID = "缺少订单信息"
NotMatchOrderInfo = "非当前用户订单信息不可操作"
HadPay = "订单已支付"
)
// stripe
const (
ErrorQueryStripeInfo = "查询支付信息失败"
)
const (
ErrorDownloadFile = "下载文件失败"
ErrorUploadFile = "上传文件失败"
)

View File

@ -0,0 +1,28 @@
package common
import (
"fmt"
"go.uber.org/zap"
"time"
)
// GetBeijingTime 获取当前时间的北京时间
func GetBeijingTime() string {
// 获取当前时间
now := time.Now()
// 设置北京时间的时区
beijing, err := time.LoadLocation("Asia/Shanghai")
if err != nil {
zap.L().Error("获取北京时间时区失败", zap.Error(err))
return ""
}
// 将当前时间转换为北京时间
beijingTime := now.In(beijing).Format("2006-01-02 15:04:05")
// 打印北京时间
fmt.Println("当前北京时间是:", beijingTime)
return beijingTime
}

View File

@ -0,0 +1,129 @@
package logic
import (
"bytes"
"errors"
"fmt"
"fonchain-fiee/pkg/service/bundle/common"
"fonchain-fiee/pkg/service/upload"
"github.com/signintech/gopdf"
"go.uber.org/zap"
"image"
"io"
"log"
"net/http"
"os"
"time"
)
func SignContract(customerName string, contract string, signImgPath string) (outputUrl string, err error) {
filePath := customerName + "_" + time.Now().String() + ".pdf"
downloadFileErr := DownloadFile(filePath, contract)
if downloadFileErr != nil {
zap.L().Error("download file error: ", zap.Error(downloadFileErr))
//service.Error(c, errors.New(common.ErrorDownloadFile))
return outputUrl, errors.New(common.ErrorDownloadFile)
}
signFile := customerName + "signed" + "_" + time.Now().String() + ".pdf"
signErr := InsertSignature(filePath, signFile, signImgPath)
if signErr != nil {
zap.L().Error("insert signature error: ", zap.Error(signErr))
return outputUrl, errors.New(common.ErrorInsertSignature)
}
os.Remove(filePath)
outputUrl, ossErr := upload.PutBos(signFile, upload.PdfType, true)
if ossErr != nil {
return "", errors.New(common.ErrorUploadFile)
}
return outputUrl, nil
}
// InsertSignature 把用户签字内容 填充到 合同模版里面
func InsertSignature(templatePath string, outputPath string, signImgPath string) error {
pdf := gopdf.GoPdf{}
pdf.Start(gopdf.Config{PageSize: *gopdf.PageSizeA4})
resp, imageErr := http.Get(signImgPath)
if imageErr != nil {
return errors.New("error downloading signature image")
}
defer resp.Body.Close()
b, _err := io.ReadAll(resp.Body)
if _err != nil {
return errors.New("error reading signature image")
}
// Create a new reader from the bytes
imgReader := bytes.NewReader(b)
img, _, err := image.DecodeConfig(imgReader)
if err != nil {
return errors.New("error decoding signature image")
}
w := img.Width
h := img.Height
// 导入模板文件中的页面
err = pdf.ImportPagesFromSource(templatePath, "/MediaBox")
if err != nil {
log.Fatalf("无法导入页面: %v", err)
}
// 获取模板文件的总页数
totalPages := pdf.GetNumberOfPages()
fmt.Printf("模板文件的总页数: %d\n", totalPages)
targetPage := totalPages
// 遍历所有页
for i := 1; i <= totalPages; i++ {
tpl := pdf.ImportPage(templatePath, i, "/MediaBox")
pdf.AddPage()
pdf.UseImportedTemplate(tpl, 0, 0, gopdf.PageSizeA4.W, gopdf.PageSizeA4.H)
// 只在目标页插入签名
if i == targetPage {
imgH1, _err := gopdf.ImageHolderByBytes(b)
if _err != nil {
//zap.L().Error("SignContract err", zap.Error(err))
return errors.New("error processing signature image")
}
newWidth := 80.0
newHeight := (newWidth / float64(w)) * float64(h)
err = pdf.ImageByHolder(imgH1, 380, 540, &gopdf.Rect{W: newWidth, H: newHeight})
if err != nil {
//zap.L().Error("SignContract err", zap.Error(err))
return errors.New("error inserting signature")
}
}
}
// 生成新的 PDF
if err = pdf.WritePdf(outputPath); err != nil {
//zap.L().Error("WritePdf err", zap.Error(err))
return errors.New("error writing final PDF")
}
return nil
}
func DownloadFile(filepath string, url string) error {
resp, err := http.Get(url)
if err != nil {
return err
}
defer resp.Body.Close()
out, err := os.Create(filepath)
if err != nil {
return err
}
defer out.Close()
_, err = io.Copy(out, resp.Body)
return err
}

View File

@ -0,0 +1,6 @@
package model
const (
OrderSigned = 1
OrderPaid = 2
)

137
pkg/service/bundle/pay.go Normal file
View File

@ -0,0 +1,137 @@
package bundle
import (
"context"
"errors"
"fmt"
"fonchain-fiee/api/bundle"
"fonchain-fiee/api/order"
"fonchain-fiee/pkg/config"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
bundleModel "fonchain-fiee/pkg/service/bundle/model"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"io"
"net/http"
"strconv"
)
func CreateStripeCheckoutSession(c *gin.Context) {
var req order.CreateStripeCheckoutSessionRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
// 获取 用户信息
userInfo := login.GetUserInfoFromC(c)
// 检查 订单信息
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
OrderNo: req.OutTradeNo,
})
if detailErr != nil {
service.Error(c, detailErr)
return
}
// 判断 是否是 本人操作
if strconv.FormatUint(userInfo.ID, 10) != detail.OrderRecord.CustomerID {
service.Error(c, errors.New(common.NotMatchOrderInfo))
return
}
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
// 查询支付结果
stripeInfosRes, stripeInfosErr := service.OrderProvider.QueryStripeInfoByCheckSessionIds(context.Background(), &order.QueryStripeInfoRequest{
CheckoutSessionIds: []string{detail.OrderRecord.CheckoutSessionId},
})
if stripeInfosErr != nil {
service.Error(c, errors.New(common.ErrorQueryStripeInfo))
return
}
if stripeInfosRes != nil && len(stripeInfosRes.StripeInfos) > 0 {
for _, stripeInfo := range stripeInfosRes.StripeInfos {
if stripeInfo.OutTradeNo == detail.OrderRecord.OrderNo {
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
Uuid: detail.OrderRecord.Uuid,
Status: bundleModel.OrderPaid,
PayTime: common.GetBeijingTime(),
})
if updateOrderRecordErr != nil {
service.Error(c, detailErr)
return
}
service.Success(c, &service.Response{
Msg: common.HadPay,
Code: 0,
})
return
}
}
}
}
//调用微服务获取支付地址
result, err := service.OrderProvider.CreateStripeCheckoutSession(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
//更新订单状态
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
Uuid: detail.OrderRecord.Uuid,
CheckoutSessionId: result.CheckoutSessionId,
CheckoutSessionUrl: result.CheckoutSessionUrl,
})
if updateOrderRecordErr != nil {
service.Error(c, updateOrderRecordErr)
return
}
service.Success(c, result)
}
func StripeCheckoutSessionWebhook(c *gin.Context) {
var req order.GetCheckoutWebhookRequest
c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, int64(65536))
payloadBytes, err := io.ReadAll(c.Request.Body)
if err != nil {
service.Error(c, err)
return
}
req.Payload = string(payloadBytes)
req.Signature = c.GetHeader("Stripe-Signature")
req.WebhookKey = config.Webhookkey
fmt.Printf("webhookKey:%s\n", req.WebhookKey)
resp, err := service.OrderProvider.CommonCheckoutWebhook(c, &req)
if err != nil {
service.Error(c, err)
return
}
fmt.Println("resp.PaymentIntentStatus:", resp.PaymentIntentStatus)
if resp.PaymentIntentStatus == "paid" {
//支付成功
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
OrderNo: resp.OutTradeNo,
PayTime: common.GetBeijingTime(),
Status: bundleModel.OrderPaid,
})
if updateStatusErr != nil {
service.Error(c, err)
return
}
}
service.Success(c)
}

View File

@ -7,17 +7,20 @@ import (
"fmt"
"fonchain-fiee/api/account"
"fonchain-fiee/api/bundle"
pkConfig "fonchain-fiee/cmd/config"
"fonchain-fiee/api/order"
pkConfig "fonchain-fiee/pkg/config"
"os"
)
var AccountProvider = new(account.AccountClientImpl)
var BundleProvider = new(bundle.BundleClientImpl)
var OrderProvider = new(order.OrderClientImpl)
func init() {
config.SetConsumerService(BundleProvider)
config.SetConsumerService(OrderProvider)
config.SetConsumerService(AccountProvider)
//config.SetConsumerService(BundleProvider)
if err := config.Load(); err != nil {
panic(err)

View File

@ -0,0 +1,322 @@
package upload
import (
"bytes"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"fonchain-fiee/pkg/config"
"fonchain-fiee/pkg/e"
"fonchain-fiee/pkg/logic"
"fonchain-fiee/pkg/model"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/utils"
"github.com/disintegration/imaging"
"github.com/fonchain_enterprise/utils/objstorage"
"github.com/gin-gonic/gin"
uuid "github.com/satori/go.uuid"
"io"
ffmpeg "github.com/u2takey/ffmpeg-go"
"go.uber.org/zap"
"io/ioutil"
"mime/multipart"
"net/url"
"os"
"path"
"path/filepath"
"strconv"
"strings"
)
const (
MediaPath = "./runtime/"
RouteType = "static/"
VideoType = "video"
ImageType = "image"
PngType = "png"
PdfType = "pdf"
ArtworkFilePath = "artwork"
ArtworkChunkBasePath = "./runtime/tmp/artworks"
)
func UploadImg(c *gin.Context) {
var err error
var filename string
var fileFullName string
source := c.PostForm("source")
mask := c.PostForm("mask")
action := c.PostForm("action")
defineFileName := c.PostForm("defineFileName")
urlParam := c.PostForm("urlParam")
if mask == "" {
mask = "default"
}
mediaType := c.PostForm("type")
zap.L().Info("UploadImg 1", zap.Any("mask", mask))
var BasePath string
if mediaType == "" || mediaType == ImageType {
mediaType = ImageType
}
BasePath = fmt.Sprintf("%s%s", MediaPath, mediaType)
//BaseRoute = fmt.Sprintf("%s%s", RouteType, mediaType)
var isCompress int
if cStr, ok := c.GetPostForm("is_compress"); ok {
var errS error
isCompress, errS = strconv.Atoi(cStr)
if errS != nil {
service.Error(c, err)
return
}
}
zap.L().Info("UploadImg 2 ", zap.Any("mask", mask))
// 检验参数
if mask == "" || source == "" {
service.Error(c, err)
return
}
file, err := c.FormFile("file")
// 检验文件
if err != nil {
zap.L().Error("Upload FormFile err", zap.Error(err))
service.Error(c, err)
return
}
//logger.Errorf("UploadImg 3 %+v", mask)
// 判断是不是视频或者需要压缩
var oriUrl string
if isCompress != 1 && mediaType != "video" && action == "" {
oriUrl, err = quickBos(file, mediaType, mask, source, defineFileName)
if err != nil {
service.Error(c, err)
return
}
if urlParam != "" {
oriUrl = fmt.Sprintf("%s?%s", oriUrl, urlParam)
}
service.Success(c, oriUrl)
return
}
//创建文件名
fileExt := strings.ToLower(path.Ext(file.Filename))
if defineFileName != "" {
fileFullName = defineFileName
} else {
newUu, _err := uuid.NewV4()
if _err != nil {
service.Error(c, err)
return
}
filename = newUu.String()
fileFullName = fmt.Sprintf("%s%s", filename, fileExt)
}
//检测文件夹 不存在就创建
imgPath := fmt.Sprintf("%s/%s/%s", BasePath, source, mask)
_, err = utils.CheckDirPath(imgPath, true)
if err != nil {
service.Error(c, err)
return
}
dst := fmt.Sprintf("%s/%s", imgPath, fileFullName)
// 保存文件至指定路径
err = c.SaveUploadedFile(file, dst)
if err != nil {
service.Error(c, err)
return
}
if action == model.ImgActionRotate {
fileFullName = fmt.Sprintf("%s%s", filename, fileExt)
newDst := fmt.Sprintf("%s/%s_rotate%v", imgPath, filename, fileExt)
if err = logic.MakeThumbnail(dst, newDst); err != nil {
//ResponseQuickMsg(c, e.Failed, e.GetMsg(e.ERROR_ROTATE_IMG), nil)
//return
} else {
_ = os.Remove(dst)
dst = newDst
}
}
//localUrl := fmt.Sprintf("%s/%s/%s/%s/%s", config.ServerDM, BaseRoute, source, mask, fileFullName)
var data map[string]string = make(map[string]string, 2)
//data["ori_url"] = localUrl
if int32(isCompress) == 1 {
//压缩图片并存储在原图路径命名格式xx.jpg_small.jpg
fileFullName = fmt.Sprintf("%s_small%s", filename, fileExt)
newDst := fmt.Sprintf("%s/%s", imgPath, fileFullName)
//compressUrl := fmt.Sprintf("%s/%s/%s/%s/%s", config.ServerDM, BaseRoute, source, mask, fileFullName)
err = utils.CompressJPG(dst, newDst)
compressUrl, err := PutBos(newDst, mediaType, true)
if err != nil {
service.Error(c, err)
return
}
data["compress_url"] = compressUrl
}
// 如果是视频需要截图图片做封面
if mediaType == VideoType {
videoCover := fmt.Sprintf("%s/%s", imgPath, filename)
_, err = GetSnapshot(dst, videoCover, 1)
if err != nil {
zap.L().Error("GetSnapshot err", zap.Error(err))
service.Error(c, err)
return
}
zap.L().Info("UploadImg 8.1 videoCover", zap.Any("videoCover", videoCover))
//data["cover_url"] = fmt.Sprintf("%s/%s/%s/%s/%s", config.ServerDM, BaseRoute, source, mask, fmt.Sprintf("%s.%s", filename, PngType))
coverUrl, err := PutBos(videoCover+"."+PngType, mediaType, true)
if urlParam != "" {
coverUrl = fmt.Sprintf("%s?%s", coverUrl, urlParam)
}
data["cover_url"] = coverUrl
if err != nil {
zap.L().Error("Upload GetSnapshot err", zap.Error(err))
service.Error(c, err)
return
}
//ResponseQuickMsg(c, e.Ok, e.GetMsg(e.SUCCESS), data)
//return
}
ossUrl, err := PutBos(dst, mediaType, true)
if err != nil {
service.Error(c, err)
return
}
if urlParam != "" {
ossUrl = fmt.Sprintf("%s?%s", ossUrl, urlParam)
}
data["ori_url"] = ossUrl
service.Success(c, data)
return
}
func quickBos(file *multipart.FileHeader, mediaType string, mask string, source string, defineFileName string) (url string, err error) {
newFile, _ := file.Open()
var filename string
defer newFile.Close()
if defineFileName != "" {
filename = defineFileName
} else {
uuids, _ := uuid.NewV4()
filename = uuids.String()
filename = fmt.Sprintf("%s%s", filename, filepath.Ext(file.Filename))
}
filePath := fmt.Sprintf("%s/%s/%s/%s", mediaType, mask, source, filename)
fileBytes, _ := ioutil.ReadAll(newFile)
if mediaType == "image" {
if err = BaiduCheckImage(fileBytes); err != nil {
return
}
}
var objectName string = fmt.Sprintf("%s/%s/%s", config.ConfigData.Oss.BaseDir, config.Env, filePath)
BOSClient, _ := objstorage.NewOSS(config.ConfigData.Oss.AccessKeyId, config.ConfigData.Oss.AccessKeySecret, config.ConfigData.Oss.Endpoint)
_, err = BOSClient.PutObjectFromBytes(config.ConfigData.Oss.BucketName, objectName, fileBytes)
if err != nil {
//logger.Errorf("quickOss err", err)
return
}
//url = fmt.Sprintf("%s%s%s/%s", config.BosHttp, config.BosBucketName, config.BosUrl, objectName)
url = fmt.Sprintf("%s/%s", config.ConfigData.Oss.CdnHost, objectName)
return
}
// BaiduCheckImage 图片鉴黄
func BaiduCheckImage(imageByte []byte) (err error) {
return
var (
accesstoken string
response string
)
sourcestring := base64.StdEncoding.EncodeToString(imageByte)
if accesstoken, err = logic.GetImageAccessToken(); err != nil {
return err
}
host := "https://aip.baidubce.com/rest/2.0/solution/v1/img_censor/v2/user_defined?access_token=[" + accesstoken + "]"
if response, err = utils.PostForm(host, url.Values{"image": {sourcestring}}); err != nil {
//logger.Error("user_defined PostForm err", err)
return err
}
var res struct {
ErrorCode int64 `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Conclusion string `json:"conclusion"`
Log_id uint64 `json:"log_id"`
IsHitMd5 bool `json:"isHitMd5"`
ConclusionType int64 `json:"conclusionType"`
}
if err = json.Unmarshal([]byte(response), &res); err != nil {
//err = errors.New(e.GetMsg(e.JsonUnmarshal))
return
}
//logger.Error("user_defined res", res)
if res.ErrorCode != 0 || res.ErrorMsg != "" {
return errors.New(e.GetMsg(e.ERROR_BAIDU_FAIL))
}
if res.Conclusion != "合规" && res.Conclusion != "疑似" {
return errors.New(e.GetMsg(e.ERROR_BAIDU_IMAGE))
}
return nil
}
func PutBos(filePath string, mediaType string, needRemove bool) (url string, err error) {
BOSClient, err := objstorage.NewOSS(config.ConfigData.Oss.AccessKeyId, config.ConfigData.Oss.AccessKeySecret, config.ConfigData.Oss.Endpoint)
if err != nil {
//logger.Errorf("PutBos NewOss err ", err)
err = errors.New(e.GetMsg(e.ErrorUploadBos))
return
}
f, err := os.Open(filePath)
if err != nil {
//logger.Errorf("PutBos Open err %+v", err.Error())
return
}
fileBytes, _ := io.ReadAll(f)
f.Close()
//删除本地文件
if needRemove {
os.Remove(filePath)
}
if mediaType == "image" {
if err = BaiduCheckImage(fileBytes); err != nil {
return
}
}
filePath = strings.Replace(filePath, "./runtime", "", 1)
var objectName string = fmt.Sprintf("%s/%s%s", config.ConfigData.Oss.BaseDir, config.Env, filePath)
_, err = BOSClient.PutObjectFromBytes(config.ConfigData.Oss.BucketName, objectName, fileBytes)
if err != nil {
//logger.Errorf("PutBos PutObject err %+v", err.Error())
err = errors.New(e.GetMsg(e.ErrorUploadBos))
return
}
//url = fmt.Sprintf("%s%s%s/%s", config.BosHttp, config.BosBucketName, config.BosUrl, objectName)
url = fmt.Sprintf("%s/%s", config.ConfigData.Oss.CdnHost, objectName)
return
}
func GetSnapshot(videoPath, snapshotPath string, frameNum int) (snapshotName string, err error) {
buf := bytes.NewBuffer(nil)
zap.L().Info("GetSnapshot", zap.Any("videoPath", videoPath))
err = ffmpeg.Input(videoPath).
Filter("select", ffmpeg.Args{fmt.Sprintf("gte(n,%d)", frameNum)}).
Output("pipe:", ffmpeg.KwArgs{"vframes": 1, "format": "image2", "vcodec": "mjpeg"}).
WithOutput(buf, os.Stdout).
Run()
if err != nil {
zap.L().Error("GetSnapshot Input err", zap.Error(err))
return "", err
}
img, err := imaging.Decode(buf)
if err != nil {
zap.L().Error("GetSnapshot Decode err", zap.Error(err))
return "", err
}
err = imaging.Save(img, snapshotPath+"."+PngType)
if err != nil {
zap.L().Error("GetSnapshot Save err", zap.Error(err))
return "", err
}
names := strings.Split(snapshotPath, "\\")
snapshotName = names[len(names)-1] + "." + PngType
return
}

62
pkg/utils/picture.go Normal file
View File

@ -0,0 +1,62 @@
package utils
import (
"bytes"
"fmt"
"github.com/nfnt/resize"
"go.uber.org/zap"
"image"
"image/jpeg"
"os"
)
const (
CompressLimit = 1024 * 1024 * 1
MaxHeight uint = 600
)
// CompressJPG 压缩图片,并返回缩略图路径
func CompressJPG(dst string, newDst string) (err error) {
filebytes, err := os.ReadFile(dst)
if err != nil {
return err
}
compressbytes := compressImageResource(filebytes)
fo, err := os.Create(newDst)
defer fo.Close()
if err != nil {
return err
}
_, err = fo.Write(compressbytes)
if err != nil {
return err
}
return nil
}
func compressImageResource(data []byte) []byte {
if len(data) < CompressLimit {
return data
}
img, _, err := image.Decode(bytes.NewReader(data))
if err != nil {
return data
}
m := resize.Resize(0, MaxHeight, img, resize.Lanczos3)
buf := bytes.Buffer{}
err = jpeg.Encode(&buf, m, &jpeg.Options{Quality: 100})
if err != nil {
zap.L().Error("compressImageResource Encode err", zap.Error(err))
return data
}
if buf.Len() > len(data) {
return data
}
fmt.Println(buf.Len())
if buf.Len() >= CompressLimit {
bytes := compressImageResource(buf.Bytes())
return bytes
}
return buf.Bytes()
}

80
pkg/utils/untils.go Normal file
View File

@ -0,0 +1,80 @@
package utils
import (
"bytes"
"crypto/sha256"
"encoding/hex"
"errors"
"fonchain-fiee/pkg/e"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
"time"
)
const (
ExcelPrefix = "xlsx"
)
func SHA256V(str []byte) string {
h := sha256.New()
h.Write(str)
return hex.EncodeToString(h.Sum(nil))
}
func Get(url string) string {
client := &http.Client{Timeout: 5 * time.Second}
resp, err := client.Get(url)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var buffer [512]byte
result := bytes.NewBuffer(nil)
for {
n, err := resp.Body.Read(buffer[0:])
result.Write(buffer[0:n])
if err != nil && err == io.EOF {
break
} else if err != nil {
panic(err)
}
}
return result.String()
}
// PostForm 发送post请求
func PostForm(urlStr string, data url.Values) (string, error) {
resp, err := http.PostForm(urlStr, data)
if err != nil {
// handle error
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
// handle error
}
return string(body), err
}
func CheckDirPath(path string, create bool) (exists bool, err error) {
exists = false
if path == "" {
err = errors.New(e.GetMsg(e.InvalidParams))
return
}
if _, err = os.Stat(path); os.IsNotExist(err) {
if !create {
return
}
if err = os.MkdirAll(path, os.ModePerm); err != nil {
return
}
}
exists = true
return
}