解决冲突

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 {
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.
// versions:
// - protoc-gen-go-triple v1.0.8
// - protoc v4.24.0--rc1
// - protoc v3.20.3
// source: pb/bundle.proto
package bundle
@ -62,7 +62,10 @@ type BundleClient interface {
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)
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 {
@ -101,7 +104,9 @@ type BundleClientImpl struct {
GetBundleBalanceList func(ctx context.Context, in *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
CreateBundleBalance func(ctx context.Context, in *CreateBundleBalanceReq) (*CreateBundleBalanceResp, 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 {
@ -302,10 +307,22 @@ func (c *bundleClient) AddBundleBalance(ctx context.Context, in *AddBundleBalanc
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) {
out := new(GetBundleBalanceResp)
func (c *bundleClient) GetUsedRecordList(ctx context.Context, in *GetUsedRecordListReq, opts ...grpc_go.CallOption) (*GetUsedRecordListResp, common.ErrorWithAttachment) {
out := new(GetUsedRecordListResp)
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.
@ -346,7 +363,10 @@ type BundleServer interface {
GetBundleBalanceList(context.Context, *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
CreateBundleBalance(context.Context, *CreateBundleBalanceReq) (*CreateBundleBalanceResp, 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()
}
@ -448,8 +468,14 @@ func (UnimplementedBundleServer) CreateBundleBalance(context.Context, *CreateBun
func (UnimplementedBundleServer) AddBundleBalance(context.Context, *AddBundleBalanceReq) (*AddBundleBalanceResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddBundleBalance not implemented")
}
func (UnimplementedBundleServer) GetBundleBalance(context.Context, *GetBundleBalanceReq) (*GetBundleBalanceResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBundleBalance not implemented")
func (UnimplementedBundleServer) GetUsedRecordList(context.Context, *GetUsedRecordListReq) (*GetUsedRecordListResp, error) {
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) {
s.proxyImpl = impl
@ -1378,8 +1404,8 @@ func _Bundle_AddBundleBalance_Handler(srv interface{}, ctx context.Context, dec
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) {
in := new(GetBundleBalanceReq)
func _Bundle_GetUsedRecordList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUsedRecordListReq)
if err := dec(in); err != nil {
return nil, err
}
@ -1391,7 +1417,65 @@ func _Bundle_GetBundleBalance_Handler(srv interface{}, ctx context.Context, dec
for k, v := range md {
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 {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
@ -1539,8 +1623,16 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
Handler: _Bundle_AddBundleBalance_Handler,
},
{
MethodName: "GetBundleBalance",
Handler: _Bundle_GetBundleBalance_Handler,
MethodName: "GetUsedRecordList",
Handler: _Bundle_GetUsedRecordList_Handler,
},
{
MethodName: "GetImageWorkDetail",
Handler: _Bundle_GetImageWorkDetail_Handler,
},
{
MethodName: "GetVedioWorkDetail",
Handler: _Bundle_GetVedioWorkDetail_Handler,
},
},
Streams: []grpc_go.StreamDesc{},

View File

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