删除忽略文件

This commit is contained in:
戴育兵 2025-05-29 14:28:00 +08:00
parent d0453c222d
commit f7a0e319b5
10 changed files with 225 additions and 67 deletions

8
.idea/.gitignore vendored
View File

@ -1,8 +0,0 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

File diff suppressed because one or more lines are too long

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxBlameSettings">
<option name="version" value="2" />
</component>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/fonchain-fiee.iml" filepath="$PROJECT_DIR$/.idea/fonchain-fiee.iml" />
</modules>
</component>
</project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -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,
},

View File

@ -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
}

View File

@ -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",

22
pkg/service/cast/work.go Normal file
View File

@ -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
}