Compare commits
No commits in common. "9dace756a1032965f808162d4b3a5471cd151602" and "0f848942647d3dbc2049b61b8ce758ab33885c8e" have entirely different histories.
9dace756a1
...
0f84894264
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -116,6 +116,3 @@ func (this *ValueAddBundleDetailResponse) Validate() error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *FinancialConfirmationRequest) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-triple v1.0.8
|
// - protoc-gen-go-triple v1.0.5
|
||||||
// - protoc v3.10.1
|
// - protoc v3.21.8
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
@ -38,8 +38,7 @@ type BundleClient interface {
|
|||||||
UpdateOrderRecordByOrderNo(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)
|
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)
|
OrderRecordsDetail(ctx context.Context, in *OrderRecordsDetailRequest, opts ...grpc_go.CallOption) (*OrderRecordsDetailResponse, common.ErrorWithAttachment)
|
||||||
UpdateFinancialConfirmationStatus(ctx context.Context, in *FinancialConfirmationRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
// 增值套餐
|
||||||
//增值套餐
|
|
||||||
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
|
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
|
||||||
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
||||||
ValueAddBundleDetail(ctx context.Context, in *ValueAddBundleDetailRequest, opts ...grpc_go.CallOption) (*ValueAddBundleDetailResponse, common.ErrorWithAttachment)
|
ValueAddBundleDetail(ctx context.Context, in *ValueAddBundleDetailRequest, opts ...grpc_go.CallOption) (*ValueAddBundleDetailResponse, common.ErrorWithAttachment)
|
||||||
@ -50,20 +49,19 @@ type bundleClient struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type BundleClientImpl struct {
|
type BundleClientImpl struct {
|
||||||
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||||
UpdateBundle 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)
|
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
|
||||||
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||||
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||||
CreateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
CreateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||||
UpdateOrderRecord 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)
|
UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||||
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||||
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
||||||
UpdateFinancialConfirmationStatus func(ctx context.Context, in *FinancialConfirmationRequest) (*CommonResponse, error)
|
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||||
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||||
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||||
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
||||||
@ -138,12 +136,6 @@ func (c *bundleClient) OrderRecordsDetail(ctx context.Context, in *OrderRecordsD
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OrderRecordsDetail", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OrderRecordsDetail", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *bundleClient) UpdateFinancialConfirmationStatus(ctx context.Context, in *FinancialConfirmationRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
|
||||||
out := new(CommonResponse)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateFinancialConfirmationStatus", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) {
|
func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) {
|
||||||
out := new(CreateValueAddBundleResponse)
|
out := new(CreateValueAddBundleResponse)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -176,8 +168,7 @@ type BundleServer interface {
|
|||||||
UpdateOrderRecordByOrderNo(context.Context, *OrderRecord) (*CommonResponse, error)
|
UpdateOrderRecordByOrderNo(context.Context, *OrderRecord) (*CommonResponse, error)
|
||||||
OrderRecordsList(context.Context, *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
OrderRecordsList(context.Context, *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||||
OrderRecordsDetail(context.Context, *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
OrderRecordsDetail(context.Context, *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
||||||
UpdateFinancialConfirmationStatus(context.Context, *FinancialConfirmationRequest) (*CommonResponse, error)
|
// 增值套餐
|
||||||
//增值套餐
|
|
||||||
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||||
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||||
ValueAddBundleDetail(context.Context, *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
ValueAddBundleDetail(context.Context, *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||||
@ -219,9 +210,6 @@ func (UnimplementedBundleServer) OrderRecordsList(context.Context, *OrderRecords
|
|||||||
func (UnimplementedBundleServer) OrderRecordsDetail(context.Context, *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error) {
|
func (UnimplementedBundleServer) OrderRecordsDetail(context.Context, *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method OrderRecordsDetail not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method OrderRecordsDetail not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedBundleServer) UpdateFinancialConfirmationStatus(context.Context, *FinancialConfirmationRequest) (*CommonResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateFinancialConfirmationStatus not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) {
|
func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
|
||||||
}
|
}
|
||||||
@ -549,35 +537,6 @@ func _Bundle_OrderRecordsDetail_Handler(srv interface{}, ctx context.Context, de
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Bundle_UpdateFinancialConfirmationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(FinancialConfirmationRequest)
|
|
||||||
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("UpdateFinancialConfirmationStatus", 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_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Bundle_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(CreateValueAddBundleRequest)
|
in := new(CreateValueAddBundleRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -712,10 +671,6 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "OrderRecordsDetail",
|
MethodName: "OrderRecordsDetail",
|
||||||
Handler: _Bundle_OrderRecordsDetail_Handler,
|
Handler: _Bundle_OrderRecordsDetail_Handler,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
MethodName: "UpdateFinancialConfirmationStatus",
|
|
||||||
Handler: _Bundle_UpdateFinancialConfirmationStatus_Handler,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
MethodName: "CreateValueAddBundle",
|
MethodName: "CreateValueAddBundle",
|
||||||
Handler: _Bundle_CreateValueAddBundle_Handler,
|
Handler: _Bundle_CreateValueAddBundle_Handler,
|
||||||
|
@ -22,7 +22,4 @@ RedisDBNAme = "1"
|
|||||||
[ai]
|
[ai]
|
||||||
Host = "https://erpapi.fontree.cn"
|
Host = "https://erpapi.fontree.cn"
|
||||||
TelNum = "18021272627"
|
TelNum = "18021272627"
|
||||||
Password = "Gy.123456"
|
Password = "Gy.123456"
|
||||||
|
|
||||||
[service]
|
|
||||||
IsHTTPS = false
|
|
BIN
cmd/runtime/20250327190746.pdf
Normal file
BIN
cmd/runtime/20250327190746.pdf
Normal file
Binary file not shown.
BIN
cmd/runtime/20250327190821.pdf
Normal file
BIN
cmd/runtime/20250327190821.pdf
Normal file
Binary file not shown.
BIN
cmd/runtime/20250328174612.pdf
Normal file
BIN
cmd/runtime/20250328174612.pdf
Normal file
Binary file not shown.
BIN
cmd/runtime/20250328174729.pdf
Normal file
BIN
cmd/runtime/20250328174729.pdf
Normal file
Binary file not shown.
@ -30,7 +30,4 @@ RedisDBNAme = "2"
|
|||||||
[ai]
|
[ai]
|
||||||
Host = "https://erpapi.fontree.cn"
|
Host = "https://erpapi.fontree.cn"
|
||||||
TelNum = "18021272627"
|
TelNum = "18021272627"
|
||||||
Password = "Gy.123456"
|
Password = "Gy.123456"
|
||||||
|
|
||||||
[service]
|
|
||||||
IsHTTPS = false
|
|
5
go.mod
5
go.mod
@ -18,9 +18,8 @@ go 1.18
|
|||||||
//github.com/fonchain_enterprise/utils/jwt => ../utils/jwt
|
//github.com/fonchain_enterprise/utils/jwt => ../utils/jwt
|
||||||
//github.com/fonchain_enterprise/utils/logger => ../utils/logger
|
//github.com/fonchain_enterprise/utils/logger => ../utils/logger
|
||||||
//replace github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-新/utils/objstorage
|
//replace github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-新/utils/objstorage
|
||||||
|
|
||||||
replace github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
|
replace github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
|
||||||
//
|
|
||||||
require (
|
require (
|
||||||
dubbo.apache.org/dubbo-go/v3 v3.0.2
|
dubbo.apache.org/dubbo-go/v3 v3.0.2
|
||||||
github.com/dubbogo/grpc-go v1.42.9
|
github.com/dubbogo/grpc-go v1.42.9
|
||||||
@ -124,7 +123,6 @@ require (
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go v0.65.0 // indirect
|
cloud.google.com/go v0.65.0 // indirect
|
||||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1 // indirect
|
|
||||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect
|
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect
|
||||||
github.com/alibaba/sentinel-golang v1.0.4 // indirect
|
github.com/alibaba/sentinel-golang v1.0.4 // indirect
|
||||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect
|
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect
|
||||||
@ -162,7 +160,6 @@ require (
|
|||||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||||
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
|
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
|
||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
|
||||||
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect
|
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect
|
||||||
github.com/nxadm/tail v1.4.11 // indirect
|
github.com/nxadm/tail v1.4.11 // indirect
|
||||||
github.com/onsi/ginkgo v1.16.5 // indirect
|
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||||
|
5
go.sum
5
go.sum
@ -37,8 +37,6 @@ contrib.go.opencensus.io/exporter/prometheus v0.4.1/go.mod h1:t9wvfitlUjGXG2IXAZ
|
|||||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||||
dubbo.apache.org/dubbo-go/v3 v3.0.2 h1:+WuMFN6RSjXHT41QS1Xi5tFfaPuczIVoeQuKq7pISYI=
|
dubbo.apache.org/dubbo-go/v3 v3.0.2 h1:+WuMFN6RSjXHT41QS1Xi5tFfaPuczIVoeQuKq7pISYI=
|
||||||
dubbo.apache.org/dubbo-go/v3 v3.0.2/go.mod h1:bODgByAf72kzG/5YIfZIODXx81pY3gaAdIQ8B4mN/Yk=
|
dubbo.apache.org/dubbo-go/v3 v3.0.2/go.mod h1:bODgByAf72kzG/5YIfZIODXx81pY3gaAdIQ8B4mN/Yk=
|
||||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1 h1:l55mJb6rkkaUzOpSsgEeKYtS6/0gHwBYyfo5Jcjv/Ks=
|
|
||||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
|
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
|
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
|
||||||
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
@ -610,8 +608,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
|
|||||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
|
|
||||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
|
|
||||||
github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
|
github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
|
||||||
github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
|
github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
|
||||||
github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
|
github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
|
||||||
@ -817,7 +813,6 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS
|
|||||||
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
|
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
|
||||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||||
|
@ -23,12 +23,6 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
|||||||
bundleOrderClientRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
bundleOrderClientRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||||
}
|
}
|
||||||
|
|
||||||
bundleOrderWebRoute := bundleOrderRoute.Group("web")
|
|
||||||
{
|
|
||||||
bundleOrderWebRoute.POST("financial-confirm", bundle.UpdateFinancialConfirmationStatus)
|
|
||||||
bundleOrderWebRoute.POST("order-export", bundle.ExportOrderInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
bundleOrderAppRoute := bundleOrderRoute.Group("app")
|
bundleOrderAppRoute := bundleOrderRoute.Group("app")
|
||||||
{
|
{
|
||||||
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
|
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
|
||||||
|
@ -3,7 +3,6 @@ package bundle
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"fonchain-fiee/api/account"
|
"fonchain-fiee/api/account"
|
||||||
"fonchain-fiee/api/bundle"
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/api/order"
|
"fonchain-fiee/api/order"
|
||||||
@ -14,7 +13,6 @@ import (
|
|||||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||||
"math/big"
|
"math/big"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
@ -269,7 +267,6 @@ func OrderRecordsList(c *gin.Context) {
|
|||||||
orderRecord.CertificatePicture = userInfo.CertificatePicture
|
orderRecord.CertificatePicture = userInfo.CertificatePicture
|
||||||
orderRecord.PlaceOfResidence = userInfo.PlaceOfResidence
|
orderRecord.PlaceOfResidence = userInfo.PlaceOfResidence
|
||||||
orderRecord.GroupPhoto = userInfo.GroupPhoto
|
orderRecord.GroupPhoto = userInfo.GroupPhoto
|
||||||
orderRecord.TelNum = userInfo.TelNum
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,10 +283,10 @@ func OrderRecordsDetail(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
/*// 获取 用户信息
|
// 获取 用户信息
|
||||||
userInfo := login.GetUserInfoFromC(c)
|
userInfo := login.GetUserInfoFromC(c)
|
||||||
|
|
||||||
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)*/
|
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
|
||||||
|
|
||||||
res, err := service.BundleProvider.OrderRecordsDetail(context.Background(), &req)
|
res, err := service.BundleProvider.OrderRecordsDetail(context.Background(), &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -299,135 +296,3 @@ func OrderRecordsDetail(c *gin.Context) {
|
|||||||
|
|
||||||
service.Success(c, res)
|
service.Success(c, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
// web
|
|
||||||
func UpdateFinancialConfirmationStatus(c *gin.Context) {
|
|
||||||
var req bundle.FinancialConfirmationRequest
|
|
||||||
|
|
||||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 不限制 支付状态 未支付 也可确认
|
|
||||||
//detail, err := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
|
||||||
// OrderNo: req.OrderNo,
|
|
||||||
//})
|
|
||||||
//if err != nil {
|
|
||||||
// service.Error(c, err)
|
|
||||||
// return
|
|
||||||
//}
|
|
||||||
//if detail.OrderRecord.Status != bundleModel.OrderPaid {
|
|
||||||
// service.Error(c, errors.New("订单未支付,不可确认"))
|
|
||||||
// return
|
|
||||||
//}
|
|
||||||
|
|
||||||
res, err := service.BundleProvider.UpdateFinancialConfirmationStatus(context.Background(), &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
service.Success(c, res)
|
|
||||||
}
|
|
||||||
|
|
||||||
func ExportOrderInfo(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
|
|
||||||
}
|
|
||||||
|
|
||||||
rows := make([][]interface{}, 0)
|
|
||||||
|
|
||||||
for _, orderRecord := range res.OrderRecords {
|
|
||||||
if orderRecord.CustomerID != "" {
|
|
||||||
var userID uint64
|
|
||||||
userID, err = strconv.ParseUint(orderRecord.CustomerID, 10, 64)
|
|
||||||
if err != nil {
|
|
||||||
err = nil
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
userInfo, _ := service.AccountProvider.Info(context.Background(), &account.InfoRequest{
|
|
||||||
Domain: "app",
|
|
||||||
ID: userID,
|
|
||||||
})
|
|
||||||
if userInfo != nil {
|
|
||||||
orderRecord.Sex = userInfo.Sex
|
|
||||||
orderRecord.Nationality = userInfo.Nationality
|
|
||||||
orderRecord.TelNum = userInfo.TelNum
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
status := ""
|
|
||||||
if orderRecord.Status == bundleModel.OrderSigned {
|
|
||||||
status = "未支付"
|
|
||||||
} else if orderRecord.Status == bundleModel.OrderPaid {
|
|
||||||
status = "已支付"
|
|
||||||
}
|
|
||||||
financialConfirmation := ""
|
|
||||||
if orderRecord.FinancialConfirmation == bundleModel.UnConfirm {
|
|
||||||
financialConfirmation = "未确认"
|
|
||||||
} else if orderRecord.FinancialConfirmation == bundleModel.Confirmed {
|
|
||||||
financialConfirmation = "已确认"
|
|
||||||
}
|
|
||||||
|
|
||||||
rows = append(rows, []interface{}{
|
|
||||||
orderRecord.OrderNo,
|
|
||||||
orderRecord.CustomerNum,
|
|
||||||
orderRecord.CustomerName,
|
|
||||||
orderRecord.Sex,
|
|
||||||
orderRecord.TelNum,
|
|
||||||
orderRecord.Nationality,
|
|
||||||
orderRecord.BundleName,
|
|
||||||
orderRecord.SignedTime,
|
|
||||||
orderRecord.Amount,
|
|
||||||
orderRecord.Num,
|
|
||||||
orderRecord.ValueAddBundleAmount,
|
|
||||||
orderRecord.TotalAmount,
|
|
||||||
status,
|
|
||||||
orderRecord.PayTime,
|
|
||||||
financialConfirmation,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
dirPath := "./runtime"
|
|
||||||
|
|
||||||
filePath, err := logic.WriteToExcel(dirPath, rows)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var httpType string = "http" // Default to http
|
|
||||||
|
|
||||||
// Safely check if Origin exists in c.Keys
|
|
||||||
if origin, exists := c.Keys["Origin"]; exists && origin != nil {
|
|
||||||
originStr, ok := origin.(string)
|
|
||||||
if ok && originStr != "" {
|
|
||||||
fmt.Printf("c.Request.Origin %+v\n", originStr)
|
|
||||||
parts := strings.Split(originStr, ":")
|
|
||||||
if len(parts) > 0 {
|
|
||||||
httpType = parts[0]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Fallback: Check if the request was made over TLS
|
|
||||||
if c.Request.TLS != nil || c.Request.Header.Get("X-Forwarded-Proto") == "https" {
|
|
||||||
httpType = "https"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var exportUrl = strings.Replace(strings.Replace(filePath, ".", fmt.Sprintf("%s://%s", httpType, c.Request.Host), 1), "runtime", "static", 1)
|
|
||||||
//var exportUrl = fmt.Sprintf("%s%s/%s", httpType, c.Request.Host, dirPath + path)
|
|
||||||
fmt.Println("exportUrl : ", exportUrl)
|
|
||||||
service.Success(c, &bundleModel.ExportResponse{ExportUrl: exportUrl})
|
|
||||||
}
|
|
||||||
|
@ -21,10 +21,6 @@ const (
|
|||||||
InvalidValueAddBundleNum = "套餐数量无效"
|
InvalidValueAddBundleNum = "套餐数量无效"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
ErrorExportOrderInfo = "导出订单信息失败"
|
|
||||||
)
|
|
||||||
|
|
||||||
// stripe
|
// stripe
|
||||||
const (
|
const (
|
||||||
ErrorQueryStripeInfo = "查询支付信息失败"
|
ErrorQueryStripeInfo = "查询支付信息失败"
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
package logic
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"fonchain-fiee/pkg/service/bundle/common"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/360EntSecGroup-Skylar/excelize"
|
|
||||||
)
|
|
||||||
|
|
||||||
func WriteToExcel(dirPath string, orderInfos [][]interface{}) (string, error) {
|
|
||||||
headRow := []interface{}{"订单编号", "用户编号", "姓名", "性别", "手机号", "国籍", "套餐名称", "签署时间", "套餐费用", "增值服务视频条数", "增值金额", "总额", "支付状态", "支付时间", "财务确认状态"}
|
|
||||||
|
|
||||||
xlsx := excelize.NewFile()
|
|
||||||
index := "Sheet1"
|
|
||||||
|
|
||||||
style, _ := xlsx.NewStyle(`{"alignment":{
|
|
||||||
"horizontal":"center"
|
|
||||||
}}`)
|
|
||||||
|
|
||||||
xlsx.SetCellStyle(index, "A1", "A1", style)
|
|
||||||
|
|
||||||
xlsx.SetSheetRow(index, "A1", &headRow)
|
|
||||||
|
|
||||||
rowIndex := 2
|
|
||||||
for i := 0; i < len(orderInfos); i++ {
|
|
||||||
xlsx.SetCellStyle(index, fmt.Sprintf("A%v", rowIndex), fmt.Sprintf("O%v", rowIndex), style)
|
|
||||||
xlsx.SetSheetRow(index, fmt.Sprintf("A%v", rowIndex), &orderInfos[i])
|
|
||||||
rowIndex++
|
|
||||||
}
|
|
||||||
|
|
||||||
//path := dirPath + "/" + artShowInfo.ArtistName + "-" + artShowInfo.ShowSeq + "-price" + ".xlsx"
|
|
||||||
path := dirPath + "/orderInfo_" + time.Now().Format("20060102150405") + ".xlsx"
|
|
||||||
err := xlsx.SaveAs(path)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println("save rows err :", err)
|
|
||||||
return "", errors.New(common.ErrorExportOrderInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
return path, nil
|
|
||||||
}
|
|
@ -4,12 +4,3 @@ const (
|
|||||||
OrderSigned = 1
|
OrderSigned = 1
|
||||||
OrderPaid = 2
|
OrderPaid = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
UnConfirm = 1
|
|
||||||
Confirmed = 2
|
|
||||||
)
|
|
||||||
|
|
||||||
type ExportResponse struct {
|
|
||||||
ExportUrl string `json:"exportUrl"`
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user