解决冲突

This commit is contained in:
lzh 2025-06-14 10:33:53 +08:00
parent 8196e14159
commit 4f9f8e66db
4 changed files with 1484 additions and 619 deletions

File diff suppressed because it is too large Load Diff

View File

@ -334,3 +334,31 @@ func (this *AddBundleBalanceReq) Validate() error {
func (this *AddBundleBalanceResp) Validate() error { func (this *AddBundleBalanceResp) Validate() error {
return nil return nil
} }
func (this *GetUsedRecordListReq) Validate() error {
return nil
}
func (this *GetUsedRecordListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *WorkCastItem) Validate() error {
return nil
}
func (this *GetImageWorkDetailReq) Validate() error {
return nil
}
func (this *GetVedioWorkDetailReq) Validate() error {
return nil
}
func (this *GetImageWorkDetailResp) Validate() error {
return nil
}
func (this *GetVedioeWorkDetailResp) Validate() error {
return nil
}

View File

@ -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.8
// - protoc v4.24.0--rc1 // - protoc v3.20.3
// source: pb/bundle.proto // source: pb/bundle.proto
package bundle package bundle
@ -46,11 +46,11 @@ type BundleClient interface {
CreateOrderAddRecord(ctx context.Context, in *OrderAddRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) CreateOrderAddRecord(ctx context.Context, in *OrderAddRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
PackagePriceAndTime(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*PackagePriceAndTimeResponse, common.ErrorWithAttachment) PackagePriceAndTime(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*PackagePriceAndTimeResponse, common.ErrorWithAttachment)
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment) OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, 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)
//新增值服务 // 新增值服务
SaveValueAddService(ctx context.Context, in *ValueAddServiceLang, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment) SaveValueAddService(ctx context.Context, in *ValueAddServiceLang, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment)
ValueAddServiceList(ctx context.Context, in *ValueAddServiceListRequest, opts ...grpc_go.CallOption) (*ValueAddServiceListResponse, common.ErrorWithAttachment) ValueAddServiceList(ctx context.Context, in *ValueAddServiceListRequest, opts ...grpc_go.CallOption) (*ValueAddServiceListResponse, common.ErrorWithAttachment)
ValueAddServiceDetail(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceDetailResponse, common.ErrorWithAttachment) ValueAddServiceDetail(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceDetailResponse, common.ErrorWithAttachment)
@ -62,7 +62,10 @@ type BundleClient interface {
GetBundleBalanceList(ctx context.Context, in *GetBundleBalanceListReq, opts ...grpc_go.CallOption) (*GetBundleBalanceListResp, common.ErrorWithAttachment) GetBundleBalanceList(ctx context.Context, in *GetBundleBalanceListReq, opts ...grpc_go.CallOption) (*GetBundleBalanceListResp, common.ErrorWithAttachment)
CreateBundleBalance(ctx context.Context, in *CreateBundleBalanceReq, opts ...grpc_go.CallOption) (*CreateBundleBalanceResp, common.ErrorWithAttachment) CreateBundleBalance(ctx context.Context, in *CreateBundleBalanceReq, opts ...grpc_go.CallOption) (*CreateBundleBalanceResp, common.ErrorWithAttachment)
AddBundleBalance(ctx context.Context, in *AddBundleBalanceReq, opts ...grpc_go.CallOption) (*AddBundleBalanceResp, common.ErrorWithAttachment) AddBundleBalance(ctx context.Context, in *AddBundleBalanceReq, opts ...grpc_go.CallOption) (*AddBundleBalanceResp, common.ErrorWithAttachment)
GetBundleBalance(ctx context.Context, in *GetBundleBalanceReq, opts ...grpc_go.CallOption) (*GetBundleBalanceResp, common.ErrorWithAttachment) // 使用记录
GetUsedRecordList(ctx context.Context, in *GetUsedRecordListReq, opts ...grpc_go.CallOption) (*GetUsedRecordListResp, common.ErrorWithAttachment)
GetImageWorkDetail(ctx context.Context, in *GetImageWorkDetailReq, opts ...grpc_go.CallOption) (*GetImageWorkDetailResp, common.ErrorWithAttachment)
GetVedioWorkDetail(ctx context.Context, in *GetVedioWorkDetailReq, opts ...grpc_go.CallOption) (*GetVedioeWorkDetailResp, common.ErrorWithAttachment)
} }
type bundleClient struct { type bundleClient struct {
@ -101,7 +104,9 @@ type BundleClientImpl struct {
GetBundleBalanceList func(ctx context.Context, in *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error) GetBundleBalanceList func(ctx context.Context, in *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
CreateBundleBalance func(ctx context.Context, in *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error) CreateBundleBalance func(ctx context.Context, in *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error)
AddBundleBalance func(ctx context.Context, in *AddBundleBalanceReq) (*AddBundleBalanceResp, error) AddBundleBalance func(ctx context.Context, in *AddBundleBalanceReq) (*AddBundleBalanceResp, error)
GetBundleBalance func(ctx context.Context, in *GetBundleBalanceReq) (*GetBundleBalanceResp, error) GetUsedRecordList func(ctx context.Context, in *GetUsedRecordListReq) (*GetUsedRecordListResp, error)
GetImageWorkDetail func(ctx context.Context, in *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
GetVedioWorkDetail func(ctx context.Context, in *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
} }
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient { func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
@ -302,10 +307,22 @@ func (c *bundleClient) AddBundleBalance(ctx context.Context, in *AddBundleBalanc
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddBundleBalance", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddBundleBalance", in, out)
} }
func (c *bundleClient) GetBundleBalance(ctx context.Context, in *GetBundleBalanceReq, opts ...grpc_go.CallOption) (*GetBundleBalanceResp, common.ErrorWithAttachment) { func (c *bundleClient) GetUsedRecordList(ctx context.Context, in *GetUsedRecordListReq, opts ...grpc_go.CallOption) (*GetUsedRecordListResp, common.ErrorWithAttachment) {
out := new(GetBundleBalanceResp) out := new(GetUsedRecordListResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string) interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetBundleBalance", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetUsedRecordList", in, out)
}
func (c *bundleClient) GetImageWorkDetail(ctx context.Context, in *GetImageWorkDetailReq, opts ...grpc_go.CallOption) (*GetImageWorkDetailResp, common.ErrorWithAttachment) {
out := new(GetImageWorkDetailResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetImageWorkDetail", in, out)
}
func (c *bundleClient) GetVedioWorkDetail(ctx context.Context, in *GetVedioWorkDetailReq, opts ...grpc_go.CallOption) (*GetVedioeWorkDetailResp, common.ErrorWithAttachment) {
out := new(GetVedioeWorkDetailResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetVedioWorkDetail", in, out)
} }
// BundleServer is the server API for Bundle service. // BundleServer is the server API for Bundle service.
@ -330,11 +347,11 @@ type BundleServer interface {
CreateOrderAddRecord(context.Context, *OrderAddRecord) (*CommonResponse, error) CreateOrderAddRecord(context.Context, *OrderAddRecord) (*CommonResponse, error)
PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error) PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error)
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error) OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, 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)
//新增值服务 // 新增值服务
SaveValueAddService(context.Context, *ValueAddServiceLang) (*SaveResponse, error) SaveValueAddService(context.Context, *ValueAddServiceLang) (*SaveResponse, error)
ValueAddServiceList(context.Context, *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error) ValueAddServiceList(context.Context, *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
@ -346,7 +363,10 @@ type BundleServer interface {
GetBundleBalanceList(context.Context, *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error) GetBundleBalanceList(context.Context, *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
CreateBundleBalance(context.Context, *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error) CreateBundleBalance(context.Context, *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error)
AddBundleBalance(context.Context, *AddBundleBalanceReq) (*AddBundleBalanceResp, error) AddBundleBalance(context.Context, *AddBundleBalanceReq) (*AddBundleBalanceResp, error)
GetBundleBalance(context.Context, *GetBundleBalanceReq) (*GetBundleBalanceResp, error) // 使用记录
GetUsedRecordList(context.Context, *GetUsedRecordListReq) (*GetUsedRecordListResp, error)
GetImageWorkDetail(context.Context, *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
GetVedioWorkDetail(context.Context, *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
mustEmbedUnimplementedBundleServer() mustEmbedUnimplementedBundleServer()
} }
@ -448,8 +468,14 @@ func (UnimplementedBundleServer) CreateBundleBalance(context.Context, *CreateBun
func (UnimplementedBundleServer) AddBundleBalance(context.Context, *AddBundleBalanceReq) (*AddBundleBalanceResp, error) { func (UnimplementedBundleServer) AddBundleBalance(context.Context, *AddBundleBalanceReq) (*AddBundleBalanceResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddBundleBalance not implemented") return nil, status.Errorf(codes.Unimplemented, "method AddBundleBalance not implemented")
} }
func (UnimplementedBundleServer) GetBundleBalance(context.Context, *GetBundleBalanceReq) (*GetBundleBalanceResp, error) { func (UnimplementedBundleServer) GetUsedRecordList(context.Context, *GetUsedRecordListReq) (*GetUsedRecordListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBundleBalance not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetUsedRecordList not implemented")
}
func (UnimplementedBundleServer) GetImageWorkDetail(context.Context, *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetImageWorkDetail not implemented")
}
func (UnimplementedBundleServer) GetVedioWorkDetail(context.Context, *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVedioWorkDetail not implemented")
} }
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) { func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl s.proxyImpl = impl
@ -1378,8 +1404,8 @@ func _Bundle_AddBundleBalance_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Bundle_GetBundleBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { func _Bundle_GetUsedRecordList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBundleBalanceReq) in := new(GetUsedRecordListReq)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
@ -1391,7 +1417,65 @@ func _Bundle_GetBundleBalance_Handler(srv interface{}, ctx context.Context, dec
for k, v := range md { for k, v := range md {
invAttachment[k] = v invAttachment[k] = v
} }
invo := invocation.NewRPCInvocation("GetBundleBalance", args, invAttachment) invo := invocation.NewRPCInvocation("GetUsedRecordList", 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_GetImageWorkDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetImageWorkDetailReq)
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("GetImageWorkDetail", 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_GetVedioWorkDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVedioWorkDetailReq)
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("GetVedioWorkDetail", args, invAttachment)
if interceptor == nil { if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo) result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error() return result, result.Error()
@ -1539,8 +1623,16 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
Handler: _Bundle_AddBundleBalance_Handler, Handler: _Bundle_AddBundleBalance_Handler,
}, },
{ {
MethodName: "GetBundleBalance", MethodName: "GetUsedRecordList",
Handler: _Bundle_GetBundleBalance_Handler, Handler: _Bundle_GetUsedRecordList_Handler,
},
{
MethodName: "GetImageWorkDetail",
Handler: _Bundle_GetImageWorkDetail_Handler,
},
{
MethodName: "GetVedioWorkDetail",
Handler: _Bundle_GetVedioWorkDetail_Handler,
}, },
}, },
Streams: []grpc_go.StreamDesc{}, Streams: []grpc_go.StreamDesc{},

View File

@ -37,12 +37,12 @@ func BundleExtendRecordsList(c *gin.Context) {
} }
func GetBundleBalance(c *gin.Context) { func GetBundleBalance(c *gin.Context) {
var req bundle.GetBundleBalanceReq var req bundle.GetBundleBalanceListReq
if err := c.ShouldBindJSON(&req); err != nil { if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, err) service.Error(c, err)
return return
} }
res, err := service.BundleProvider.GetBundleBalance(context.Background(), &req) res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req)
if err != nil { if err != nil {
service.Error(c, err) service.Error(c, err)
return return