From f7a0e319b516d878c2391eb42249fd28894e5755 Mon Sep 17 00:00:00 2001 From: daiyb <570956418@qq.com> Date: Thu, 29 May 2025 14:28:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=BF=BD=E7=95=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 8 -- .idea/AugmentWebviewStateStore.xml | 10 -- .idea/fonchain-fiee.iml | 9 -- .idea/git_toolbox_blame.xml | 6 - .idea/modules.xml | 8 -- .idea/vcs.xml | 6 - api/cast/cast.pb.go | 172 +++++++++++++++++++++++++---- api/cast/cast.validator.pb.go | 6 + api/cast/cast_triple.pb.go | 45 ++++++++ pkg/service/cast/work.go | 22 ++++ 10 files changed, 225 insertions(+), 67 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/AugmentWebviewStateStore.xml delete mode 100644 .idea/fonchain-fiee.iml delete mode 100644 .idea/git_toolbox_blame.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml create mode 100644 pkg/service/cast/work.go diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 35410ca..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# 默认忽略的文件 -/shelf/ -/workspace.xml -# 基于编辑器的 HTTP 客户端请求 -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/AugmentWebviewStateStore.xml b/.idea/AugmentWebviewStateStore.xml deleted file mode 100644 index 5b1d7f4..0000000 --- a/.idea/AugmentWebviewStateStore.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/fonchain-fiee.iml b/.idea/fonchain-fiee.iml deleted file mode 100644 index 5e764c4..0000000 --- a/.idea/fonchain-fiee.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml deleted file mode 100644 index 7dc1249..0000000 --- a/.idea/git_toolbox_blame.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 014788e..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/api/cast/cast.pb.go b/api/cast/cast.pb.go index 5bd308e..120b367 100644 --- a/api/cast/cast.pb.go +++ b/api/cast/cast.pb.go @@ -28,8 +28,9 @@ type UpdateMediaAccountReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` - BindUserID string `protobuf:"bytes,2,opt,name=bindUserID,proto3" json:"bindUserID,omitempty"` + Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` + BindUserID string `protobuf:"bytes,2,opt,name=bindUserID,proto3" json:"bindUserID,omitempty"` + AccountUuid string `protobuf:"bytes,3,opt,name=accountUuid,proto3" json:"accountUuid,omitempty"` } func (x *UpdateMediaAccountReq) Reset() { @@ -76,6 +77,13 @@ func (x *UpdateMediaAccountReq) GetBindUserID() string { return "" } +func (x *UpdateMediaAccountReq) GetAccountUuid() string { + if x != nil { + return x.AccountUuid + } + return "" +} + type UpdateMediaAccountResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -121,6 +129,112 @@ func (x *UpdateMediaAccountResp) GetAccountUuid() string { return "" } +type UpdateWorkReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` +} + +func (x *UpdateWorkReq) Reset() { + *x = UpdateWorkReq{} + mi := &file_pb_fiee_cast_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateWorkReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkReq) ProtoMessage() {} + +func (x *UpdateWorkReq) ProtoReflect() protoreflect.Message { + mi := &file_pb_fiee_cast_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateWorkReq.ProtoReflect.Descriptor instead. +func (*UpdateWorkReq) Descriptor() ([]byte, []int) { + return file_pb_fiee_cast_proto_rawDescGZIP(), []int{2} +} + +func (x *UpdateWorkReq) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *UpdateWorkReq) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *UpdateWorkReq) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +type UpdateWorkResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkUuid string `protobuf:"bytes,1,opt,name=workUuid,proto3" json:"workUuid,omitempty"` +} + +func (x *UpdateWorkResp) Reset() { + *x = UpdateWorkResp{} + mi := &file_pb_fiee_cast_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateWorkResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkResp) ProtoMessage() {} + +func (x *UpdateWorkResp) ProtoReflect() protoreflect.Message { + mi := &file_pb_fiee_cast_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateWorkResp.ProtoReflect.Descriptor instead. +func (*UpdateWorkResp) Descriptor() ([]byte, []int) { + return file_pb_fiee_cast_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateWorkResp) GetWorkUuid() string { + if x != nil { + return x.WorkUuid + } + return "" +} + var File_pb_fiee_cast_proto protoreflect.FileDescriptor var file_pb_fiee_cast_proto_rawDesc = []byte{ @@ -131,23 +245,37 @@ var file_pb_fiee_cast_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4d, 0x0a, 0x15, 0x55, 0x70, 0x64, + 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x69, - 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x3a, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x55, 0x75, 0x69, 0x64, 0x32, 0x59, 0x0a, 0x04, 0x43, 0x61, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x12, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, - 0x1c, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, - 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, - 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x16, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, + 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x0a, + 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x32, 0x94, 0x01, 0x0a, 0x04, + 0x43, 0x61, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x43, 0x61, 0x73, + 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x12, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43, 0x61, 0x73, + 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x00, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x3b, 0x63, 0x61, 0x73, + 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -162,16 +290,20 @@ func file_pb_fiee_cast_proto_rawDescGZIP() []byte { return file_pb_fiee_cast_proto_rawDescData } -var file_pb_fiee_cast_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_pb_fiee_cast_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_pb_fiee_cast_proto_goTypes = []any{ (*UpdateMediaAccountReq)(nil), // 0: Cast.UpdateMediaAccountReq (*UpdateMediaAccountResp)(nil), // 1: Cast.UpdateMediaAccountResp + (*UpdateWorkReq)(nil), // 2: Cast.UpdateWorkReq + (*UpdateWorkResp)(nil), // 3: Cast.UpdateWorkResp } var file_pb_fiee_cast_proto_depIdxs = []int32{ 0, // 0: Cast.Cast.UpdateMediaAccount:input_type -> Cast.UpdateMediaAccountReq - 1, // 1: Cast.Cast.UpdateMediaAccount:output_type -> Cast.UpdateMediaAccountResp - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type + 2, // 1: Cast.Cast.UpdateWork:input_type -> Cast.UpdateWorkReq + 1, // 2: Cast.Cast.UpdateMediaAccount:output_type -> Cast.UpdateMediaAccountResp + 3, // 3: Cast.Cast.UpdateWork:output_type -> Cast.UpdateWorkResp + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -188,7 +320,7 @@ func file_pb_fiee_cast_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pb_fiee_cast_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cast/cast.validator.pb.go b/api/cast/cast.validator.pb.go index 9ebe376..03fe2cd 100644 --- a/api/cast/cast.validator.pb.go +++ b/api/cast/cast.validator.pb.go @@ -23,3 +23,9 @@ func (this *UpdateMediaAccountReq) Validate() error { func (this *UpdateMediaAccountResp) Validate() error { return nil } +func (this *UpdateWorkReq) Validate() error { + return nil +} +func (this *UpdateWorkResp) Validate() error { + return nil +} diff --git a/api/cast/cast_triple.pb.go b/api/cast/cast_triple.pb.go index 280bf50..3314031 100644 --- a/api/cast/cast_triple.pb.go +++ b/api/cast/cast_triple.pb.go @@ -29,6 +29,7 @@ const _ = grpc_go.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type CastClient interface { UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment) + UpdateWork(ctx context.Context, in *UpdateWorkReq, opts ...grpc_go.CallOption) (*UpdateWorkResp, common.ErrorWithAttachment) } type castClient struct { @@ -37,6 +38,7 @@ type castClient struct { type CastClientImpl struct { UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) + UpdateWork func(ctx context.Context, in *UpdateWorkReq) (*UpdateWorkResp, error) } func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient { @@ -57,11 +59,18 @@ func (c *castClient) UpdateMediaAccount(ctx context.Context, in *UpdateMediaAcco return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateMediaAccount", in, out) } +func (c *castClient) UpdateWork(ctx context.Context, in *UpdateWorkReq, opts ...grpc_go.CallOption) (*UpdateWorkResp, common.ErrorWithAttachment) { + out := new(UpdateWorkResp) + interfaceKey := ctx.Value(constant.InterfaceKey).(string) + return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateWork", in, out) +} + // CastServer is the server API for Cast service. // All implementations must embed UnimplementedCastServer // for forward compatibility type CastServer interface { UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) + UpdateWork(context.Context, *UpdateWorkReq) (*UpdateWorkResp, error) mustEmbedUnimplementedCastServer() } @@ -73,6 +82,9 @@ type UnimplementedCastServer struct { func (UnimplementedCastServer) UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateMediaAccount not implemented") } +func (UnimplementedCastServer) UpdateWork(context.Context, *UpdateWorkReq) (*UpdateWorkResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateWork not implemented") +} func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) { s.proxyImpl = impl } @@ -130,6 +142,35 @@ func _Cast_UpdateMediaAccount_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Cast_UpdateWork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateWorkReq) + 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("UpdateWork", 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) +} + // Cast_ServiceDesc is the grpc_go.ServiceDesc for Cast service. // It's only intended for direct use with grpc_go.RegisterService, // and not to be introspected or modified (even as a copy) @@ -141,6 +182,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{ MethodName: "UpdateMediaAccount", Handler: _Cast_UpdateMediaAccount_Handler, }, + { + MethodName: "UpdateWork", + Handler: _Cast_UpdateWork_Handler, + }, }, Streams: []grpc_go.StreamDesc{}, Metadata: "pb/fiee/cast.proto", diff --git a/pkg/service/cast/work.go b/pkg/service/cast/work.go new file mode 100644 index 0000000..a9eb513 --- /dev/null +++ b/pkg/service/cast/work.go @@ -0,0 +1,22 @@ +package cast + +import ( + "fonchain-fiee/api/cast" + "fonchain-fiee/pkg/service" + "github.com/gin-gonic/gin" +) + +func UpdateWork(ctx *gin.Context) { + var req *cast.UpdateWorkReq + if err := ctx.ShouldBind(&req); err != nil { + service.Error(ctx, err) + return + } + resp, err := service.CastProvider.UpdateWork(ctx, req) + if err != nil { + service.Error(ctx, err) + return + } + service.Success(ctx, resp) + return +}