添加审批

This commit is contained in:
戴育兵 2025-06-13 19:02:00 +08:00
commit 829928da9b
12 changed files with 525 additions and 94 deletions

View File

@ -76,6 +76,61 @@ func (PlatformIDENUM) EnumDescriptor() ([]byte, []int) {
return file_pb_fiee_cast_proto_rawDescGZIP(), []int{0} return file_pb_fiee_cast_proto_rawDescGZIP(), []int{0}
} }
type WorkActionENUM int32
const (
WorkActionENUM_NO_ACTION WorkActionENUM = 0
WorkActionENUM_CONFIRM WorkActionENUM = 1 // 确认
WorkActionENUM_APPROVAL WorkActionENUM = 2 // 审批
WorkActionENUM_APPROVAL_PASS WorkActionENUM = 3 // 审批通过
WorkActionENUM_APPROVAL_REJECT WorkActionENUM = 4 // 审批驳回
)
// Enum value maps for WorkActionENUM.
var (
WorkActionENUM_name = map[int32]string{
0: "NO_ACTION",
1: "CONFIRM",
2: "APPROVAL",
3: "APPROVAL_PASS",
4: "APPROVAL_REJECT",
}
WorkActionENUM_value = map[string]int32{
"NO_ACTION": 0,
"CONFIRM": 1,
"APPROVAL": 2,
"APPROVAL_PASS": 3,
"APPROVAL_REJECT": 4,
}
)
func (x WorkActionENUM) Enum() *WorkActionENUM {
p := new(WorkActionENUM)
*p = x
return p
}
func (x WorkActionENUM) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (WorkActionENUM) Descriptor() protoreflect.EnumDescriptor {
return file_pb_fiee_cast_proto_enumTypes[1].Descriptor()
}
func (WorkActionENUM) Type() protoreflect.EnumType {
return &file_pb_fiee_cast_proto_enumTypes[1]
}
func (x WorkActionENUM) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use WorkActionENUM.Descriptor instead.
func (WorkActionENUM) EnumDescriptor() ([]byte, []int) {
return file_pb_fiee_cast_proto_rawDescGZIP(), []int{1}
}
type MediaUserListReq struct { type MediaUserListReq struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -1282,6 +1337,83 @@ func (x *WorkDetailResp) GetApprovalID() string {
return "" return ""
} }
type UpdateStatusReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
WorkAction WorkActionENUM `protobuf:"varint,1,opt,name=workAction,proto3,enum=Cast.WorkActionENUM" json:"workAction"`
WorkUuid string `protobuf:"bytes,2,opt,name=workUuid,proto3" json:"workUuid"`
ApprovalID string `protobuf:"bytes,3,opt,name=approvalID,proto3" json:"approvalID"`
ConfirmRemark string `protobuf:"bytes,4,opt,name=confirmRemark,proto3" json:"confirmRemark"`
ConfirmStatus uint32 `protobuf:"varint,5,opt,name=confirmStatus,proto3" json:"confirmStatus"`
}
func (x *UpdateStatusReq) Reset() {
*x = UpdateStatusReq{}
mi := &file_pb_fiee_cast_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateStatusReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateStatusReq) ProtoMessage() {}
func (x *UpdateStatusReq) ProtoReflect() protoreflect.Message {
mi := &file_pb_fiee_cast_proto_msgTypes[15]
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 UpdateStatusReq.ProtoReflect.Descriptor instead.
func (*UpdateStatusReq) Descriptor() ([]byte, []int) {
return file_pb_fiee_cast_proto_rawDescGZIP(), []int{15}
}
func (x *UpdateStatusReq) GetWorkAction() WorkActionENUM {
if x != nil {
return x.WorkAction
}
return WorkActionENUM_NO_ACTION
}
func (x *UpdateStatusReq) GetWorkUuid() string {
if x != nil {
return x.WorkUuid
}
return ""
}
func (x *UpdateStatusReq) GetApprovalID() string {
if x != nil {
return x.ApprovalID
}
return ""
}
func (x *UpdateStatusReq) GetConfirmRemark() string {
if x != nil {
return x.ConfirmRemark
}
return ""
}
func (x *UpdateStatusReq) GetConfirmStatus() uint32 {
if x != nil {
return x.ConfirmStatus
}
return 0
}
type MediaUserListResp_Info struct { type MediaUserListResp_Info struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -1298,7 +1430,7 @@ type MediaUserListResp_Info struct {
func (x *MediaUserListResp_Info) Reset() { func (x *MediaUserListResp_Info) Reset() {
*x = MediaUserListResp_Info{} *x = MediaUserListResp_Info{}
mi := &file_pb_fiee_cast_proto_msgTypes[15] mi := &file_pb_fiee_cast_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -1310,7 +1442,7 @@ func (x *MediaUserListResp_Info) String() string {
func (*MediaUserListResp_Info) ProtoMessage() {} func (*MediaUserListResp_Info) ProtoMessage() {}
func (x *MediaUserListResp_Info) ProtoReflect() protoreflect.Message { func (x *MediaUserListResp_Info) ProtoReflect() protoreflect.Message {
mi := &file_pb_fiee_cast_proto_msgTypes[15] mi := &file_pb_fiee_cast_proto_msgTypes[16]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -1396,7 +1528,7 @@ type WorkListResp_Info struct {
func (x *WorkListResp_Info) Reset() { func (x *WorkListResp_Info) Reset() {
*x = WorkListResp_Info{} *x = WorkListResp_Info{}
mi := &file_pb_fiee_cast_proto_msgTypes[16] mi := &file_pb_fiee_cast_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -1408,7 +1540,7 @@ func (x *WorkListResp_Info) String() string {
func (*WorkListResp_Info) ProtoMessage() {} func (*WorkListResp_Info) ProtoMessage() {}
func (x *WorkListResp_Info) ProtoReflect() protoreflect.Message { func (x *WorkListResp_Info) ProtoReflect() protoreflect.Message {
mi := &file_pb_fiee_cast_proto_msgTypes[16] mi := &file_pb_fiee_cast_proto_msgTypes[17]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -1761,47 +1893,70 @@ var file_pb_fiee_cast_proto_rawDesc = []byte{
0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63,
0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f,
0x76, 0x61, 0x6c, 0x49, 0x44, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70,
0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x2a, 0x3f, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x22, 0xcf, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61,
0x6f, 0x72, 0x6d, 0x49, 0x44, 0x45, 0x4e, 0x55, 0x4d, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x34, 0x0a, 0x0a, 0x77,
0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x49, 0x4b, 0x54, 0x4f, 0x4b, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x59, 0x4f, 0x55, 0x54, 0x55, 0x42, 0x45, 0x10, 0x02, 0x12, 0x14, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f,
0x07, 0x0a, 0x03, 0x49, 0x4e, 0x53, 0x10, 0x03, 0x32, 0xa3, 0x04, 0x0a, 0x04, 0x43, 0x61, 0x73, 0x6e, 0x45, 0x4e, 0x55, 0x4d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f,
0x74, 0x12, 0x42, 0x0a, 0x0d, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20,
0x73, 0x74, 0x12, 0x16, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a,
0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x43, 0x61, 0x73, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28,
0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x49, 0x44, 0x12, 0x24, 0x0a,
0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x04,
0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x43, 0x61, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x6d,
0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x61, 0x72, 0x6b, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x53, 0x74,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x69, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2a, 0x3f, 0x0a, 0x0e, 0x50, 0x6c, 0x61,
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0d, 0x55, 0x6e, 0x62, 0x69, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x45, 0x4e, 0x55, 0x4d, 0x12, 0x0b, 0x0a, 0x07, 0x55,
0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x49, 0x4b, 0x54,
0x2e, 0x55, 0x6e, 0x62, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x65, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x59, 0x4f, 0x55, 0x54, 0x55, 0x42, 0x45, 0x10,
0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4e, 0x53, 0x10, 0x03, 0x2a, 0x62, 0x0a, 0x0e, 0x57, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x4e, 0x55, 0x4d, 0x12, 0x0d, 0x0a, 0x09,
0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x43, 0x61, 0x73, 0x4e, 0x4f, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43,
0x74, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x50, 0x52,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x4f, 0x56, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x55, 0x70, 0x41, 0x4c, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x50, 0x50,
0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x2e, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x04, 0x32, 0xe4,
0x04, 0x0a, 0x04, 0x43, 0x61, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x4d, 0x65, 0x64, 0x69, 0x61,
0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e,
0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
0x1a, 0x17, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x55, 0x73, 0x65,
0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 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, 0x41,
0x0a, 0x0d, 0x55, 0x6e, 0x62, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12,
0x16, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x62, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e,
0x61, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
0x00, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
0x12, 0x14, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x4d, 0x61, 0x6e, 0x61,
0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00,
0x12, 0x48, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6d,
0x61, 0x67, 0x65, 0x12, 0x18, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e,
0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x55, 0x70,
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x18, 0x2e,
0x73, 0x70, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x56,
0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x18, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65,
0x71, 0x1a, 0x19, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x73, 0x70, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74,
0x6f, 0x72, 0x6b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x33, 0x12, 0x11, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74,
0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x43, 0x61, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c,
0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x57, 0x6f, 0x72,
0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57,
0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43,
0x6c, 0x12, 0x13, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x57, 0x6f, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74,
0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0d, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x2e, 0x43, 0x61, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x5a, 0x0b, 0x2e, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x62, 0x06, 0x70, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 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 ( var (
@ -1816,60 +1971,65 @@ func file_pb_fiee_cast_proto_rawDescGZIP() []byte {
return file_pb_fiee_cast_proto_rawDescData return file_pb_fiee_cast_proto_rawDescData
} }
var file_pb_fiee_cast_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_pb_fiee_cast_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_pb_fiee_cast_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_pb_fiee_cast_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
var file_pb_fiee_cast_proto_goTypes = []any{ var file_pb_fiee_cast_proto_goTypes = []any{
(PlatformIDENUM)(0), // 0: Cast.PlatformIDENUM (PlatformIDENUM)(0), // 0: Cast.PlatformIDENUM
(*MediaUserListReq)(nil), // 1: Cast.MediaUserListReq (WorkActionENUM)(0), // 1: Cast.WorkActionENUM
(*MediaUserListResp)(nil), // 2: Cast.MediaUserListResp (*MediaUserListReq)(nil), // 2: Cast.MediaUserListReq
(*UpdateMediaAccountReq)(nil), // 3: Cast.UpdateMediaAccountReq (*MediaUserListResp)(nil), // 3: Cast.MediaUserListResp
(*UpdateMediaAccountResp)(nil), // 4: Cast.UpdateMediaAccountResp (*UpdateMediaAccountReq)(nil), // 4: Cast.UpdateMediaAccountReq
(*UnbindManagerReq)(nil), // 5: Cast.UnbindManagerReq (*UpdateMediaAccountResp)(nil), // 5: Cast.UpdateMediaAccountResp
(*BindManagerReq)(nil), // 6: Cast.BindManagerReq (*UnbindManagerReq)(nil), // 6: Cast.UnbindManagerReq
(*UpdateWorkImageReq)(nil), // 7: Cast.UpdateWorkImageReq (*BindManagerReq)(nil), // 7: Cast.BindManagerReq
(*UpdateWorkImageResp)(nil), // 8: Cast.UpdateWorkImageResp (*UpdateWorkImageReq)(nil), // 8: Cast.UpdateWorkImageReq
(*PublishConfig)(nil), // 9: Cast.PublishConfig (*UpdateWorkImageResp)(nil), // 9: Cast.UpdateWorkImageResp
(*UpdateWorkVideoReq)(nil), // 10: Cast.UpdateWorkVideoReq (*PublishConfig)(nil), // 10: Cast.PublishConfig
(*UpdateWorkVideoResp)(nil), // 11: Cast.UpdateWorkVideoResp (*UpdateWorkVideoReq)(nil), // 11: Cast.UpdateWorkVideoReq
(*WorkListReq)(nil), // 12: Cast.WorkListReq (*UpdateWorkVideoResp)(nil), // 12: Cast.UpdateWorkVideoResp
(*WorkListResp)(nil), // 13: Cast.WorkListResp (*WorkListReq)(nil), // 13: Cast.WorkListReq
(*WorkDetailReq)(nil), // 14: Cast.WorkDetailReq (*WorkListResp)(nil), // 14: Cast.WorkListResp
(*WorkDetailResp)(nil), // 15: Cast.WorkDetailResp (*WorkDetailReq)(nil), // 15: Cast.WorkDetailReq
(*MediaUserListResp_Info)(nil), // 16: Cast.MediaUserListResp.Info (*WorkDetailResp)(nil), // 16: Cast.WorkDetailResp
(*WorkListResp_Info)(nil), // 17: Cast.WorkListResp.Info (*UpdateStatusReq)(nil), // 17: Cast.UpdateStatusReq
(*emptypb.Empty)(nil), // 18: google.protobuf.Empty (*MediaUserListResp_Info)(nil), // 18: Cast.MediaUserListResp.Info
(*WorkListResp_Info)(nil), // 19: Cast.WorkListResp.Info
(*emptypb.Empty)(nil), // 20: google.protobuf.Empty
} }
var file_pb_fiee_cast_proto_depIdxs = []int32{ var file_pb_fiee_cast_proto_depIdxs = []int32{
0, // 0: Cast.MediaUserListReq.platformID:type_name -> Cast.PlatformIDENUM 0, // 0: Cast.MediaUserListReq.platformID:type_name -> Cast.PlatformIDENUM
16, // 1: Cast.MediaUserListResp.data:type_name -> Cast.MediaUserListResp.Info 18, // 1: Cast.MediaUserListResp.data:type_name -> Cast.MediaUserListResp.Info
0, // 2: Cast.UpdateMediaAccountReq.platformID:type_name -> Cast.PlatformIDENUM 0, // 2: Cast.UpdateMediaAccountReq.platformID:type_name -> Cast.PlatformIDENUM
0, // 3: Cast.UpdateWorkImageReq.platformIDs:type_name -> Cast.PlatformIDENUM 0, // 3: Cast.UpdateWorkImageReq.platformIDs:type_name -> Cast.PlatformIDENUM
9, // 4: Cast.UpdateWorkImageReq.publishConfig:type_name -> Cast.PublishConfig 10, // 4: Cast.UpdateWorkImageReq.publishConfig:type_name -> Cast.PublishConfig
0, // 5: Cast.UpdateWorkVideoReq.platformIDs:type_name -> Cast.PlatformIDENUM 0, // 5: Cast.UpdateWorkVideoReq.platformIDs:type_name -> Cast.PlatformIDENUM
9, // 6: Cast.UpdateWorkVideoReq.publishConfig:type_name -> Cast.PublishConfig 10, // 6: Cast.UpdateWorkVideoReq.publishConfig:type_name -> Cast.PublishConfig
17, // 7: Cast.WorkListResp.data:type_name -> Cast.WorkListResp.Info 19, // 7: Cast.WorkListResp.data:type_name -> Cast.WorkListResp.Info
9, // 8: Cast.WorkDetailResp.publishConfig:type_name -> Cast.PublishConfig 10, // 8: Cast.WorkDetailResp.publishConfig:type_name -> Cast.PublishConfig
1, // 9: Cast.Cast.MediaUserList:input_type -> Cast.MediaUserListReq 1, // 9: Cast.UpdateStatusReq.workAction:type_name -> Cast.WorkActionENUM
3, // 10: Cast.Cast.UpdateMediaAccount:input_type -> Cast.UpdateMediaAccountReq 2, // 10: Cast.Cast.MediaUserList:input_type -> Cast.MediaUserListReq
5, // 11: Cast.Cast.UnbindManager:input_type -> Cast.UnbindManagerReq 4, // 11: Cast.Cast.UpdateMediaAccount:input_type -> Cast.UpdateMediaAccountReq
6, // 12: Cast.Cast.BindManager:input_type -> Cast.BindManagerReq 6, // 12: Cast.Cast.UnbindManager:input_type -> Cast.UnbindManagerReq
7, // 13: Cast.Cast.UpdateWorkImage:input_type -> Cast.UpdateWorkImageReq 7, // 13: Cast.Cast.BindManager:input_type -> Cast.BindManagerReq
10, // 14: Cast.Cast.UpdateWorkVideo:input_type -> Cast.UpdateWorkVideoReq 8, // 14: Cast.Cast.UpdateWorkImage:input_type -> Cast.UpdateWorkImageReq
12, // 15: Cast.Cast.WorkList:input_type -> Cast.WorkListReq 11, // 15: Cast.Cast.UpdateWorkVideo:input_type -> Cast.UpdateWorkVideoReq
14, // 16: Cast.Cast.WorkDetail:input_type -> Cast.WorkDetailReq 13, // 16: Cast.Cast.WorkList:input_type -> Cast.WorkListReq
2, // 17: Cast.Cast.MediaUserList:output_type -> Cast.MediaUserListResp 15, // 17: Cast.Cast.WorkDetail:input_type -> Cast.WorkDetailReq
4, // 18: Cast.Cast.UpdateMediaAccount:output_type -> Cast.UpdateMediaAccountResp 17, // 18: Cast.Cast.UpdateStatus:input_type -> Cast.UpdateStatusReq
18, // 19: Cast.Cast.UnbindManager:output_type -> google.protobuf.Empty 3, // 19: Cast.Cast.MediaUserList:output_type -> Cast.MediaUserListResp
18, // 20: Cast.Cast.BindManager:output_type -> google.protobuf.Empty 5, // 20: Cast.Cast.UpdateMediaAccount:output_type -> Cast.UpdateMediaAccountResp
8, // 21: Cast.Cast.UpdateWorkImage:output_type -> Cast.UpdateWorkImageResp 20, // 21: Cast.Cast.UnbindManager:output_type -> google.protobuf.Empty
11, // 22: Cast.Cast.UpdateWorkVideo:output_type -> Cast.UpdateWorkVideoResp 20, // 22: Cast.Cast.BindManager:output_type -> google.protobuf.Empty
13, // 23: Cast.Cast.WorkList:output_type -> Cast.WorkListResp 9, // 23: Cast.Cast.UpdateWorkImage:output_type -> Cast.UpdateWorkImageResp
15, // 24: Cast.Cast.WorkDetail:output_type -> Cast.WorkDetailResp 12, // 24: Cast.Cast.UpdateWorkVideo:output_type -> Cast.UpdateWorkVideoResp
17, // [17:25] is the sub-list for method output_type 14, // 25: Cast.Cast.WorkList:output_type -> Cast.WorkListResp
9, // [9:17] is the sub-list for method input_type 16, // 26: Cast.Cast.WorkDetail:output_type -> Cast.WorkDetailResp
9, // [9:9] is the sub-list for extension type_name 20, // 27: Cast.Cast.UpdateStatus:output_type -> google.protobuf.Empty
9, // [9:9] is the sub-list for extension extendee 19, // [19:28] is the sub-list for method output_type
0, // [0:9] is the sub-list for field type_name 10, // [10:19] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
} }
func init() { file_pb_fiee_cast_proto_init() } func init() { file_pb_fiee_cast_proto_init() }
@ -1882,8 +2042,8 @@ func file_pb_fiee_cast_proto_init() {
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_fiee_cast_proto_rawDesc, RawDescriptor: file_pb_fiee_cast_proto_rawDesc,
NumEnums: 1, NumEnums: 2,
NumMessages: 17, NumMessages: 18,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },

View File

@ -1832,6 +1832,116 @@ var _ interface {
ErrorName() string ErrorName() string
} = WorkDetailRespValidationError{} } = WorkDetailRespValidationError{}
// Validate checks the field values on UpdateStatusReq with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *UpdateStatusReq) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on UpdateStatusReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// UpdateStatusReqMultiError, or nil if none found.
func (m *UpdateStatusReq) ValidateAll() error {
return m.validate(true)
}
func (m *UpdateStatusReq) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for WorkAction
// no validation rules for WorkUuid
// no validation rules for ApprovalID
// no validation rules for ConfirmRemark
// no validation rules for ConfirmStatus
if len(errors) > 0 {
return UpdateStatusReqMultiError(errors)
}
return nil
}
// UpdateStatusReqMultiError is an error wrapping multiple validation errors
// returned by UpdateStatusReq.ValidateAll() if the designated constraints
// aren't met.
type UpdateStatusReqMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UpdateStatusReqMultiError) Error() string {
var msgs []string
for _, err := range m {
msgs = append(msgs, err.Error())
}
return strings.Join(msgs, "; ")
}
// AllErrors returns a list of validation violation errors.
func (m UpdateStatusReqMultiError) AllErrors() []error { return m }
// UpdateStatusReqValidationError is the validation error returned by
// UpdateStatusReq.Validate if the designated constraints aren't met.
type UpdateStatusReqValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e UpdateStatusReqValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e UpdateStatusReqValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e UpdateStatusReqValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e UpdateStatusReqValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e UpdateStatusReqValidationError) ErrorName() string { return "UpdateStatusReqValidationError" }
// Error satisfies the builtin error interface
func (e UpdateStatusReqValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sUpdateStatusReq.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = UpdateStatusReqValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = UpdateStatusReqValidationError{}
// Validate checks the field values on MediaUserListResp_Info with the rules // Validate checks the field values on MediaUserListResp_Info with the rules
// defined in the proto definition for this message. If any rules are // defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations. // violated, the first error encountered is returned, or nil if there are no violations.

View File

@ -37,6 +37,7 @@ type CastClient interface {
UpdateWorkVideo(ctx context.Context, in *UpdateWorkVideoReq, opts ...grpc_go.CallOption) (*UpdateWorkVideoResp, common.ErrorWithAttachment) UpdateWorkVideo(ctx context.Context, in *UpdateWorkVideoReq, opts ...grpc_go.CallOption) (*UpdateWorkVideoResp, common.ErrorWithAttachment)
WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment) WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment)
WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment) WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment)
UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
} }
type castClient struct { type castClient struct {
@ -52,6 +53,7 @@ type CastClientImpl struct {
UpdateWorkVideo func(ctx context.Context, in *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error) UpdateWorkVideo func(ctx context.Context, in *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error) WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error)
WorkDetail func(ctx context.Context, in *WorkDetailReq) (*WorkDetailResp, error) WorkDetail func(ctx context.Context, in *WorkDetailReq) (*WorkDetailResp, error)
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
} }
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient { func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
@ -114,6 +116,12 @@ func (c *castClient) WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkDetail", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkDetail", in, out)
} }
func (c *castClient) UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateStatus", in, out)
}
// CastServer is the server API for Cast service. // CastServer is the server API for Cast service.
// All implementations must embed UnimplementedCastServer // All implementations must embed UnimplementedCastServer
// for forward compatibility // for forward compatibility
@ -126,6 +134,7 @@ type CastServer interface {
UpdateWorkVideo(context.Context, *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error) UpdateWorkVideo(context.Context, *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
WorkList(context.Context, *WorkListReq) (*WorkListResp, error) WorkList(context.Context, *WorkListReq) (*WorkListResp, error)
WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error) WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error)
UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error)
mustEmbedUnimplementedCastServer() mustEmbedUnimplementedCastServer()
} }
@ -158,6 +167,9 @@ func (UnimplementedCastServer) WorkList(context.Context, *WorkListReq) (*WorkLis
func (UnimplementedCastServer) WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error) { func (UnimplementedCastServer) WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method WorkDetail not implemented") return nil, status.Errorf(codes.Unimplemented, "method WorkDetail not implemented")
} }
func (UnimplementedCastServer) UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateStatus not implemented")
}
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) { func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl s.proxyImpl = impl
} }
@ -418,6 +430,35 @@ func _Cast_WorkDetail_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Cast_UpdateStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateStatusReq)
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("UpdateStatus", 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. // Cast_ServiceDesc is the grpc_go.ServiceDesc for Cast service.
// It's only intended for direct use with grpc_go.RegisterService, // It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
@ -457,6 +498,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "WorkDetail", MethodName: "WorkDetail",
Handler: _Cast_WorkDetail_Handler, Handler: _Cast_WorkDetail_Handler,
}, },
{
MethodName: "UpdateStatus",
Handler: _Cast_UpdateStatus_Handler,
},
}, },
Streams: []grpc_go.StreamDesc{}, Streams: []grpc_go.StreamDesc{},
Metadata: "pb/fiee/cast.proto", Metadata: "pb/fiee/cast.proto",

View File

@ -115,6 +115,7 @@ type System struct {
Host string Host string
RedirectUri string RedirectUri string
Domain string Domain string
ErpHost string
} }
type Oss struct { type Oss struct {
AccessKeyId string AccessKeyId string

View File

@ -4,7 +4,7 @@ AppMode = "dev"
HttpPort = ":8085" HttpPort = ":8085"
Host = "https://common.szjixun.cn" Host = "https://common.szjixun.cn"
RedirectUri = "/api/redirect/url" RedirectUri = "/api/redirect/url"
ErpHost = "http://114.218.158.24:9020"
[bos] [bos]
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe" Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
Sk = "d2ecaa9d75114d3b9f42b99014198306" Sk = "d2ecaa9d75114d3b9f42b99014198306"

View File

@ -4,7 +4,7 @@ AppMode = "prod"
HttpPort = ":8085" HttpPort = ":8085"
Host = "https://common.szjixun.cn" Host = "https://common.szjixun.cn"
RedirectUri = "/api/redirect/url" RedirectUri = "/api/redirect/url"
ErpHost = "https://erpapi.fontree.cn"
[bos] [bos]
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe" Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
Sk = "d2ecaa9d75114d3b9f42b99014198306" Sk = "d2ecaa9d75114d3b9f42b99014198306"

View File

@ -4,7 +4,7 @@ AppMode = "test"
HttpPort = ":8085" HttpPort = ":8085"
Host = "https://common.szjixun.cn" Host = "https://common.szjixun.cn"
RedirectUri = "/api/redirect/url" RedirectUri = "/api/redirect/url"
ErpHost = "http://114.218.158.24:9020"
[bos] [bos]
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe" Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
Sk = "d2ecaa9d75114d3b9f42b99014198306" Sk = "d2ecaa9d75114d3b9f42b99014198306"

View File

@ -0,0 +1,24 @@
package cast
type ApprovalDetailResponse struct {
Status int `json:"status"`
Data Data `json:"data"`
Msg string `json:"msg"`
Code int `json:"code"`
Error *string `json:"error"`
Err string `json:"err"`
Keys []string `json:"keys"`
Positions *interface{} `json:"positions"`
}
type Data struct {
Count int `json:"Count"`
Data []Item `json:"data"`
Status int `json:"Status"`
}
type Item struct {
ID int `json:"ID"`
Domain string `json:"Domain"`
Status int `json:"Status"`
}

View File

@ -23,6 +23,7 @@ func MediaRouter(r *gin.RouterGroup) {
{ {
work.POST("update-work-image", serviceCast.UpdateWorkImage) work.POST("update-work-image", serviceCast.UpdateWorkImage)
work.POST("update-work-video", serviceCast.UpdateWorkVideo) work.POST("update-work-video", serviceCast.UpdateWorkVideo)
work.POST("update-approval", serviceCast.UpdateApproval)
work.POST("list", serviceCast.WorkList) work.POST("list", serviceCast.WorkList)
work.POST("detail", serviceCast.WorkDetail) work.POST("detail", serviceCast.WorkDetail)
} }

View File

@ -0,0 +1,39 @@
package cast
import (
"encoding/json"
"errors"
"fmt"
"fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/e"
"fonchain-fiee/pkg/utils"
modelCast "fonchain-fiee/pkg/model/cast"
)
type CastService struct {
}
func (c *CastService) ApprovalDetail(approvalIds []int) (data map[int]int, err error) {
idsBytes, _ := json.Marshal(approvalIds)
var respBody string
url := fmt.Sprintf(config.AppConfig.System.ErpHost + "/approval/list/ex")
respBody, err = utils.Post(url, string(idsBytes))
if err != nil {
return
}
var respDetail modelCast.ApprovalDetailResponse
if err = json.Unmarshal([]byte(respBody), &respDetail); err != nil {
err = errors.New(e.GetMsg(e.JsonUnmarshal))
return
}
if respDetail.Status == 0 && len(respDetail.Data.Data) > 0 {
data = make(map[int]int, len(respDetail.Data.Data))
for _, v := range respDetail.Data.Data {
data[v.ID] = v.Status
}
} else {
err = errors.New(e.GetMsg(e.ErrorHttp))
return
}
return
}

View File

@ -80,6 +80,23 @@ func UpdateWorkVideo(ctx *gin.Context) {
return return
} }
func UpdateApproval(ctx *gin.Context) {
var req *cast.UpdateStatusReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
req.WorkAction = cast.WorkActionENUM_APPROVAL
resp, err := service.CastProvider.UpdateStatus(ctx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
func WorkList(ctx *gin.Context) { func WorkList(ctx *gin.Context) {
var ( var (
req *cast.WorkListReq req *cast.WorkListReq

34
pkg/utils/http.go Normal file
View File

@ -0,0 +1,34 @@
package utils
import (
"bytes"
"io/ioutil"
"net/http"
)
func Post(url, data string) (string, error) {
reader := bytes.NewReader([]byte(data))
request, err := http.NewRequest("POST", url, reader)
if err != nil {
return "", err
}
defer request.Body.Close() //程序在使用完回复后必须关闭回复的主体
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
//必须设定该参数,POST参数才能正常提交意思是以json串提交数据
client := http.Client{}
resp, err := client.Do(request) //Do 方法发送请求,返回 HTTP 回复
if err != nil {
return "", err
}
respBytes, err := ioutil.ReadAll(resp.Body)
if err != nil {
return "", err
}
//byte数组直接转成string优化内存
// str := (*string)(unsafe.Pointer(&respBytes))
return string(respBytes), nil
}