Compare commits
53 Commits
feat-hjj-O
...
main
Author | SHA1 | Date | |
---|---|---|---|
4098d590bf | |||
db58773aea | |||
b2a96ad465 | |||
6702083fd6 | |||
5da9d19112 | |||
87d46af603 | |||
15072f9e49 | |||
c72d45c020 | |||
f3c5cbff2a | |||
ebe59394cf | |||
5746dab3e0 | |||
6c4aeb8193 | |||
7200099204 | |||
c70c5913d4 | |||
414735bc54 | |||
3f5e4e3bc8 | |||
af4c370b84 | |||
9f7e2d1667 | |||
557739aeff | |||
91e1dfa196 | |||
2825ca826e | |||
90d088101c | |||
24cc34462e | |||
9b7fbe73fd | |||
1c6172a848 | |||
af7fa93b4d | |||
48dea8eaac | |||
761b9b656b | |||
e2d87cb5e0 | |||
6a6bd459e6 | |||
47473df3be | |||
fd908ec72b | |||
6e6f159b23 | |||
97f79df433 | |||
e037f91507 | |||
b35278771e | |||
38e7e1aac6 | |||
e33aaac2b9 | |||
430304cd1e | |||
b4520ccf94 | |||
74b5c28cc4 | |||
4dba6c7669 | |||
8271683614 | |||
26a4fe0413 | |||
be7e522219 | |||
fcb33cc715 | |||
3cb95a8f65 | |||
5dc0b1cbf5 | |||
0f6e0abf33 | |||
3d13747ad9 | |||
39ca08605e | |||
b4dd5d0778 | |||
6d34d7d4f2 |
13
README.md
13
README.md
@ -0,0 +1,13 @@
|
|||||||
|
## 测试服后台
|
||||||
|
http://172.16.100.99:9028/
|
||||||
|
13580848136
|
||||||
|
|
||||||
|
https://erp.fiee.com/older_list
|
||||||
|
13580848136
|
||||||
|
Aa.123456
|
||||||
|
|
||||||
|
测试h5
|
||||||
|
## https://saas-test.szjixun.cn
|
||||||
|
|
||||||
|
正式h5
|
||||||
|
https://saas.fiee.com
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.29.1
|
// protoc-gen-go v1.29.1
|
||||||
// protoc v3.20.3
|
// protoc v3.12.4
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
@ -6139,7 +6139,7 @@ type GetUsedRecordListReq struct {
|
|||||||
Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"`
|
Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"`
|
||||||
Platform int32 `protobuf:"varint,4,opt,name=platform,proto3" json:"platform,omitempty"`
|
Platform int32 `protobuf:"varint,4,opt,name=platform,proto3" json:"platform,omitempty"`
|
||||||
Type int32 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"`
|
Type int32 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"`
|
||||||
Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"`
|
WorkTitle string `protobuf:"bytes,6,opt,name=workTitle,proto3" json:"workTitle,omitempty"`
|
||||||
SubmitTimeStart int64 `protobuf:"varint,7,opt,name=submitTimeStart,proto3" json:"submitTimeStart,omitempty"`
|
SubmitTimeStart int64 `protobuf:"varint,7,opt,name=submitTimeStart,proto3" json:"submitTimeStart,omitempty"`
|
||||||
SubmitTimeEnd int64 `protobuf:"varint,8,opt,name=submitTimeEnd,proto3" json:"submitTimeEnd,omitempty"`
|
SubmitTimeEnd int64 `protobuf:"varint,8,opt,name=submitTimeEnd,proto3" json:"submitTimeEnd,omitempty"`
|
||||||
Page int32 `protobuf:"varint,9,opt,name=page,proto3" json:"page,omitempty"`
|
Page int32 `protobuf:"varint,9,opt,name=page,proto3" json:"page,omitempty"`
|
||||||
@ -6213,9 +6213,9 @@ func (x *GetUsedRecordListReq) GetType() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetUsedRecordListReq) GetTitle() string {
|
func (x *GetUsedRecordListReq) GetWorkTitle() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Title
|
return x.WorkTitle
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@ -6323,6 +6323,7 @@ type WorkCastItem struct {
|
|||||||
OperatorName string `protobuf:"bytes,13,opt,name=operatorName,proto3" json:"operatorName,omitempty"` // 操作人名称
|
OperatorName string `protobuf:"bytes,13,opt,name=operatorName,proto3" json:"operatorName,omitempty"` // 操作人名称
|
||||||
OperatorPhone string `protobuf:"bytes,14,opt,name=operatorPhone,proto3" json:"operatorPhone,omitempty"` // 操作人手机号
|
OperatorPhone string `protobuf:"bytes,14,opt,name=operatorPhone,proto3" json:"operatorPhone,omitempty"` // 操作人手机号
|
||||||
Status uint32 `protobuf:"varint,15,opt,name=status,proto3" json:"status,omitempty"` // 1 有效 2 失效
|
Status uint32 `protobuf:"varint,15,opt,name=status,proto3" json:"status,omitempty"` // 1 有效 2 失效
|
||||||
|
CostType uint32 `protobuf:"varint,16,opt,name=costType,proto3" json:"costType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WorkCastItem) Reset() {
|
func (x *WorkCastItem) Reset() {
|
||||||
@ -6462,6 +6463,13 @@ func (x *WorkCastItem) GetStatus() uint32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *WorkCastItem) GetCostType() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.CostType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type GetImageWorkDetailReq struct {
|
type GetImageWorkDetailReq struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -6771,6 +6779,7 @@ type WorkItem struct {
|
|||||||
CreatedAt int64 `protobuf:"varint,11,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 提交时间
|
CreatedAt int64 `protobuf:"varint,11,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 提交时间
|
||||||
ArtistName string `protobuf:"bytes,12,opt,name=artistName,proto3" json:"artistName,omitempty"`
|
ArtistName string `protobuf:"bytes,12,opt,name=artistName,proto3" json:"artistName,omitempty"`
|
||||||
ArtistUuid string `protobuf:"bytes,13,opt,name=artistUuid,proto3" json:"artistUuid,omitempty"`
|
ArtistUuid string `protobuf:"bytes,13,opt,name=artistUuid,proto3" json:"artistUuid,omitempty"`
|
||||||
|
CostType uint32 `protobuf:"varint,14,opt,name=costType,proto3" json:"costType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WorkItem) Reset() {
|
func (x *WorkItem) Reset() {
|
||||||
@ -6896,6 +6905,13 @@ func (x *WorkItem) GetArtistUuid() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *WorkItem) GetCostType() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.CostType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type ToBeComfirmedWorksResp struct {
|
type ToBeComfirmedWorksResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -8890,7 +8906,7 @@ var file_pb_bundle_proto_rawDesc = []byte{
|
|||||||
0x63, 0x6b, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x63, 0x6b, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
0x14, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x73, 0x4e,
|
0x14, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x73, 0x4e,
|
||||||
0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x42, 0x75, 0x6e, 0x64,
|
0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x42, 0x75, 0x6e, 0x64,
|
||||||
0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0xa6, 0x02,
|
0x6c, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0xae, 0x02,
|
||||||
0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c,
|
0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c,
|
||||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01,
|
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70,
|
||||||
@ -8900,107 +8916,111 @@ var file_pb_bundle_proto_rawDesc = []byte{
|
|||||||
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01,
|
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01,
|
||||||
0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04,
|
0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
|
0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
|
||||||
0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x12, 0x1c, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x06, 0x20,
|
||||||
0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74,
|
0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28,
|
||||||
0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
|
0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72,
|
||||||
0x0f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74,
|
0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54,
|
||||||
0x12, 0x24, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x6e,
|
0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x6d,
|
||||||
0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54,
|
0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
0x69, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x09,
|
0x0d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x12, 0x12,
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
|
0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61,
|
||||||
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61,
|
0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0a,
|
||||||
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x57, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x57,
|
||||||
0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
|
0x0a, 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c,
|
||||||
0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
|
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
|
||||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x28, 0x0a,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x57, 0x6f, 0x72,
|
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x75,
|
||||||
0x6b, 0x43, 0x61, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
|
0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x73, 0x74, 0x49, 0x74, 0x65,
|
||||||
0xf4, 0x03, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d,
|
0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x90, 0x04, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b,
|
||||||
0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01,
|
0x43, 0x61, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64,
|
0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72,
|
||||||
0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02,
|
0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65,
|
0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72,
|
||||||
0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18,
|
0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69,
|
||||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f,
|
0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61,
|
||||||
0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x04,
|
0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x22,
|
0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f,
|
||||||
0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05,
|
0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61,
|
||||||
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
|
|
||||||
0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64,
|
|
||||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75,
|
|
||||||
0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65,
|
|
||||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61,
|
|
||||||
0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64,
|
|
||||||
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
|
|
||||||
0x6d, 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e, 0x61, 0x6d,
|
|
||||||
0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e,
|
|
||||||
0x61, 0x6d, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63,
|
|
||||||
0x49, 0x44, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61,
|
|
||||||
0x41, 0x63, 0x63, 0x49, 0x44, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x69,
|
|
||||||
0x74, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x54,
|
|
||||||
0x69, 0x74, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69,
|
|
||||||
0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74,
|
|
||||||
0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
|
|
||||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x72,
|
|
||||||
0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72,
|
|
||||||
0x61, 0x74, 0x6f, 0x72, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16,
|
|
||||||
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06,
|
|
||||||
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61,
|
|
||||||
0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12,
|
|
||||||
0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x56, 0x65,
|
|
||||||
0x64, 0x69, 0x6f, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71,
|
|
||||||
0x12, 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x22, 0x86, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74,
|
|
||||||
0x49, 0x6d, 0x61, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52,
|
|
||||||
0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20,
|
|
||||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63,
|
|
||||||
0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63,
|
|
||||||
0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x69, 0x64, 0x65, 0x6f,
|
|
||||||
0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x69, 0x64, 0x65, 0x6f,
|
|
||||||
0x55, 0x72, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
|
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
|
|
||||||
0x74, 0x22, 0x6d, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x56, 0x65, 0x64, 0x69, 0x6f, 0x65, 0x57, 0x6f,
|
|
||||||
0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06,
|
|
||||||
0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x6f,
|
|
||||||
0x72, 0x6b, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c,
|
|
||||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72,
|
|
||||||
0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18,
|
|
||||||
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
|
|
||||||
0x22, 0x67, 0x0a, 0x15, 0x54, 0x6f, 0x42, 0x65, 0x43, 0x6f, 0x6d, 0x66, 0x69, 0x72, 0x6d, 0x65,
|
|
||||||
0x64, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74,
|
|
||||||
0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61,
|
|
||||||
0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67,
|
|
||||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a,
|
|
||||||
0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
|
||||||
0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x9a, 0x03, 0x0a, 0x08, 0x77, 0x6f,
|
|
||||||
0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01,
|
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f,
|
|
||||||
0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f,
|
|
||||||
0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
|
|
||||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07,
|
|
||||||
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
|
|
||||||
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61,
|
|
||||||
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x6f,
|
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x6f,
|
||||||
0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x77, 0x6f,
|
0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75,
|
||||||
0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a,
|
0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
||||||
0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c,
|
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75,
|
||||||
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
||||||
|
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c,
|
||||||
|
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
|
0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
|
||||||
0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f,
|
0x52, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b,
|
||||||
0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x18,
|
0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x49, 0x44, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28,
|
||||||
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x55,
|
0x09, 0x52, 0x0b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x49, 0x44, 0x73, 0x12, 0x1c,
|
||||||
0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72,
|
0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
||||||
0x6d, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x6e,
|
0x09, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
|
||||||
0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61,
|
0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65,
|
0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c,
|
||||||
0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01,
|
||||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69,
|
0x28, 0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65,
|
||||||
0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x68, 0x6f, 0x6e,
|
||||||
0x55, 0x75, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69,
|
0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f,
|
||||||
0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0x76, 0x0a, 0x16, 0x54, 0x6f, 0x42, 0x65, 0x43, 0x6f,
|
0x72, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||||
|
0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a,
|
||||||
|
0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d,
|
||||||
|
0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2f, 0x0a, 0x15, 0x47, 0x65,
|
||||||
|
0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
|
||||||
|
0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x15, 0x47,
|
||||||
|
0x65, 0x74, 0x56, 0x65, 0x64, 0x69, 0x6f, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69,
|
||||||
|
0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x22, 0x86, 0x01, 0x0a,
|
||||||
|
0x16, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74,
|
||||||
|
0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49,
|
||||||
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12,
|
||||||
|
0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x76,
|
||||||
|
0x69, 0x64, 0x65, 0x6f, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76,
|
||||||
|
0x69, 0x64, 0x65, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
|
||||||
|
0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x6d, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x56, 0x65, 0x64, 0x69,
|
||||||
|
0x6f, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70,
|
||||||
|
0x12, 0x16, 0x0a, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x06, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67,
|
||||||
|
0x65, 0x55, 0x72, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6d, 0x61,
|
||||||
|
0x67, 0x65, 0x55, 0x72, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
|
0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x64, 0x41, 0x74, 0x22, 0x67, 0x0a, 0x15, 0x54, 0x6f, 0x42, 0x65, 0x43, 0x6f, 0x6d, 0x66,
|
||||||
|
0x69, 0x72, 0x6d, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a,
|
||||||
|
0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a,
|
||||||
|
0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67,
|
||||||
|
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20,
|
||||||
|
0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xb6, 0x03,
|
||||||
|
0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75,
|
||||||
|
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1a,
|
||||||
|
0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69,
|
||||||
|
0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
|
||||||
|
0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f,
|
||||||
|
0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d,
|
||||||
|
0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1e,
|
||||||
|
0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01,
|
||||||
|
0x28, 0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20,
|
||||||
|
0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x73, 0x18, 0x07, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x64, 0x73,
|
||||||
|
0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||||
|
0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x41, 0x63, 0x63, 0x55, 0x73, 0x65, 0x72,
|
||||||
|
0x49, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x65, 0x64, 0x69, 0x61,
|
||||||
|
0x41, 0x63, 0x63, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f,
|
||||||
|
0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
|
0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09,
|
||||||
|
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
|
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72,
|
||||||
|
0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
||||||
|
0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72,
|
||||||
|
0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
||||||
|
0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f,
|
||||||
|
0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x6f,
|
||||||
|
0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x76, 0x0a, 0x16, 0x54, 0x6f, 0x42, 0x65, 0x43, 0x6f,
|
||||||
0x6d, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70,
|
0x6d, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66,
|
0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66,
|
||||||
|
@ -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 v3.20.3
|
// - protoc v3.12.4
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
|
2298
api/cast/cast.pb.go
2298
api/cast/cast.pb.go
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -43,8 +43,11 @@ type CastClient interface {
|
|||||||
RePublish(ctx context.Context, in *RePublishReq, opts ...grpc_go.CallOption) (*RePublishResp, common.ErrorWithAttachment)
|
RePublish(ctx context.Context, in *RePublishReq, opts ...grpc_go.CallOption) (*RePublishResp, common.ErrorWithAttachment)
|
||||||
DelWork(ctx context.Context, in *DelWorkReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
DelWork(ctx context.Context, in *DelWorkReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
WorkInfo(ctx context.Context, in *WorkInfoReq, opts ...grpc_go.CallOption) (*WorkInfoResp, common.ErrorWithAttachment)
|
WorkInfo(ctx context.Context, in *WorkInfoReq, opts ...grpc_go.CallOption) (*WorkInfoResp, common.ErrorWithAttachment)
|
||||||
OAuthYoutubeUrl(ctx context.Context, in *OAuthYoutubeUrlReq, opts ...grpc_go.CallOption) (*OAuthYoutubeUrlResp, common.ErrorWithAttachment)
|
OAuthAccount(ctx context.Context, in *OAuthAccountReq, opts ...grpc_go.CallOption) (*OAuthAccountResp, common.ErrorWithAttachment)
|
||||||
OAuthYoutubeToken(ctx context.Context, in *OAuthYoutubeTokenReq, opts ...grpc_go.CallOption) (*OAuthYoutubeTokenResp, common.ErrorWithAttachment)
|
OAuthCodeToToken(ctx context.Context, in *OAuthCodeToTokenReq, opts ...grpc_go.CallOption) (*OAuthCodeToTokenResp, common.ErrorWithAttachment)
|
||||||
|
RefreshToken(ctx context.Context, in *RefreshTokenReq, opts ...grpc_go.CallOption) (*RefreshTokenResp, common.ErrorWithAttachment)
|
||||||
|
PublishMediaInfo(ctx context.Context, in *PublishMediaInfoReq, opts ...grpc_go.CallOption) (*PublishMediaInfoResp, common.ErrorWithAttachment)
|
||||||
|
Test(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
type castClient struct {
|
type castClient struct {
|
||||||
@ -66,8 +69,11 @@ type CastClientImpl struct {
|
|||||||
RePublish func(ctx context.Context, in *RePublishReq) (*RePublishResp, error)
|
RePublish func(ctx context.Context, in *RePublishReq) (*RePublishResp, error)
|
||||||
DelWork func(ctx context.Context, in *DelWorkReq) (*emptypb.Empty, error)
|
DelWork func(ctx context.Context, in *DelWorkReq) (*emptypb.Empty, error)
|
||||||
WorkInfo func(ctx context.Context, in *WorkInfoReq) (*WorkInfoResp, error)
|
WorkInfo func(ctx context.Context, in *WorkInfoReq) (*WorkInfoResp, error)
|
||||||
OAuthYoutubeUrl func(ctx context.Context, in *OAuthYoutubeUrlReq) (*OAuthYoutubeUrlResp, error)
|
OAuthAccount func(ctx context.Context, in *OAuthAccountReq) (*OAuthAccountResp, error)
|
||||||
OAuthYoutubeToken func(ctx context.Context, in *OAuthYoutubeTokenReq) (*OAuthYoutubeTokenResp, error)
|
OAuthCodeToToken func(ctx context.Context, in *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
||||||
|
RefreshToken func(ctx context.Context, in *RefreshTokenReq) (*RefreshTokenResp, error)
|
||||||
|
PublishMediaInfo func(ctx context.Context, in *PublishMediaInfoReq) (*PublishMediaInfoResp, error)
|
||||||
|
Test func(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
||||||
@ -166,16 +172,34 @@ func (c *castClient) WorkInfo(ctx context.Context, in *WorkInfoReq, opts ...grpc
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkInfo", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkInfo", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *castClient) OAuthYoutubeUrl(ctx context.Context, in *OAuthYoutubeUrlReq, opts ...grpc_go.CallOption) (*OAuthYoutubeUrlResp, common.ErrorWithAttachment) {
|
func (c *castClient) OAuthAccount(ctx context.Context, in *OAuthAccountReq, opts ...grpc_go.CallOption) (*OAuthAccountResp, common.ErrorWithAttachment) {
|
||||||
out := new(OAuthYoutubeUrlResp)
|
out := new(OAuthAccountResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OAuthYoutubeUrl", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OAuthAccount", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *castClient) OAuthYoutubeToken(ctx context.Context, in *OAuthYoutubeTokenReq, opts ...grpc_go.CallOption) (*OAuthYoutubeTokenResp, common.ErrorWithAttachment) {
|
func (c *castClient) OAuthCodeToToken(ctx context.Context, in *OAuthCodeToTokenReq, opts ...grpc_go.CallOption) (*OAuthCodeToTokenResp, common.ErrorWithAttachment) {
|
||||||
out := new(OAuthYoutubeTokenResp)
|
out := new(OAuthCodeToTokenResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OAuthYoutubeToken", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OAuthCodeToToken", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) RefreshToken(ctx context.Context, in *RefreshTokenReq, opts ...grpc_go.CallOption) (*RefreshTokenResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(RefreshTokenResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RefreshToken", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) PublishMediaInfo(ctx context.Context, in *PublishMediaInfoReq, opts ...grpc_go.CallOption) (*PublishMediaInfoResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(PublishMediaInfoResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/PublishMediaInfo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) Test(ctx context.Context, in *emptypb.Empty, 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+"/Test", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CastServer is the server API for Cast service.
|
// CastServer is the server API for Cast service.
|
||||||
@ -196,8 +220,11 @@ type CastServer interface {
|
|||||||
RePublish(context.Context, *RePublishReq) (*RePublishResp, error)
|
RePublish(context.Context, *RePublishReq) (*RePublishResp, error)
|
||||||
DelWork(context.Context, *DelWorkReq) (*emptypb.Empty, error)
|
DelWork(context.Context, *DelWorkReq) (*emptypb.Empty, error)
|
||||||
WorkInfo(context.Context, *WorkInfoReq) (*WorkInfoResp, error)
|
WorkInfo(context.Context, *WorkInfoReq) (*WorkInfoResp, error)
|
||||||
OAuthYoutubeUrl(context.Context, *OAuthYoutubeUrlReq) (*OAuthYoutubeUrlResp, error)
|
OAuthAccount(context.Context, *OAuthAccountReq) (*OAuthAccountResp, error)
|
||||||
OAuthYoutubeToken(context.Context, *OAuthYoutubeTokenReq) (*OAuthYoutubeTokenResp, error)
|
OAuthCodeToToken(context.Context, *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
||||||
|
RefreshToken(context.Context, *RefreshTokenReq) (*RefreshTokenResp, error)
|
||||||
|
PublishMediaInfo(context.Context, *PublishMediaInfoReq) (*PublishMediaInfoResp, error)
|
||||||
|
Test(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
||||||
mustEmbedUnimplementedCastServer()
|
mustEmbedUnimplementedCastServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,11 +275,20 @@ func (UnimplementedCastServer) DelWork(context.Context, *DelWorkReq) (*emptypb.E
|
|||||||
func (UnimplementedCastServer) WorkInfo(context.Context, *WorkInfoReq) (*WorkInfoResp, error) {
|
func (UnimplementedCastServer) WorkInfo(context.Context, *WorkInfoReq) (*WorkInfoResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method WorkInfo not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method WorkInfo not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedCastServer) OAuthYoutubeUrl(context.Context, *OAuthYoutubeUrlReq) (*OAuthYoutubeUrlResp, error) {
|
func (UnimplementedCastServer) OAuthAccount(context.Context, *OAuthAccountReq) (*OAuthAccountResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method OAuthYoutubeUrl not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthAccount not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedCastServer) OAuthYoutubeToken(context.Context, *OAuthYoutubeTokenReq) (*OAuthYoutubeTokenResp, error) {
|
func (UnimplementedCastServer) OAuthCodeToToken(context.Context, *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method OAuthYoutubeToken not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthCodeToToken not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) RefreshToken(context.Context, *RefreshTokenReq) (*RefreshTokenResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) PublishMediaInfo(context.Context, *PublishMediaInfoReq) (*PublishMediaInfoResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method PublishMediaInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) Test(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Test not implemented")
|
||||||
}
|
}
|
||||||
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||||
s.proxyImpl = impl
|
s.proxyImpl = impl
|
||||||
@ -688,8 +724,8 @@ func _Cast_WorkInfo_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Cast_OAuthYoutubeUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Cast_OAuthAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(OAuthYoutubeUrlReq)
|
in := new(OAuthAccountReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -701,7 +737,7 @@ func _Cast_OAuthYoutubeUrl_Handler(srv interface{}, ctx context.Context, dec fun
|
|||||||
for k, v := range md {
|
for k, v := range md {
|
||||||
invAttachment[k] = v
|
invAttachment[k] = v
|
||||||
}
|
}
|
||||||
invo := invocation.NewRPCInvocation("OAuthYoutubeUrl", args, invAttachment)
|
invo := invocation.NewRPCInvocation("OAuthAccount", 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()
|
||||||
@ -717,8 +753,8 @@ func _Cast_OAuthYoutubeUrl_Handler(srv interface{}, ctx context.Context, dec fun
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Cast_OAuthYoutubeToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Cast_OAuthCodeToToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(OAuthYoutubeTokenReq)
|
in := new(OAuthCodeToTokenReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -730,7 +766,94 @@ func _Cast_OAuthYoutubeToken_Handler(srv interface{}, ctx context.Context, dec f
|
|||||||
for k, v := range md {
|
for k, v := range md {
|
||||||
invAttachment[k] = v
|
invAttachment[k] = v
|
||||||
}
|
}
|
||||||
invo := invocation.NewRPCInvocation("OAuthYoutubeToken", args, invAttachment)
|
invo := invocation.NewRPCInvocation("OAuthCodeToToken", 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 _Cast_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(RefreshTokenReq)
|
||||||
|
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("RefreshToken", 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 _Cast_PublishMediaInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PublishMediaInfoReq)
|
||||||
|
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("PublishMediaInfo", 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 _Cast_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(emptypb.Empty)
|
||||||
|
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("Test", 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()
|
||||||
@ -810,12 +933,24 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
Handler: _Cast_WorkInfo_Handler,
|
Handler: _Cast_WorkInfo_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "OAuthYoutubeUrl",
|
MethodName: "OAuthAccount",
|
||||||
Handler: _Cast_OAuthYoutubeUrl_Handler,
|
Handler: _Cast_OAuthAccount_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "OAuthYoutubeToken",
|
MethodName: "OAuthCodeToToken",
|
||||||
Handler: _Cast_OAuthYoutubeToken_Handler,
|
Handler: _Cast_OAuthCodeToToken_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RefreshToken",
|
||||||
|
Handler: _Cast_RefreshToken_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "PublishMediaInfo",
|
||||||
|
Handler: _Cast_PublishMediaInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Test",
|
||||||
|
Handler: _Cast_Test_Handler,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
|
@ -1,644 +0,0 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// protoc-gen-go v1.31.0
|
|
||||||
// protoc v5.26.0
|
|
||||||
// source: api/emailAlerts/emailAlerts.proto
|
|
||||||
|
|
||||||
package emailAlerts
|
|
||||||
|
|
||||||
import (
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
// Verify that this generated code is sufficiently up-to-date.
|
|
||||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
||||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
||||||
)
|
|
||||||
|
|
||||||
type EmailAlertsSubmitReq struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName"`
|
|
||||||
LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName"`
|
|
||||||
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
|
|
||||||
Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"`
|
|
||||||
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitReq) Reset() {
|
|
||||||
*x = EmailAlertsSubmitReq{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[0]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitReq) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*EmailAlertsSubmitReq) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitReq) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[0]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use EmailAlertsSubmitReq.ProtoReflect.Descriptor instead.
|
|
||||||
func (*EmailAlertsSubmitReq) Descriptor() ([]byte, []int) {
|
|
||||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{0}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitReq) GetFirstName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.FirstName
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitReq) GetLastName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.LastName
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitReq) GetEmail() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Email
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitReq) GetCompany() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Company
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitReq) GetPhone() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Phone
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type EmailAlertsSubmitResp struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitResp) Reset() {
|
|
||||||
*x = EmailAlertsSubmitResp{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[1]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitResp) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*EmailAlertsSubmitResp) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitResp) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[1]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use EmailAlertsSubmitResp.ProtoReflect.Descriptor instead.
|
|
||||||
func (*EmailAlertsSubmitResp) Descriptor() ([]byte, []int) {
|
|
||||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{1}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailAlertsSubmitResp) GetMsg() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Msg
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
// ========================= EmailInformatio ==============================
|
|
||||||
type Filtrate struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
|
|
||||||
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email"`
|
|
||||||
Company string `protobuf:"bytes,3,opt,name=company,proto3" json:"company"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Filtrate) Reset() {
|
|
||||||
*x = Filtrate{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[2]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Filtrate) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*Filtrate) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *Filtrate) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[2]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use Filtrate.ProtoReflect.Descriptor instead.
|
|
||||||
func (*Filtrate) Descriptor() ([]byte, []int) {
|
|
||||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{2}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Filtrate) GetName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Name
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Filtrate) GetEmail() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Email
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Filtrate) GetCompany() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Company
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetEmailInformationListReq struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page"`
|
|
||||||
PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize"`
|
|
||||||
Filtrate *Filtrate `protobuf:"bytes,3,opt,name=filtrate,proto3" json:"filtrate"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListReq) Reset() {
|
|
||||||
*x = GetEmailInformationListReq{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[3]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListReq) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*GetEmailInformationListReq) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListReq) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[3]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use GetEmailInformationListReq.ProtoReflect.Descriptor instead.
|
|
||||||
func (*GetEmailInformationListReq) Descriptor() ([]byte, []int) {
|
|
||||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{3}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListReq) GetPage() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Page
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListReq) GetPageSize() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.PageSize
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListReq) GetFiltrate() *Filtrate {
|
|
||||||
if x != nil {
|
|
||||||
return x.Filtrate
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetEmailInformationListResp struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
|
|
||||||
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page"`
|
|
||||||
PageSize int32 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize"`
|
|
||||||
Total int32 `protobuf:"varint,4,opt,name=total,proto3" json:"total"`
|
|
||||||
Data []*EmailInformation `protobuf:"bytes,5,rep,name=data,proto3" json:"data"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListResp) Reset() {
|
|
||||||
*x = GetEmailInformationListResp{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListResp) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*GetEmailInformationListResp) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListResp) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use GetEmailInformationListResp.ProtoReflect.Descriptor instead.
|
|
||||||
func (*GetEmailInformationListResp) Descriptor() ([]byte, []int) {
|
|
||||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{4}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListResp) GetMsg() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Msg
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListResp) GetPage() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Page
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListResp) GetPageSize() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.PageSize
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListResp) GetTotal() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Total
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetEmailInformationListResp) GetData() []*EmailInformation {
|
|
||||||
if x != nil {
|
|
||||||
return x.Data
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type EmailInformation struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
|
||||||
FullName string `protobuf:"bytes,2,opt,name=fullName,proto3" json:"fullName"`
|
|
||||||
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
|
|
||||||
Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"`
|
|
||||||
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"`
|
|
||||||
CreatedAt string `protobuf:"bytes,6,opt,name=createdAt,proto3" json:"createdAt"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailInformation) Reset() {
|
|
||||||
*x = EmailInformation{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[5]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailInformation) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*EmailInformation) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *EmailInformation) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[5]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use EmailInformation.ProtoReflect.Descriptor instead.
|
|
||||||
func (*EmailInformation) Descriptor() ([]byte, []int) {
|
|
||||||
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{5}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailInformation) GetId() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Id
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailInformation) GetFullName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.FullName
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailInformation) GetEmail() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Email
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailInformation) GetCompany() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Company
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailInformation) GetPhone() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Phone
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *EmailInformation) GetCreatedAt() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.CreatedAt
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
var File_api_emailAlerts_emailAlerts_proto protoreflect.FileDescriptor
|
|
||||||
|
|
||||||
var file_api_emailAlerts_emailAlerts_proto_rawDesc = []byte{
|
|
||||||
0x0a, 0x21, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74,
|
|
||||||
0x73, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x72,
|
|
||||||
0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73,
|
|
||||||
0x22, 0x96, 0x01, 0x0a, 0x14, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73,
|
|
||||||
0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72,
|
|
||||||
0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69,
|
|
||||||
0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e,
|
|
||||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e,
|
|
||||||
0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d,
|
|
||||||
0x70, 0x61, 0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70,
|
|
||||||
0x61, 0x6e, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x45, 0x6d, 0x61,
|
|
||||||
0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65,
|
|
||||||
0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x03, 0x6d, 0x73, 0x67, 0x22, 0x4e, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65,
|
|
||||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20,
|
|
||||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
|
|
||||||
0x6d, 0x70, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d,
|
|
||||||
0x70, 0x61, 0x6e, 0x79, 0x22, 0x7f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c,
|
|
||||||
0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
|
||||||
0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
|
||||||
0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
|
|
||||||
0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
|
|
||||||
0x7a, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03,
|
|
||||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72,
|
|
||||||
0x74, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x52, 0x08, 0x66, 0x69, 0x6c,
|
|
||||||
0x74, 0x72, 0x61, 0x74, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61,
|
|
||||||
0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
|
|
||||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18,
|
|
||||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70,
|
|
||||||
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70,
|
|
||||||
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
|
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x31, 0x0a,
|
|
||||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6d,
|
|
||||||
0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49,
|
|
||||||
0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
|
||||||
0x22, 0xa2, 0x01, 0x0a, 0x10, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
|
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
|
|
||||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
|
|
||||||
0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61,
|
|
||||||
0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
|
|
||||||
0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
|
|
||||||
0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
|
|
||||||
0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xd7, 0x01, 0x0a, 0x0b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41,
|
|
||||||
0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x5a, 0x0a, 0x11, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c,
|
|
||||||
0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x2e, 0x65, 0x6d, 0x61,
|
|
||||||
0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c,
|
|
||||||
0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e,
|
|
||||||
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69,
|
|
||||||
0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73,
|
|
||||||
0x70, 0x12, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66,
|
|
||||||
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x65,
|
|
||||||
0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d,
|
|
||||||
0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69,
|
|
||||||
0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65,
|
|
||||||
0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f,
|
|
||||||
0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42,
|
|
||||||
0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x3b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74,
|
|
||||||
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_rawDescOnce sync.Once
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_rawDescData = file_api_emailAlerts_emailAlerts_proto_rawDesc
|
|
||||||
)
|
|
||||||
|
|
||||||
func file_api_emailAlerts_emailAlerts_proto_rawDescGZIP() []byte {
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_rawDescOnce.Do(func() {
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_emailAlerts_emailAlerts_proto_rawDescData)
|
|
||||||
})
|
|
||||||
return file_api_emailAlerts_emailAlerts_proto_rawDescData
|
|
||||||
}
|
|
||||||
|
|
||||||
var file_api_emailAlerts_emailAlerts_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
|
||||||
var file_api_emailAlerts_emailAlerts_proto_goTypes = []interface{}{
|
|
||||||
(*EmailAlertsSubmitReq)(nil), // 0: emailAlerts.EmailAlertsSubmitReq
|
|
||||||
(*EmailAlertsSubmitResp)(nil), // 1: emailAlerts.EmailAlertsSubmitResp
|
|
||||||
(*Filtrate)(nil), // 2: emailAlerts.Filtrate
|
|
||||||
(*GetEmailInformationListReq)(nil), // 3: emailAlerts.GetEmailInformationListReq
|
|
||||||
(*GetEmailInformationListResp)(nil), // 4: emailAlerts.GetEmailInformationListResp
|
|
||||||
(*EmailInformation)(nil), // 5: emailAlerts.EmailInformation
|
|
||||||
}
|
|
||||||
var file_api_emailAlerts_emailAlerts_proto_depIdxs = []int32{
|
|
||||||
2, // 0: emailAlerts.GetEmailInformationListReq.filtrate:type_name -> emailAlerts.Filtrate
|
|
||||||
5, // 1: emailAlerts.GetEmailInformationListResp.data:type_name -> emailAlerts.EmailInformation
|
|
||||||
0, // 2: emailAlerts.EmailAlerts.EmailAlertsSubmit:input_type -> emailAlerts.EmailAlertsSubmitReq
|
|
||||||
3, // 3: emailAlerts.EmailAlerts.GetEmailInformationList:input_type -> emailAlerts.GetEmailInformationListReq
|
|
||||||
1, // 4: emailAlerts.EmailAlerts.EmailAlertsSubmit:output_type -> emailAlerts.EmailAlertsSubmitResp
|
|
||||||
4, // 5: emailAlerts.EmailAlerts.GetEmailInformationList:output_type -> emailAlerts.GetEmailInformationListResp
|
|
||||||
4, // [4:6] is the sub-list for method output_type
|
|
||||||
2, // [2:4] is the sub-list for method input_type
|
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
|
||||||
0, // [0:2] is the sub-list for field type_name
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { file_api_emailAlerts_emailAlerts_proto_init() }
|
|
||||||
func file_api_emailAlerts_emailAlerts_proto_init() {
|
|
||||||
if File_api_emailAlerts_emailAlerts_proto != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*EmailAlertsSubmitReq); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*EmailAlertsSubmitResp); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*Filtrate); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*GetEmailInformationListReq); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*GetEmailInformationListResp); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*EmailInformation); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
|
||||||
out := protoimpl.TypeBuilder{
|
|
||||||
File: protoimpl.DescBuilder{
|
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
||||||
RawDescriptor: file_api_emailAlerts_emailAlerts_proto_rawDesc,
|
|
||||||
NumEnums: 0,
|
|
||||||
NumMessages: 6,
|
|
||||||
NumExtensions: 0,
|
|
||||||
NumServices: 1,
|
|
||||||
},
|
|
||||||
GoTypes: file_api_emailAlerts_emailAlerts_proto_goTypes,
|
|
||||||
DependencyIndexes: file_api_emailAlerts_emailAlerts_proto_depIdxs,
|
|
||||||
MessageInfos: file_api_emailAlerts_emailAlerts_proto_msgTypes,
|
|
||||||
}.Build()
|
|
||||||
File_api_emailAlerts_emailAlerts_proto = out.File
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_rawDesc = nil
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_goTypes = nil
|
|
||||||
file_api_emailAlerts_emailAlerts_proto_depIdxs = nil
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
||||||
// source: api/emailAlerts/emailAlerts.proto
|
|
||||||
|
|
||||||
package emailAlerts
|
|
||||||
|
|
||||||
import (
|
|
||||||
fmt "fmt"
|
|
||||||
math "math"
|
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
|
||||||
var _ = proto.Marshal
|
|
||||||
var _ = fmt.Errorf
|
|
||||||
var _ = math.Inf
|
|
||||||
|
|
||||||
func (this *EmailAlertsSubmitReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EmailAlertsSubmitResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *Filtrate) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *GetEmailInformationListReq) Validate() error {
|
|
||||||
if this.Filtrate != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *GetEmailInformationListResp) 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 *EmailInformation) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,194 +0,0 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// - protoc-gen-go-triple v1.0.5
|
|
||||||
// - protoc v5.26.0
|
|
||||||
// source: api/emailAlerts/emailAlerts.proto
|
|
||||||
|
|
||||||
package emailAlerts
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "context"
|
|
||||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
|
||||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
|
||||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
|
||||||
grpc_go "github.com/dubbogo/grpc-go"
|
|
||||||
codes "github.com/dubbogo/grpc-go/codes"
|
|
||||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
|
||||||
status "github.com/dubbogo/grpc-go/status"
|
|
||||||
common "github.com/dubbogo/triple/pkg/common"
|
|
||||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
|
||||||
triple "github.com/dubbogo/triple/pkg/triple"
|
|
||||||
)
|
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
|
||||||
// is compatible with the grpc package it is being compiled against.
|
|
||||||
const _ = grpc_go.SupportPackageIsVersion7
|
|
||||||
|
|
||||||
// EmailAlertsClient is the client API for EmailAlerts service.
|
|
||||||
//
|
|
||||||
// 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 EmailAlertsClient interface {
|
|
||||||
EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment)
|
|
||||||
// ========================= EmailInformatio ==============================
|
|
||||||
GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment)
|
|
||||||
}
|
|
||||||
|
|
||||||
type emailAlertsClient struct {
|
|
||||||
cc *triple.TripleConn
|
|
||||||
}
|
|
||||||
|
|
||||||
type EmailAlertsClientImpl struct {
|
|
||||||
EmailAlertsSubmit func(ctx context.Context, in *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
|
|
||||||
GetEmailInformationList func(ctx context.Context, in *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *EmailAlertsClientImpl) GetDubboStub(cc *triple.TripleConn) EmailAlertsClient {
|
|
||||||
return NewEmailAlertsClient(cc)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *EmailAlertsClientImpl) XXX_InterfaceName() string {
|
|
||||||
return "emailAlerts.EmailAlerts"
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewEmailAlertsClient(cc *triple.TripleConn) EmailAlertsClient {
|
|
||||||
return &emailAlertsClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *emailAlertsClient) EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(EmailAlertsSubmitResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EmailAlertsSubmit", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *emailAlertsClient) GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(GetEmailInformationListResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetEmailInformationList", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
// EmailAlertsServer is the server API for EmailAlerts service.
|
|
||||||
// All implementations must embed UnimplementedEmailAlertsServer
|
|
||||||
// for forward compatibility
|
|
||||||
type EmailAlertsServer interface {
|
|
||||||
EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
|
|
||||||
// ========================= EmailInformatio ==============================
|
|
||||||
GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
|
|
||||||
mustEmbedUnimplementedEmailAlertsServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedEmailAlertsServer must be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedEmailAlertsServer struct {
|
|
||||||
proxyImpl protocol.Invoker
|
|
||||||
}
|
|
||||||
|
|
||||||
func (UnimplementedEmailAlertsServer) EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method EmailAlertsSubmit not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedEmailAlertsServer) GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetEmailInformationList not implemented")
|
|
||||||
}
|
|
||||||
func (s *UnimplementedEmailAlertsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
|
||||||
s.proxyImpl = impl
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *UnimplementedEmailAlertsServer) XXX_GetProxyImpl() protocol.Invoker {
|
|
||||||
return s.proxyImpl
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *UnimplementedEmailAlertsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
|
||||||
return &EmailAlerts_ServiceDesc
|
|
||||||
}
|
|
||||||
func (s *UnimplementedEmailAlertsServer) XXX_InterfaceName() string {
|
|
||||||
return "emailAlerts.EmailAlerts"
|
|
||||||
}
|
|
||||||
|
|
||||||
func (UnimplementedEmailAlertsServer) mustEmbedUnimplementedEmailAlertsServer() {}
|
|
||||||
|
|
||||||
// UnsafeEmailAlertsServer may be embedded to opt out of forward compatibility for this service.
|
|
||||||
// Use of this interface is not recommended, as added methods to EmailAlertsServer will
|
|
||||||
// result in compilation errors.
|
|
||||||
type UnsafeEmailAlertsServer interface {
|
|
||||||
mustEmbedUnimplementedEmailAlertsServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterEmailAlertsServer(s grpc_go.ServiceRegistrar, srv EmailAlertsServer) {
|
|
||||||
s.RegisterService(&EmailAlerts_ServiceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _EmailAlerts_EmailAlertsSubmit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(EmailAlertsSubmitReq)
|
|
||||||
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("EmailAlertsSubmit", 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 _EmailAlerts_GetEmailInformationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(GetEmailInformationListReq)
|
|
||||||
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("GetEmailInformationList", 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)
|
|
||||||
}
|
|
||||||
|
|
||||||
// EmailAlerts_ServiceDesc is the grpc_go.ServiceDesc for EmailAlerts service.
|
|
||||||
// It's only intended for direct use with grpc_go.RegisterService,
|
|
||||||
// and not to be introspected or modified (even as a copy)
|
|
||||||
var EmailAlerts_ServiceDesc = grpc_go.ServiceDesc{
|
|
||||||
ServiceName: "emailAlerts.EmailAlerts",
|
|
||||||
HandlerType: (*EmailAlertsServer)(nil),
|
|
||||||
Methods: []grpc_go.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "EmailAlertsSubmit",
|
|
||||||
Handler: _EmailAlerts_EmailAlertsSubmit_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "GetEmailInformationList",
|
|
||||||
Handler: _EmailAlerts_GetEmailInformationList_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc_go.StreamDesc{},
|
|
||||||
Metadata: "api/emailAlerts/emailAlerts.proto",
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,149 +0,0 @@
|
|||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
||||||
// source: api/members/members.proto
|
|
||||||
|
|
||||||
package members
|
|
||||||
|
|
||||||
import (
|
|
||||||
fmt "fmt"
|
|
||||||
math "math"
|
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
|
||||||
var _ = proto.Marshal
|
|
||||||
var _ = fmt.Errorf
|
|
||||||
var _ = math.Inf
|
|
||||||
|
|
||||||
func (this *AddMemberReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *AddMemberResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditMemberReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditMemberResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DeleteMemberReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DeleteMemberResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *Filtrate) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *GetMemberListReq) Validate() error {
|
|
||||||
if this.Filtrate != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *GetMemberListResp) 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 *Member) Validate() error {
|
|
||||||
if this.Management != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Management); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Management", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if this.BoardOfDirectors != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.BoardOfDirectors); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("BoardOfDirectors", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if this.CommitteeAppointments != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.CommitteeAppointments); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("CommitteeAppointments", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *Management) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditManagementReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditManagementResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayManagementReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayManagementResp) Validate() error {
|
|
||||||
for _, item := range this.Item {
|
|
||||||
if item != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayManagementItem) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *BoardOfDirectors) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditBoardOfDirectorsReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditBoardOfDirectorsResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayBoardOfDirectorsReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayBoardOfDirectorsResp) Validate() error {
|
|
||||||
for _, item := range this.Item {
|
|
||||||
if item != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayBoardOfDirectorItem) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *CommitteeAppointments) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditCommitteeAppointmentsReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditCommitteeAppointmentsResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayCommitteeAppointmentsReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayCommitteeAppointmentsResp) Validate() error {
|
|
||||||
for _, item := range this.Item {
|
|
||||||
if item != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayCommitteeAppointmentsItem) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,560 +0,0 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// - protoc-gen-go-triple v1.0.5
|
|
||||||
// - protoc v5.26.0
|
|
||||||
// source: api/members/members.proto
|
|
||||||
|
|
||||||
package members
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "context"
|
|
||||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
|
||||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
|
||||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
|
||||||
grpc_go "github.com/dubbogo/grpc-go"
|
|
||||||
codes "github.com/dubbogo/grpc-go/codes"
|
|
||||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
|
||||||
status "github.com/dubbogo/grpc-go/status"
|
|
||||||
common "github.com/dubbogo/triple/pkg/common"
|
|
||||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
|
||||||
triple "github.com/dubbogo/triple/pkg/triple"
|
|
||||||
)
|
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
|
||||||
// is compatible with the grpc package it is being compiled against.
|
|
||||||
const _ = grpc_go.SupportPackageIsVersion7
|
|
||||||
|
|
||||||
// MembersClient is the client API for Members service.
|
|
||||||
//
|
|
||||||
// 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 MembersClient interface {
|
|
||||||
// ==================================成员管理======================================
|
|
||||||
AddMember(ctx context.Context, in *AddMemberReq, opts ...grpc_go.CallOption) (*AddMemberResp, common.ErrorWithAttachment)
|
|
||||||
EditMember(ctx context.Context, in *EditMemberReq, opts ...grpc_go.CallOption) (*EditMemberResp, common.ErrorWithAttachment)
|
|
||||||
DeleteMember(ctx context.Context, in *DeleteMemberReq, opts ...grpc_go.CallOption) (*DeleteMemberResp, common.ErrorWithAttachment)
|
|
||||||
GetMemberList(ctx context.Context, in *GetMemberListReq, opts ...grpc_go.CallOption) (*GetMemberListResp, common.ErrorWithAttachment)
|
|
||||||
// ===================================成员信息管理=======================================
|
|
||||||
EditManagement(ctx context.Context, in *EditManagementReq, opts ...grpc_go.CallOption) (*EditManagementResp, common.ErrorWithAttachment)
|
|
||||||
DisplayManagement(ctx context.Context, in *DisplayManagementReq, opts ...grpc_go.CallOption) (*DisplayManagementResp, common.ErrorWithAttachment)
|
|
||||||
// ===================================董事会信息管理=======================================
|
|
||||||
EditBoardOfDirectors(ctx context.Context, in *EditBoardOfDirectorsReq, opts ...grpc_go.CallOption) (*EditBoardOfDirectorsResp, common.ErrorWithAttachment)
|
|
||||||
DisplayBoardOfDirectors(ctx context.Context, in *DisplayBoardOfDirectorsReq, opts ...grpc_go.CallOption) (*DisplayBoardOfDirectorsResp, common.ErrorWithAttachment)
|
|
||||||
// ==================================委员会任命管理======================================
|
|
||||||
EditCommitteeAppointments(ctx context.Context, in *EditCommitteeAppointmentsReq, opts ...grpc_go.CallOption) (*EditCommitteeAppointmentsResp, common.ErrorWithAttachment)
|
|
||||||
DisplayCommitteeAppointments(ctx context.Context, in *DisplayCommitteeAppointmentsReq, opts ...grpc_go.CallOption) (*DisplayCommitteeAppointmentsResp, common.ErrorWithAttachment)
|
|
||||||
}
|
|
||||||
|
|
||||||
type membersClient struct {
|
|
||||||
cc *triple.TripleConn
|
|
||||||
}
|
|
||||||
|
|
||||||
type MembersClientImpl struct {
|
|
||||||
AddMember func(ctx context.Context, in *AddMemberReq) (*AddMemberResp, error)
|
|
||||||
EditMember func(ctx context.Context, in *EditMemberReq) (*EditMemberResp, error)
|
|
||||||
DeleteMember func(ctx context.Context, in *DeleteMemberReq) (*DeleteMemberResp, error)
|
|
||||||
GetMemberList func(ctx context.Context, in *GetMemberListReq) (*GetMemberListResp, error)
|
|
||||||
EditManagement func(ctx context.Context, in *EditManagementReq) (*EditManagementResp, error)
|
|
||||||
DisplayManagement func(ctx context.Context, in *DisplayManagementReq) (*DisplayManagementResp, error)
|
|
||||||
EditBoardOfDirectors func(ctx context.Context, in *EditBoardOfDirectorsReq) (*EditBoardOfDirectorsResp, error)
|
|
||||||
DisplayBoardOfDirectors func(ctx context.Context, in *DisplayBoardOfDirectorsReq) (*DisplayBoardOfDirectorsResp, error)
|
|
||||||
EditCommitteeAppointments func(ctx context.Context, in *EditCommitteeAppointmentsReq) (*EditCommitteeAppointmentsResp, error)
|
|
||||||
DisplayCommitteeAppointments func(ctx context.Context, in *DisplayCommitteeAppointmentsReq) (*DisplayCommitteeAppointmentsResp, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *MembersClientImpl) GetDubboStub(cc *triple.TripleConn) MembersClient {
|
|
||||||
return NewMembersClient(cc)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *MembersClientImpl) XXX_InterfaceName() string {
|
|
||||||
return "members.Members"
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewMembersClient(cc *triple.TripleConn) MembersClient {
|
|
||||||
return &membersClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) AddMember(ctx context.Context, in *AddMemberReq, opts ...grpc_go.CallOption) (*AddMemberResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(AddMemberResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddMember", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) EditMember(ctx context.Context, in *EditMemberReq, opts ...grpc_go.CallOption) (*EditMemberResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(EditMemberResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditMember", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) DeleteMember(ctx context.Context, in *DeleteMemberReq, opts ...grpc_go.CallOption) (*DeleteMemberResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(DeleteMemberResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteMember", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) GetMemberList(ctx context.Context, in *GetMemberListReq, opts ...grpc_go.CallOption) (*GetMemberListResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(GetMemberListResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetMemberList", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) EditManagement(ctx context.Context, in *EditManagementReq, opts ...grpc_go.CallOption) (*EditManagementResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(EditManagementResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditManagement", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) DisplayManagement(ctx context.Context, in *DisplayManagementReq, opts ...grpc_go.CallOption) (*DisplayManagementResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(DisplayManagementResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayManagement", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) EditBoardOfDirectors(ctx context.Context, in *EditBoardOfDirectorsReq, opts ...grpc_go.CallOption) (*EditBoardOfDirectorsResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(EditBoardOfDirectorsResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditBoardOfDirectors", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) DisplayBoardOfDirectors(ctx context.Context, in *DisplayBoardOfDirectorsReq, opts ...grpc_go.CallOption) (*DisplayBoardOfDirectorsResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(DisplayBoardOfDirectorsResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayBoardOfDirectors", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) EditCommitteeAppointments(ctx context.Context, in *EditCommitteeAppointmentsReq, opts ...grpc_go.CallOption) (*EditCommitteeAppointmentsResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(EditCommitteeAppointmentsResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditCommitteeAppointments", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *membersClient) DisplayCommitteeAppointments(ctx context.Context, in *DisplayCommitteeAppointmentsReq, opts ...grpc_go.CallOption) (*DisplayCommitteeAppointmentsResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(DisplayCommitteeAppointmentsResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayCommitteeAppointments", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
// MembersServer is the server API for Members service.
|
|
||||||
// All implementations must embed UnimplementedMembersServer
|
|
||||||
// for forward compatibility
|
|
||||||
type MembersServer interface {
|
|
||||||
// ==================================成员管理======================================
|
|
||||||
AddMember(context.Context, *AddMemberReq) (*AddMemberResp, error)
|
|
||||||
EditMember(context.Context, *EditMemberReq) (*EditMemberResp, error)
|
|
||||||
DeleteMember(context.Context, *DeleteMemberReq) (*DeleteMemberResp, error)
|
|
||||||
GetMemberList(context.Context, *GetMemberListReq) (*GetMemberListResp, error)
|
|
||||||
// ===================================成员信息管理=======================================
|
|
||||||
EditManagement(context.Context, *EditManagementReq) (*EditManagementResp, error)
|
|
||||||
DisplayManagement(context.Context, *DisplayManagementReq) (*DisplayManagementResp, error)
|
|
||||||
// ===================================董事会信息管理=======================================
|
|
||||||
EditBoardOfDirectors(context.Context, *EditBoardOfDirectorsReq) (*EditBoardOfDirectorsResp, error)
|
|
||||||
DisplayBoardOfDirectors(context.Context, *DisplayBoardOfDirectorsReq) (*DisplayBoardOfDirectorsResp, error)
|
|
||||||
// ==================================委员会任命管理======================================
|
|
||||||
EditCommitteeAppointments(context.Context, *EditCommitteeAppointmentsReq) (*EditCommitteeAppointmentsResp, error)
|
|
||||||
DisplayCommitteeAppointments(context.Context, *DisplayCommitteeAppointmentsReq) (*DisplayCommitteeAppointmentsResp, error)
|
|
||||||
mustEmbedUnimplementedMembersServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedMembersServer must be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedMembersServer struct {
|
|
||||||
proxyImpl protocol.Invoker
|
|
||||||
}
|
|
||||||
|
|
||||||
func (UnimplementedMembersServer) AddMember(context.Context, *AddMemberReq) (*AddMemberResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method AddMember not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMembersServer) EditMember(context.Context, *EditMemberReq) (*EditMemberResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method EditMember not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMembersServer) DeleteMember(context.Context, *DeleteMemberReq) (*DeleteMemberResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteMember not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMembersServer) GetMemberList(context.Context, *GetMemberListReq) (*GetMemberListResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetMemberList not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMembersServer) EditManagement(context.Context, *EditManagementReq) (*EditManagementResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method EditManagement not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMembersServer) DisplayManagement(context.Context, *DisplayManagementReq) (*DisplayManagementResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DisplayManagement not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMembersServer) EditBoardOfDirectors(context.Context, *EditBoardOfDirectorsReq) (*EditBoardOfDirectorsResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method EditBoardOfDirectors not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMembersServer) DisplayBoardOfDirectors(context.Context, *DisplayBoardOfDirectorsReq) (*DisplayBoardOfDirectorsResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DisplayBoardOfDirectors not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMembersServer) EditCommitteeAppointments(context.Context, *EditCommitteeAppointmentsReq) (*EditCommitteeAppointmentsResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method EditCommitteeAppointments not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedMembersServer) DisplayCommitteeAppointments(context.Context, *DisplayCommitteeAppointmentsReq) (*DisplayCommitteeAppointmentsResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DisplayCommitteeAppointments not implemented")
|
|
||||||
}
|
|
||||||
func (s *UnimplementedMembersServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
|
||||||
s.proxyImpl = impl
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *UnimplementedMembersServer) XXX_GetProxyImpl() protocol.Invoker {
|
|
||||||
return s.proxyImpl
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *UnimplementedMembersServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
|
||||||
return &Members_ServiceDesc
|
|
||||||
}
|
|
||||||
func (s *UnimplementedMembersServer) XXX_InterfaceName() string {
|
|
||||||
return "members.Members"
|
|
||||||
}
|
|
||||||
|
|
||||||
func (UnimplementedMembersServer) mustEmbedUnimplementedMembersServer() {}
|
|
||||||
|
|
||||||
// UnsafeMembersServer may be embedded to opt out of forward compatibility for this service.
|
|
||||||
// Use of this interface is not recommended, as added methods to MembersServer will
|
|
||||||
// result in compilation errors.
|
|
||||||
type UnsafeMembersServer interface {
|
|
||||||
mustEmbedUnimplementedMembersServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterMembersServer(s grpc_go.ServiceRegistrar, srv MembersServer) {
|
|
||||||
s.RegisterService(&Members_ServiceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Members_AddMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(AddMemberReq)
|
|
||||||
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("AddMember", 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 _Members_EditMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(EditMemberReq)
|
|
||||||
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("EditMember", 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 _Members_DeleteMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(DeleteMemberReq)
|
|
||||||
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("DeleteMember", 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 _Members_GetMemberList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(GetMemberListReq)
|
|
||||||
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("GetMemberList", 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 _Members_EditManagement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(EditManagementReq)
|
|
||||||
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("EditManagement", 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 _Members_DisplayManagement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(DisplayManagementReq)
|
|
||||||
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("DisplayManagement", 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 _Members_EditBoardOfDirectors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(EditBoardOfDirectorsReq)
|
|
||||||
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("EditBoardOfDirectors", 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 _Members_DisplayBoardOfDirectors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(DisplayBoardOfDirectorsReq)
|
|
||||||
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("DisplayBoardOfDirectors", 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 _Members_EditCommitteeAppointments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(EditCommitteeAppointmentsReq)
|
|
||||||
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("EditCommitteeAppointments", 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 _Members_DisplayCommitteeAppointments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(DisplayCommitteeAppointmentsReq)
|
|
||||||
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("DisplayCommitteeAppointments", 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)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Members_ServiceDesc is the grpc_go.ServiceDesc for Members service.
|
|
||||||
// It's only intended for direct use with grpc_go.RegisterService,
|
|
||||||
// and not to be introspected or modified (even as a copy)
|
|
||||||
var Members_ServiceDesc = grpc_go.ServiceDesc{
|
|
||||||
ServiceName: "members.Members",
|
|
||||||
HandlerType: (*MembersServer)(nil),
|
|
||||||
Methods: []grpc_go.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "AddMember",
|
|
||||||
Handler: _Members_AddMember_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "EditMember",
|
|
||||||
Handler: _Members_EditMember_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "DeleteMember",
|
|
||||||
Handler: _Members_DeleteMember_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "GetMemberList",
|
|
||||||
Handler: _Members_GetMemberList_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "EditManagement",
|
|
||||||
Handler: _Members_EditManagement_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "DisplayManagement",
|
|
||||||
Handler: _Members_DisplayManagement_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "EditBoardOfDirectors",
|
|
||||||
Handler: _Members_EditBoardOfDirectors_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "DisplayBoardOfDirectors",
|
|
||||||
Handler: _Members_DisplayBoardOfDirectors_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "EditCommitteeAppointments",
|
|
||||||
Handler: _Members_EditCommitteeAppointments_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "DisplayCommitteeAppointments",
|
|
||||||
Handler: _Members_DisplayCommitteeAppointments_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc_go.StreamDesc{},
|
|
||||||
Metadata: "api/members/members.proto",
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -1,138 +0,0 @@
|
|||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
||||||
// source: api/reports/reports.proto
|
|
||||||
|
|
||||||
package reports
|
|
||||||
|
|
||||||
import (
|
|
||||||
fmt "fmt"
|
|
||||||
math "math"
|
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
|
||||||
var _ = proto.Marshal
|
|
||||||
var _ = fmt.Errorf
|
|
||||||
var _ = math.Inf
|
|
||||||
|
|
||||||
func (this *Filtrate) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *FiltrateWeb) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *GetAnnualReportListReq) Validate() error {
|
|
||||||
if this.Filtrate != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *GetAnnualReportListResp) 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 *AnnualReport) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *AddAnnualReportReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *AddAnnualReportResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditAnnualReportReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditAnnualReportResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DeleteAnnualReportReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DeleteAnnualReportResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayAnnualReportReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayAnnualReportResp) Validate() error {
|
|
||||||
for _, item := range this.Item {
|
|
||||||
if item != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayAnnualReportItem) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *GetQuarterlyReportListReq) Validate() error {
|
|
||||||
if this.Filtrate != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *GetQuarterlyReportListResp) 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 *QuarterlyReport) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *AddQuarterlyReportReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *AddQuarterlyReportResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditQuarterlyReportReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *EditQuarterlyReportResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DeleteQuarterlyReportReq) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DeleteQuarterlyReportResp) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayQuarterlyReportReq) Validate() error {
|
|
||||||
if this.Filtrate != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayQuarterlyReportResp) Validate() error {
|
|
||||||
for _, item := range this.Item {
|
|
||||||
if item != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *DisplayQuarterlyReportItem) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
@ -1,556 +0,0 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// - protoc-gen-go-triple v1.0.5
|
|
||||||
// - protoc v5.26.0
|
|
||||||
// source: api/reports/reports.proto
|
|
||||||
|
|
||||||
package reports
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "context"
|
|
||||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
|
||||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
|
||||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
|
||||||
grpc_go "github.com/dubbogo/grpc-go"
|
|
||||||
codes "github.com/dubbogo/grpc-go/codes"
|
|
||||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
|
||||||
status "github.com/dubbogo/grpc-go/status"
|
|
||||||
common "github.com/dubbogo/triple/pkg/common"
|
|
||||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
|
||||||
triple "github.com/dubbogo/triple/pkg/triple"
|
|
||||||
)
|
|
||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
|
||||||
// is compatible with the grpc package it is being compiled against.
|
|
||||||
const _ = grpc_go.SupportPackageIsVersion7
|
|
||||||
|
|
||||||
// ReportsClient is the client API for Reports service.
|
|
||||||
//
|
|
||||||
// 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 ReportsClient interface {
|
|
||||||
// ==================================年度报告======================================
|
|
||||||
GetAnnualReportList(ctx context.Context, in *GetAnnualReportListReq, opts ...grpc_go.CallOption) (*GetAnnualReportListResp, common.ErrorWithAttachment)
|
|
||||||
AddAnnualReport(ctx context.Context, in *AddAnnualReportReq, opts ...grpc_go.CallOption) (*AddAnnualReportResp, common.ErrorWithAttachment)
|
|
||||||
EditAnnualReport(ctx context.Context, in *EditAnnualReportReq, opts ...grpc_go.CallOption) (*EditAnnualReportResp, common.ErrorWithAttachment)
|
|
||||||
DeleteAnnualReport(ctx context.Context, in *DeleteAnnualReportReq, opts ...grpc_go.CallOption) (*DeleteAnnualReportResp, common.ErrorWithAttachment)
|
|
||||||
DisplayAnnualReport(ctx context.Context, in *DisplayAnnualReportReq, opts ...grpc_go.CallOption) (*DisplayAnnualReportResp, common.ErrorWithAttachment)
|
|
||||||
// ==================================季度报告======================================
|
|
||||||
GetQuarterlyReportList(ctx context.Context, in *GetQuarterlyReportListReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportListResp, common.ErrorWithAttachment)
|
|
||||||
AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment)
|
|
||||||
EditQuarterlyReport(ctx context.Context, in *EditQuarterlyReportReq, opts ...grpc_go.CallOption) (*EditQuarterlyReportResp, common.ErrorWithAttachment)
|
|
||||||
DeleteQuarterlyReport(ctx context.Context, in *DeleteQuarterlyReportReq, opts ...grpc_go.CallOption) (*DeleteQuarterlyReportResp, common.ErrorWithAttachment)
|
|
||||||
DisplayQuarterlyReport(ctx context.Context, in *DisplayQuarterlyReportReq, opts ...grpc_go.CallOption) (*DisplayQuarterlyReportResp, common.ErrorWithAttachment)
|
|
||||||
}
|
|
||||||
|
|
||||||
type reportsClient struct {
|
|
||||||
cc *triple.TripleConn
|
|
||||||
}
|
|
||||||
|
|
||||||
type ReportsClientImpl struct {
|
|
||||||
GetAnnualReportList func(ctx context.Context, in *GetAnnualReportListReq) (*GetAnnualReportListResp, error)
|
|
||||||
AddAnnualReport func(ctx context.Context, in *AddAnnualReportReq) (*AddAnnualReportResp, error)
|
|
||||||
EditAnnualReport func(ctx context.Context, in *EditAnnualReportReq) (*EditAnnualReportResp, error)
|
|
||||||
DeleteAnnualReport func(ctx context.Context, in *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error)
|
|
||||||
DisplayAnnualReport func(ctx context.Context, in *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error)
|
|
||||||
GetQuarterlyReportList func(ctx context.Context, in *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error)
|
|
||||||
AddQuarterlyReport func(ctx context.Context, in *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
|
|
||||||
EditQuarterlyReport func(ctx context.Context, in *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error)
|
|
||||||
DeleteQuarterlyReport func(ctx context.Context, in *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error)
|
|
||||||
DisplayQuarterlyReport func(ctx context.Context, in *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ReportsClientImpl) GetDubboStub(cc *triple.TripleConn) ReportsClient {
|
|
||||||
return NewReportsClient(cc)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ReportsClientImpl) XXX_InterfaceName() string {
|
|
||||||
return "reports.Reports"
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewReportsClient(cc *triple.TripleConn) ReportsClient {
|
|
||||||
return &reportsClient{cc}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) GetAnnualReportList(ctx context.Context, in *GetAnnualReportListReq, opts ...grpc_go.CallOption) (*GetAnnualReportListResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(GetAnnualReportListResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetAnnualReportList", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) AddAnnualReport(ctx context.Context, in *AddAnnualReportReq, opts ...grpc_go.CallOption) (*AddAnnualReportResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(AddAnnualReportResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddAnnualReport", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) EditAnnualReport(ctx context.Context, in *EditAnnualReportReq, opts ...grpc_go.CallOption) (*EditAnnualReportResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(EditAnnualReportResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditAnnualReport", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) DeleteAnnualReport(ctx context.Context, in *DeleteAnnualReportReq, opts ...grpc_go.CallOption) (*DeleteAnnualReportResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(DeleteAnnualReportResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteAnnualReport", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) DisplayAnnualReport(ctx context.Context, in *DisplayAnnualReportReq, opts ...grpc_go.CallOption) (*DisplayAnnualReportResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(DisplayAnnualReportResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayAnnualReport", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) GetQuarterlyReportList(ctx context.Context, in *GetQuarterlyReportListReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportListResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(GetQuarterlyReportListResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetQuarterlyReportList", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(AddQuarterlyReportResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddQuarterlyReport", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) EditQuarterlyReport(ctx context.Context, in *EditQuarterlyReportReq, opts ...grpc_go.CallOption) (*EditQuarterlyReportResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(EditQuarterlyReportResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditQuarterlyReport", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) DeleteQuarterlyReport(ctx context.Context, in *DeleteQuarterlyReportReq, opts ...grpc_go.CallOption) (*DeleteQuarterlyReportResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(DeleteQuarterlyReportResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteQuarterlyReport", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *reportsClient) DisplayQuarterlyReport(ctx context.Context, in *DisplayQuarterlyReportReq, opts ...grpc_go.CallOption) (*DisplayQuarterlyReportResp, common.ErrorWithAttachment) {
|
|
||||||
out := new(DisplayQuarterlyReportResp)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayQuarterlyReport", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReportsServer is the server API for Reports service.
|
|
||||||
// All implementations must embed UnimplementedReportsServer
|
|
||||||
// for forward compatibility
|
|
||||||
type ReportsServer interface {
|
|
||||||
// ==================================年度报告======================================
|
|
||||||
GetAnnualReportList(context.Context, *GetAnnualReportListReq) (*GetAnnualReportListResp, error)
|
|
||||||
AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error)
|
|
||||||
EditAnnualReport(context.Context, *EditAnnualReportReq) (*EditAnnualReportResp, error)
|
|
||||||
DeleteAnnualReport(context.Context, *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error)
|
|
||||||
DisplayAnnualReport(context.Context, *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error)
|
|
||||||
// ==================================季度报告======================================
|
|
||||||
GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error)
|
|
||||||
AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
|
|
||||||
EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error)
|
|
||||||
DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error)
|
|
||||||
DisplayQuarterlyReport(context.Context, *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error)
|
|
||||||
mustEmbedUnimplementedReportsServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnimplementedReportsServer must be embedded to have forward compatible implementations.
|
|
||||||
type UnimplementedReportsServer struct {
|
|
||||||
proxyImpl protocol.Invoker
|
|
||||||
}
|
|
||||||
|
|
||||||
func (UnimplementedReportsServer) GetAnnualReportList(context.Context, *GetAnnualReportListReq) (*GetAnnualReportListResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetAnnualReportList not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedReportsServer) AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method AddAnnualReport not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedReportsServer) EditAnnualReport(context.Context, *EditAnnualReportReq) (*EditAnnualReportResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method EditAnnualReport not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedReportsServer) DeleteAnnualReport(context.Context, *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteAnnualReport not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedReportsServer) DisplayAnnualReport(context.Context, *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DisplayAnnualReport not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedReportsServer) GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetQuarterlyReportList not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedReportsServer) AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method AddQuarterlyReport not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedReportsServer) EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method EditQuarterlyReport not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedReportsServer) DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteQuarterlyReport not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedReportsServer) DisplayQuarterlyReport(context.Context, *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DisplayQuarterlyReport not implemented")
|
|
||||||
}
|
|
||||||
func (s *UnimplementedReportsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
|
||||||
s.proxyImpl = impl
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *UnimplementedReportsServer) XXX_GetProxyImpl() protocol.Invoker {
|
|
||||||
return s.proxyImpl
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *UnimplementedReportsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
|
||||||
return &Reports_ServiceDesc
|
|
||||||
}
|
|
||||||
func (s *UnimplementedReportsServer) XXX_InterfaceName() string {
|
|
||||||
return "reports.Reports"
|
|
||||||
}
|
|
||||||
|
|
||||||
func (UnimplementedReportsServer) mustEmbedUnimplementedReportsServer() {}
|
|
||||||
|
|
||||||
// UnsafeReportsServer may be embedded to opt out of forward compatibility for this service.
|
|
||||||
// Use of this interface is not recommended, as added methods to ReportsServer will
|
|
||||||
// result in compilation errors.
|
|
||||||
type UnsafeReportsServer interface {
|
|
||||||
mustEmbedUnimplementedReportsServer()
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterReportsServer(s grpc_go.ServiceRegistrar, srv ReportsServer) {
|
|
||||||
s.RegisterService(&Reports_ServiceDesc, srv)
|
|
||||||
}
|
|
||||||
|
|
||||||
func _Reports_GetAnnualReportList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(GetAnnualReportListReq)
|
|
||||||
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("GetAnnualReportList", 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 _Reports_AddAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(AddAnnualReportReq)
|
|
||||||
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("AddAnnualReport", 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 _Reports_EditAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(EditAnnualReportReq)
|
|
||||||
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("EditAnnualReport", 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 _Reports_DeleteAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(DeleteAnnualReportReq)
|
|
||||||
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("DeleteAnnualReport", 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 _Reports_DisplayAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(DisplayAnnualReportReq)
|
|
||||||
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("DisplayAnnualReport", 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 _Reports_GetQuarterlyReportList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(GetQuarterlyReportListReq)
|
|
||||||
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("GetQuarterlyReportList", 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 _Reports_AddQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(AddQuarterlyReportReq)
|
|
||||||
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("AddQuarterlyReport", 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 _Reports_EditQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(EditQuarterlyReportReq)
|
|
||||||
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("EditQuarterlyReport", 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 _Reports_DeleteQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(DeleteQuarterlyReportReq)
|
|
||||||
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("DeleteQuarterlyReport", 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 _Reports_DisplayQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(DisplayQuarterlyReportReq)
|
|
||||||
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("DisplayQuarterlyReport", 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)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reports_ServiceDesc is the grpc_go.ServiceDesc for Reports service.
|
|
||||||
// It's only intended for direct use with grpc_go.RegisterService,
|
|
||||||
// and not to be introspected or modified (even as a copy)
|
|
||||||
var Reports_ServiceDesc = grpc_go.ServiceDesc{
|
|
||||||
ServiceName: "reports.Reports",
|
|
||||||
HandlerType: (*ReportsServer)(nil),
|
|
||||||
Methods: []grpc_go.MethodDesc{
|
|
||||||
{
|
|
||||||
MethodName: "GetAnnualReportList",
|
|
||||||
Handler: _Reports_GetAnnualReportList_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "AddAnnualReport",
|
|
||||||
Handler: _Reports_AddAnnualReport_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "EditAnnualReport",
|
|
||||||
Handler: _Reports_EditAnnualReport_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "DeleteAnnualReport",
|
|
||||||
Handler: _Reports_DeleteAnnualReport_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "DisplayAnnualReport",
|
|
||||||
Handler: _Reports_DisplayAnnualReport_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "GetQuarterlyReportList",
|
|
||||||
Handler: _Reports_GetQuarterlyReportList_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "AddQuarterlyReport",
|
|
||||||
Handler: _Reports_AddQuarterlyReport_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "EditQuarterlyReport",
|
|
||||||
Handler: _Reports_EditQuarterlyReport_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "DeleteQuarterlyReport",
|
|
||||||
Handler: _Reports_DeleteQuarterlyReport_Handler,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MethodName: "DisplayQuarterlyReport",
|
|
||||||
Handler: _Reports_DisplayQuarterlyReport_Handler,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Streams: []grpc_go.StreamDesc{},
|
|
||||||
Metadata: "api/reports/reports.proto",
|
|
||||||
}
|
|
@ -21,6 +21,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"fonchain-fiee/cmd/config"
|
"fonchain-fiee/cmd/config"
|
||||||
"fonchain-fiee/pkg/cache"
|
"fonchain-fiee/pkg/cache"
|
||||||
|
"fonchain-fiee/pkg/common"
|
||||||
"fonchain-fiee/pkg/logger"
|
"fonchain-fiee/pkg/logger"
|
||||||
"fonchain-fiee/pkg/router"
|
"fonchain-fiee/pkg/router"
|
||||||
)
|
)
|
||||||
@ -55,6 +56,7 @@ func bootstrap() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cache.LoadRedis(redisConfig)
|
cache.LoadRedis(redisConfig)
|
||||||
|
common.Init()
|
||||||
//
|
//
|
||||||
//gpt.InitSet(configEnv.Ai.Host, configEnv.Ai.TelNum, configEnv.Ai.Password)
|
//gpt.InitSet(configEnv.Ai.Host, configEnv.Ai.TelNum, configEnv.Ai.Password)
|
||||||
return nil
|
return nil
|
||||||
|
@ -4,10 +4,11 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"fonchain-fiee/pkg/common"
|
"fonchain-fiee/pkg/common"
|
||||||
"github.com/BurntSushi/toml"
|
|
||||||
"gopkg.in/ini.v1"
|
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/BurntSushi/toml"
|
||||||
|
"gopkg.in/ini.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -117,6 +118,7 @@ type System struct {
|
|||||||
Domain string
|
Domain string
|
||||||
ErpHost string
|
ErpHost string
|
||||||
FieeHost string
|
FieeHost string
|
||||||
|
AuthRedirectUrl string
|
||||||
}
|
}
|
||||||
type Oss struct {
|
type Oss struct {
|
||||||
AccessKeyId string
|
AccessKeyId string
|
||||||
|
15
data/policy.html
Normal file
15
data/policy.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>隐私政策</title>
|
||||||
|
<style>
|
||||||
|
body { font-family: Arial, sans-serif; line-height: 1.6; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>H5系统隐私政策</p><p>生效日期:2025年9月2日</p><p>1. 信息收集与使用</p><p>收集的个人信息类型</p><p>基础信息:手机号、微信昵称、头像、设备信息(IMEI、操作系统版本)。</p><p>支付信息:订单号、支付金额、交易时间(通过加密方式传输,不存储银行卡信息)。</p><p>自媒体平台授权信息,例如:</p><p>抖音:API接口权限(仅限内容同步)。</p><p>内容生成数据:用户输入的关键词、风格偏好、历史生成内容。</p><p>收集目的</p><p>账号验证与支付:手机号用于身份核验,支付信息用于完成交易。</p><p>内容发布:通过授权信息调用第三方平台API,执行用户指令。</p><p>2. 信息共享与转让</p><p>第三方平台接口:仅在用户授权范围内调用API,不共享用户平台账号密码。</p><p>支付合作方:与微信支付、支付宝等服务商共享订单信息以完成交易。</p><p>法律要求:如配合司法机关调查或响应政府要求,可能披露必要信息。</p><p>3. 用户权利</p><p>访问与控制:</p><p>可随时在“个人中心”查看历史生成内容、订单记录及授权状态。</p><p>删除与撤回:</p><p>可申请删除个人账户及生成内容(不包含已同步至第三方平台的内容)。</p><p>4. 数据安全</p><p>技术措施:采用HTTPS加密传输、数据库脱敏存储,定期进行安全漏洞检测。</p><p>第三方SDK:仅接入必要SDK(如微信登录、地图服务等),并签署数据保密协议。</p><p>5. 隐私政策更新</p><p>如涉及重大变更(如新增数据收集项),将通过短信/邮件通知并要求重新授权。</p><p>6. 联系我们</p><p>如有疑问,请通过以下方式联系:</p><p>客服邮箱:develop@fiee.com</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
15
data/service.html
Normal file
15
data/service.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>服务条款</title>
|
||||||
|
<style>
|
||||||
|
body { font-family: Arial, sans-serif; line-height: 1.6; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>服务条款</p><p>生效日期:2025年9月2日</p><p>1. 接受条款</p><p>通过注册或使用本系统(以下简称“服务”),您确认已阅读、理解并同意以下条款。若您不同意本条款,请立即停止使用本服务。</p><p>2. 服务内容</p><p>本系统提供自媒体内容生成与发布服务,用户可购买套餐后生成图文、短视频等原创内容,并通过系统接口同步至指定自媒体平台(如微信公众号、抖音、小红书等)。</p><p>服务包含AI辅助创作、内容优化建议、一键发布功能,具体内容以实际功能模块为准。</p><p>3. 用户权利与义务</p><p>账号与支付</p><p>注册需提供手机号或微信授权,购买套餐需通过系统支持的支付方式(如微信支付、支付宝)。</p><p>您需确保支付账户信息真实有效,因虚假信息导致的损失由您自行承担。</p><p>内容生成与发布</p><p>生成内容为原创作品,最终发布权归用户所有。</p><p>用户需对生成内容进行人工审核,确认无误后方可发布。因内容违规导致的平台处罚或法律纠纷,责任由用户承担。</p><p>系统不对用户未审核内容的合规性负责,但有权对明显违法内容(如涉黄、涉政)进行过滤拦截。</p><p>第三方平台接口</p><p>用户需授权系统调用其自媒体平台API(如tiktok开发者接口),授权范围限于内容发布及数据同步。</p><p>授权信息仅用于执行用户指令,系统不存储用户平台账号密码等敏感信息。</p><p>4. 套餐与退款</p><p>套餐有效期自购买成功日起计算,逾期未使用的套餐不支持退款。</p><p>如因系统故障或服务瑕疵导致无法正常使用,可联系客服协商退款。</p><p>5. 知识产权</p><p>由系统生成的内容(如文案、图片)默认无版权归属限制,但用户需遵守以下规则:</p><p>不得将内容用于商业用途(如转售、批量分发);</p><p>不得篡改系统生成内容的署名或标识;</p><p>若内容包含第三方素材(如音乐、图片),用户需自行确保使用合法性。</p><p>6. 责任限制</p><p>系统不对以下情形承担责任:</p><p>用户未审核内容导致的平台封禁、投诉或法律风险;</p><p>第三方平台接口变更或服务中断;</p><p>因不可抗力(如网络故障)导致的发布延迟。</p><p>7. 其他</p><p>本条款解释权归服务提供方所有,更新后将在系统内公示,用户继续使用即视为同意。</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -6,6 +6,8 @@ Host = "https://common.szjixun.cn"
|
|||||||
RedirectUri = "/api/redirect/url"
|
RedirectUri = "/api/redirect/url"
|
||||||
ErpHost = "http://114.218.158.24:9020"
|
ErpHost = "http://114.218.158.24:9020"
|
||||||
FieeHost = "http://114.218.158.24:9020"
|
FieeHost = "http://114.218.158.24:9020"
|
||||||
|
AuthRedirectUrl = "http://172.16.100.99:9028/media_account"
|
||||||
|
|
||||||
[bos]
|
[bos]
|
||||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||||
|
@ -6,6 +6,7 @@ Host = "https://common.szjixun.cn"
|
|||||||
RedirectUri = "/api/redirect/url"
|
RedirectUri = "/api/redirect/url"
|
||||||
ErpHost = "https://erpapi.fontree.cn"
|
ErpHost = "https://erpapi.fontree.cn"
|
||||||
FieeHost = "https://erpapi.fiee.com"
|
FieeHost = "https://erpapi.fiee.com"
|
||||||
|
AuthRedirectUrl = "https://erp.fiee.com/media_account"
|
||||||
[bos]
|
[bos]
|
||||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||||
|
@ -6,6 +6,8 @@ Host = "https://common.szjixun.cn"
|
|||||||
RedirectUri = "/api/redirect/url"
|
RedirectUri = "/api/redirect/url"
|
||||||
ErpHost = "http://114.218.158.24:9020"
|
ErpHost = "http://114.218.158.24:9020"
|
||||||
FieeHost = "http://114.218.158.24:9020"
|
FieeHost = "http://114.218.158.24:9020"
|
||||||
|
FieeApiHost = "https://saas-test.szjixun.cn"
|
||||||
|
AuthRedirectUrl = "http://172.16.100.99:9028/media_account"
|
||||||
[bos]
|
[bos]
|
||||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||||
|
11
pkg/common/file.go
Normal file
11
pkg/common/file.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package common
|
||||||
|
|
||||||
|
import "fonchain-fiee/pkg/utils"
|
||||||
|
|
||||||
|
func Init() {
|
||||||
|
_ = utils.CreateDirPath("./runtime")
|
||||||
|
utils.CopyFile("./data/policy.html", "./runtime")
|
||||||
|
utils.CopyFile("./data/service.html", "./runtime")
|
||||||
|
utils.CopyFile("../data/policy.html", "./runtime")
|
||||||
|
utils.CopyFile("../data/service.html", "./runtime")
|
||||||
|
}
|
@ -4,11 +4,12 @@ import (
|
|||||||
"fonchain-fiee/pkg/middleware"
|
"fonchain-fiee/pkg/middleware"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
serviceCast "fonchain-fiee/pkg/service/cast"
|
serviceCast "fonchain-fiee/pkg/service/cast"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func MediaRouter(r *gin.RouterGroup) {
|
func MediaRouter(r *gin.RouterGroup) {
|
||||||
//noAuth := r.Group("")
|
noAuth := r.Group("")
|
||||||
auth := r.Group("")
|
auth := r.Group("")
|
||||||
auth.Use(middleware.CheckWebLogin(service.AccountProvider))
|
auth.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||||
media := auth.Group("media")
|
media := auth.Group("media")
|
||||||
@ -17,12 +18,14 @@ func MediaRouter(r *gin.RouterGroup) {
|
|||||||
media.POST("unbind-manager", serviceCast.UnbindManager)
|
media.POST("unbind-manager", serviceCast.UnbindManager)
|
||||||
media.POST("bind-manager", serviceCast.BindManager)
|
media.POST("bind-manager", serviceCast.BindManager)
|
||||||
media.POST("update-account", serviceCast.UpdateMediaAccount)
|
media.POST("update-account", serviceCast.UpdateMediaAccount)
|
||||||
media.POST("oauth-url", serviceCast.OAuthUrl)
|
media.POST("oauth-account", serviceCast.OAuthAccount)
|
||||||
|
media.POST("refresh-token", serviceCast.RefreshToken)
|
||||||
}
|
}
|
||||||
mediaNoLogin := r.Group("media")
|
mediaNoLogin := r.Group("media")
|
||||||
{
|
{
|
||||||
mediaNoLogin.GET("oauth2callback", serviceCast.OAuth2Callback)
|
mediaNoLogin.GET("oauth2callback", serviceCast.OAuth2Callback)
|
||||||
mediaNoLogin.GET("test", serviceCast.Test)
|
mediaNoLogin.Any("test", serviceCast.Test)
|
||||||
|
//mediaNoLogin.GET("dmoauth2callback", serviceCast.DMOAuth2Callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
work := auth.Group("work")
|
work := auth.Group("work")
|
||||||
@ -35,5 +38,11 @@ func MediaRouter(r *gin.RouterGroup) {
|
|||||||
work.POST("republish", serviceCast.RePublish)
|
work.POST("republish", serviceCast.RePublish)
|
||||||
work.POST("delete", serviceCast.DelWork)
|
work.POST("delete", serviceCast.DelWork)
|
||||||
work.POST("remind", serviceCast.Remind)
|
work.POST("remind", serviceCast.Remind)
|
||||||
|
work.POST("publish-info", serviceCast.PublishInfo)
|
||||||
|
}
|
||||||
|
|
||||||
|
social := noAuth.Group("social")
|
||||||
|
{
|
||||||
|
social.GET("tiktok-redirect", serviceCast.TikTokRedirect)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,16 +7,13 @@ import (
|
|||||||
"fonchain-fiee/pkg/service/account"
|
"fonchain-fiee/pkg/service/account"
|
||||||
"fonchain-fiee/pkg/service/asChat"
|
"fonchain-fiee/pkg/service/asChat"
|
||||||
"fonchain-fiee/pkg/service/auth"
|
"fonchain-fiee/pkg/service/auth"
|
||||||
emailAlert "fonchain-fiee/pkg/service/emailAlerts"
|
|
||||||
"fonchain-fiee/pkg/service/file"
|
"fonchain-fiee/pkg/service/file"
|
||||||
"fonchain-fiee/pkg/service/governance"
|
"fonchain-fiee/pkg/service/governance"
|
||||||
imports "fonchain-fiee/pkg/service/import"
|
imports "fonchain-fiee/pkg/service/import"
|
||||||
"fonchain-fiee/pkg/service/lang"
|
"fonchain-fiee/pkg/service/lang"
|
||||||
"fonchain-fiee/pkg/service/members"
|
|
||||||
"fonchain-fiee/pkg/service/pressreleases"
|
"fonchain-fiee/pkg/service/pressreleases"
|
||||||
"fonchain-fiee/pkg/service/qr"
|
"fonchain-fiee/pkg/service/qr"
|
||||||
"fonchain-fiee/pkg/service/redirect"
|
"fonchain-fiee/pkg/service/redirect"
|
||||||
"fonchain-fiee/pkg/service/reports"
|
|
||||||
"fonchain-fiee/pkg/service/upload"
|
"fonchain-fiee/pkg/service/upload"
|
||||||
"fonchain-fiee/pkg/service/version"
|
"fonchain-fiee/pkg/service/version"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -190,55 +187,13 @@ func NewRouter() *gin.Engine {
|
|||||||
pressreleasesRouteLogin.POST("/delete", pressreleases.Delete)
|
pressreleasesRouteLogin.POST("/delete", pressreleases.Delete)
|
||||||
|
|
||||||
}
|
}
|
||||||
{
|
|
||||||
// 官网报告
|
|
||||||
reportsRoute := v1.Group("/reports")
|
|
||||||
reportsRouteLogin := reportsRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
|
||||||
// 年度报告
|
|
||||||
reportsRoute.POST("/annual/display", middleware.Cors(), reports.AnnualReportDisplay)
|
|
||||||
reportsRouteLogin.POST("/annual/create", reports.AnnualReportCreate)
|
|
||||||
reportsRouteLogin.POST("/annual/list", reports.AnnualReportList)
|
|
||||||
reportsRouteLogin.POST("/annual/delete", reports.AnnualReportDelete)
|
|
||||||
reportsRouteLogin.POST("/annual/edit", reports.AnnualReportEdit)
|
|
||||||
// 季度报告
|
|
||||||
reportsRoute.POST("/quarterly/display", middleware.Cors(), reports.QuarterlyReportDisplay)
|
|
||||||
reportsRouteLogin.POST("/quarterly/create", reports.QuarterlyReportCreate)
|
|
||||||
reportsRouteLogin.POST("/quarterly/list", reports.QuarterlyReportList)
|
|
||||||
reportsRouteLogin.POST("/quarterly/delete", reports.QuarterlyReportDelete)
|
|
||||||
reportsRouteLogin.POST("/quarterly/edit", reports.QuarterlyReportEdit)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
// 邮箱通知
|
|
||||||
emailAlertsRoute := v1.Group("/emailalerts")
|
|
||||||
emailAlertsRouteLogin := emailAlertsRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
|
||||||
|
|
||||||
emailAlertsRoute.POST("/submit", middleware.Cors(), emailAlert.EmailAlertSubmit)
|
|
||||||
emailAlertsRouteLogin.POST("/list", emailAlert.GetEmailInformationList)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
// 成员管理
|
|
||||||
membersRoute := v1.Group("/members")
|
|
||||||
membersRouteLogin := membersRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
|
||||||
|
|
||||||
membersRouteLogin.POST("/add", members.AddMember)
|
|
||||||
membersRouteLogin.POST("/list", members.GetMemberList)
|
|
||||||
membersRouteLogin.POST("/edit", members.EditMember)
|
|
||||||
membersRouteLogin.POST("/delete", members.DeleteMember)
|
|
||||||
// 成员部门信息管理
|
|
||||||
membersRouteLogin.POST("/management/edit", members.EditManagement)
|
|
||||||
membersRoute.POST("/management/display", middleware.Cors(), members.DisplayManagement)
|
|
||||||
// 董事会信息管理
|
|
||||||
membersRouteLogin.POST("/boardofdirectors/edit", members.EditBoardOfDirectors)
|
|
||||||
membersRoute.POST("/boardofdirectors/display", middleware.Cors(), members.DisplayBoardOfDirectors)
|
|
||||||
// 委员会任命管理
|
|
||||||
membersRouteLogin.POST("/committeeappointments/edit", members.EditCommitteeAppointments)
|
|
||||||
membersRoute.POST("/committeeappointments/display", middleware.Cors(), members.DisplayCommitteeAppointments)
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
importRoute := v1.Group("/import")
|
importRoute := v1.Group("/import")
|
||||||
importRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
importRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||||
importRoute.POST("data/bind", imports.ImportBind)
|
importRoute.POST("data/bind", imports.ImportBind)
|
||||||
importRoute.POST("data/publish", imports.ImportPublish)
|
importRoute.POST("data/publish", imports.ImportPublish)
|
||||||
|
importRoute.POST("data/publish2", imports.ImportPublishV2)
|
||||||
|
importRoute.POST("data/publish3", imports.ImportPublishV3)
|
||||||
importRoute.POST("data/confirm", imports.WorkConfirm)
|
importRoute.POST("data/confirm", imports.WorkConfirm)
|
||||||
}
|
}
|
||||||
//静态文件
|
//静态文件
|
||||||
|
@ -24,6 +24,33 @@ func GetReconciliationList(c *gin.Context) {
|
|||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
res := &bundle.GetReconciliationListResp{}
|
||||||
|
// Step 1: 如果有姓名/电话筛选,先查用户列表
|
||||||
|
if req.UserName != "" {
|
||||||
|
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||||
|
BlurNameTel: req.UserName,
|
||||||
|
Domain: "app",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(userListResp.UserList) == 0 {
|
||||||
|
// 没查到用户,直接返回空结果
|
||||||
|
res.Page = req.Page
|
||||||
|
res.PageSize = req.PageSize
|
||||||
|
res.Total = 0
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取用户ID列表
|
||||||
|
for _, u := range userListResp.UserList {
|
||||||
|
req.UserIDS = append(req.UserIDS, u.Id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
req.UserName = ""
|
||||||
detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req)
|
detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req)
|
||||||
if detailErr != nil {
|
if detailErr != nil {
|
||||||
service.Error(c, detailErr)
|
service.Error(c, detailErr)
|
||||||
@ -63,6 +90,31 @@ func GetReconciliationListDownload(c *gin.Context) {
|
|||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
res := &bundle.GetReconciliationListResp{}
|
||||||
|
if req.UserName != "" {
|
||||||
|
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||||
|
BlurNameTel: req.UserName,
|
||||||
|
Domain: "app",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(userListResp.UserList) == 0 {
|
||||||
|
// 没查到用户,直接返回空结果
|
||||||
|
res.Page = req.Page
|
||||||
|
res.PageSize = req.PageSize
|
||||||
|
res.Total = 0
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取用户ID列表
|
||||||
|
for _, u := range userListResp.UserList {
|
||||||
|
req.UserIDS = append(req.UserIDS, u.Id)
|
||||||
|
}
|
||||||
|
}
|
||||||
detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req)
|
detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req)
|
||||||
if detailErr != nil {
|
if detailErr != nil {
|
||||||
service.Error(c, detailErr)
|
service.Error(c, detailErr)
|
||||||
@ -92,7 +144,7 @@ func GetReconciliationListDownload(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
titleList := []string{
|
titleList := []string{
|
||||||
"关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
|
"关联套餐订单号", "关联增值服务订单号", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
|
||||||
}
|
}
|
||||||
var dataList []interface{}
|
var dataList []interface{}
|
||||||
|
|
||||||
@ -106,7 +158,7 @@ func GetReconciliationListDownload(c *gin.Context) {
|
|||||||
data := []any{
|
data := []any{
|
||||||
i.BundleOrderOn,
|
i.BundleOrderOn,
|
||||||
i.BundleAddOrderOn,
|
i.BundleAddOrderOn,
|
||||||
i.CreationTime,
|
//i.CreationTime,
|
||||||
i.SubNum,
|
i.SubNum,
|
||||||
i.UserName,
|
i.UserName,
|
||||||
i.UserTel,
|
i.UserTel,
|
||||||
@ -306,7 +358,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
|||||||
)
|
)
|
||||||
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
|
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
|
||||||
contract := "https://e-cdn.fontree.cn/fonchain-main/prod/file/saas/contract/template-25032801.pdf"
|
contract := "https://e-cdn.fontree.cn/fonchain-main/prod/file/saas/contract/template-25032801.pdf"
|
||||||
expirationDay = t.AddDate(10, 0, 0).Format("2006-01-02")
|
expirationDay = t.AddDate(1, 0, 0).Format("2006-01-02")
|
||||||
signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay)
|
signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay)
|
||||||
if signContractErr != nil {
|
if signContractErr != nil {
|
||||||
service.Error(c, signContractErr)
|
service.Error(c, signContractErr)
|
||||||
|
@ -3,6 +3,7 @@ package cast
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"fonchain-fiee/api/accountFiee"
|
"fonchain-fiee/api/accountFiee"
|
||||||
"fonchain-fiee/api/bundle"
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
@ -10,9 +11,13 @@ import (
|
|||||||
"fonchain-fiee/pkg/e"
|
"fonchain-fiee/pkg/e"
|
||||||
modelCast "fonchain-fiee/pkg/model/cast"
|
modelCast "fonchain-fiee/pkg/model/cast"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"strconv"
|
"google.golang.org/protobuf/types/known/emptypb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func MediaUserList(ctx *gin.Context) {
|
func MediaUserList(ctx *gin.Context) {
|
||||||
@ -160,9 +165,10 @@ func UpdateMediaAccount(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func OAuthUrl(ctx *gin.Context) {
|
// 账号授权
|
||||||
var req *cast.OAuthYoutubeUrlReq
|
func OAuthAccount(ctx *gin.Context) {
|
||||||
var resp *cast.OAuthYoutubeUrlResp
|
var req *cast.OAuthAccountReq
|
||||||
|
var resp *cast.OAuthAccountResp
|
||||||
var err error
|
var err error
|
||||||
if err = ctx.ShouldBind(&req); err != nil {
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
@ -172,7 +178,7 @@ func OAuthUrl(ctx *gin.Context) {
|
|||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if resp, err = service.CastProvider.OAuthYoutubeUrl(ctx, req); err != nil {
|
if resp, err = service.CastProvider.OAuthAccount(ctx, req); err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -181,15 +187,63 @@ func OAuthUrl(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func OAuth2Callback(ctx *gin.Context) {
|
func OAuth2Callback(ctx *gin.Context) {
|
||||||
|
var (
|
||||||
|
platformIds string
|
||||||
|
userID string
|
||||||
|
)
|
||||||
code := ctx.Query("code")
|
code := ctx.Query("code")
|
||||||
state := ctx.Query("state")
|
state := ctx.Query("state")
|
||||||
//scope := ctx.Query("scope")
|
stateMM, _ := url.ParseQuery(state)
|
||||||
resp, err := service.CastProvider.OAuthYoutubeToken(ctx, &cast.OAuthYoutubeTokenReq{
|
if len(stateMM["platform_id"]) > 0 {
|
||||||
MediaAccountUuid: state,
|
platformIds = stateMM["platform_id"][0]
|
||||||
|
}
|
||||||
|
if len(stateMM["user_id"]) > 0 {
|
||||||
|
userID = stateMM["user_id"][0]
|
||||||
|
}
|
||||||
|
platformID, _ := strconv.ParseInt(platformIds, 10, 64)
|
||||||
|
req := &cast.OAuthCodeToTokenReq{
|
||||||
Code: code,
|
Code: code,
|
||||||
//scope: scope,
|
UserID: userID,
|
||||||
})
|
}
|
||||||
|
switch platformID {
|
||||||
|
case int64(cast.PlatformIDENUM_DM):
|
||||||
|
req.PlatformID = cast.PlatformIDENUM_DM
|
||||||
|
case int64(cast.PlatformIDENUM_TIKTOK):
|
||||||
|
req.PlatformID = cast.PlatformIDENUM_TIKTOK
|
||||||
|
default:
|
||||||
|
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
zap.L().Info("OAuth2Callback", zap.Any("req", req), zap.Any("code", code), zap.Any("state", state))
|
||||||
|
_, err := service.CastProvider.OAuthCodeToToken(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
zap.L().Info("OAuth2Callback error", zap.Error(err))
|
||||||
|
|
||||||
|
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=1"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// TODO 跳转到前端页面
|
||||||
|
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
|
||||||
|
//service.Success(ctx, map[string]interface{}{
|
||||||
|
// "req": req,
|
||||||
|
// "resp": resp,
|
||||||
|
//})
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func RefreshToken(ctx *gin.Context) {
|
||||||
|
var req *cast.RefreshTokenReq
|
||||||
|
var resp *cast.RefreshTokenResp
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if err = req.Validate(); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp, err = service.CastProvider.RefreshToken(ctx, req); err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -198,6 +252,6 @@ func OAuth2Callback(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Test(ctx *gin.Context) {
|
func Test(ctx *gin.Context) {
|
||||||
service.Success(ctx, nil)
|
service.CastProvider.Test(ctx, &emptypb.Empty{})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
package cast
|
|
38
pkg/service/cast/social.go
Normal file
38
pkg/service/cast/social.go
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
"net/url"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TikTokRedirect(ctx *gin.Context) {
|
||||||
|
var state, decodeParams, code string
|
||||||
|
var err error
|
||||||
|
var values url.Values
|
||||||
|
fmt.Println(code)
|
||||||
|
state = ctx.Query("state")
|
||||||
|
decodeParams, err = url.QueryUnescape(state)
|
||||||
|
values, err = url.ParseQuery(decodeParams)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
switch values.Get("source") {
|
||||||
|
case "authcode":
|
||||||
|
code = ctx.Query("code")
|
||||||
|
/*resp, _err := service.CastProvider.OAuthTikTokToken(ctx, &cast.OAuthTikTokTokenReq{
|
||||||
|
Code: code,
|
||||||
|
UserID: values.Get("userid"),
|
||||||
|
})
|
||||||
|
if _err != nil {
|
||||||
|
service.Error(ctx, _err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)*/
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
@ -11,7 +11,9 @@ import (
|
|||||||
"fonchain-fiee/pkg/e"
|
"fonchain-fiee/pkg/e"
|
||||||
modelCast "fonchain-fiee/pkg/model/cast"
|
modelCast "fonchain-fiee/pkg/model/cast"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
|
"fonchain-fiee/pkg/utils/stime"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
@ -31,6 +33,7 @@ func UpdateWorkImage(ctx *gin.Context) {
|
|||||||
ID: artistId,
|
ID: artistId,
|
||||||
Domain: "app",
|
Domain: "app",
|
||||||
})
|
})
|
||||||
|
zap.L().Info("UpdateWorkImage infoResp", zap.Any("infoResp", infoResp))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -53,6 +56,7 @@ func UpdateWorkImage(ctx *gin.Context) {
|
|||||||
newCtx := NewCtxWithUserInfo(ctx)
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
req.Source = 1
|
req.Source = 1
|
||||||
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
|
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
|
||||||
|
zap.L().Info("UpdateWorkImage resp", zap.Any("resp", resp))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -75,6 +79,7 @@ func UpdateWorkVideo(ctx *gin.Context) {
|
|||||||
ID: artistId,
|
ID: artistId,
|
||||||
Domain: "app",
|
Domain: "app",
|
||||||
})
|
})
|
||||||
|
zap.L().Info("UpdateWorkVideo", zap.Any("infoResp", infoResp))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -97,6 +102,7 @@ func UpdateWorkVideo(ctx *gin.Context) {
|
|||||||
newCtx := NewCtxWithUserInfo(ctx)
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
req.Source = 1
|
req.Source = 1
|
||||||
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req)
|
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req)
|
||||||
|
zap.L().Info("UpdateWorkVideo", zap.Any("resp", resp))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -146,6 +152,14 @@ func WorkList(ctx *gin.Context) {
|
|||||||
approvalID, _ := strconv.ParseUint(v.ApprovalID, 10, 64)
|
approvalID, _ := strconv.ParseUint(v.ApprovalID, 10, 64)
|
||||||
workUuidApprovalIDMap[int(approvalID)] = v.WorkUuid
|
workUuidApprovalIDMap[int(approvalID)] = v.WorkUuid
|
||||||
}
|
}
|
||||||
|
statusUpdateDate, _ := stime.DatetimeToTimes(v.StatusUpdateTime, "2006-01-02 15:04:05")
|
||||||
|
if v.WorkStatus == 6 && (time.Now().Unix()-int64(statusUpdateDate) < 300) {
|
||||||
|
go func() {
|
||||||
|
_, _ = service.CastProvider.PublishMediaInfo(context.Background(), &cast.PublishMediaInfoReq{
|
||||||
|
WorkUuid: v.WorkUuid,
|
||||||
|
})
|
||||||
|
}()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if len(workUuidApprovalIDMap) > 0 {
|
if len(workUuidApprovalIDMap) > 0 {
|
||||||
_ = RefreshWorkApprovalStatus(ctx, workUuidApprovalIDMap)
|
_ = RefreshWorkApprovalStatus(ctx, workUuidApprovalIDMap)
|
||||||
@ -176,8 +190,10 @@ func WorkDetail(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func CheckUserBundleBalance(userID int32, balanceType modelCast.BalanceTypeEnum) (err error) {
|
func CheckUserBundleBalance(userID int32, balanceType modelCast.BalanceTypeEnum) (err error) {
|
||||||
|
zap.L().Info("CheckUserBundleBalance", zap.Any("userID", userID))
|
||||||
resp, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{UserId: userID})
|
resp, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{UserId: userID})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
zap.L().Error("CheckUserBundleBalance", zap.Any("err", err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
zap.L().Info("CheckUserBundleBalance", zap.Any("resp", resp))
|
zap.L().Info("CheckUserBundleBalance", zap.Any("resp", resp))
|
||||||
@ -206,6 +222,7 @@ func RePublish(ctx *gin.Context) {
|
|||||||
var (
|
var (
|
||||||
req *cast.RePublishReq
|
req *cast.RePublishReq
|
||||||
resp *cast.RePublishResp
|
resp *cast.RePublishResp
|
||||||
|
//workInfoResp *cast.WorkInfoResp
|
||||||
)
|
)
|
||||||
var err error
|
var err error
|
||||||
if err = ctx.ShouldBind(&req); err != nil {
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
@ -213,28 +230,39 @@ func RePublish(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
newCtx := NewCtxWithUserInfo(ctx)
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
resp, err = service.CastProvider.RePublish(newCtx, req)
|
/* workInfoResp, err = service.CastProvider.WorkInfo(context.Background(), &cast.WorkInfoReq{
|
||||||
|
WorkUuid: req.WorkUuid,
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
artistID, _ := strconv.ParseUint(resp.ArtistUuid, 10, 64)
|
fmt.Println(workInfoResp)*/
|
||||||
|
/*artistID, _ := strconv.ParseInt(workInfoResp.ArtistUuid, 10, 64)
|
||||||
|
if err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeVideoValue); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
balanceReq := &bundle.AddBundleBalanceReq{
|
balanceReq := &bundle.AddBundleBalanceReq{
|
||||||
UserId: int32(artistID),
|
UserId: int32(artistID),
|
||||||
}
|
}
|
||||||
if resp.WorkCategory == 1 {
|
if workInfoResp.WorkCategory == 1 {
|
||||||
balanceReq.ImageConsumptionNumber = 1
|
balanceReq.ImageConsumptionNumber = 1
|
||||||
}
|
}
|
||||||
if resp.WorkCategory == 2 {
|
if workInfoResp.WorkCategory == 2 {
|
||||||
balanceReq.VideoConsumptionNumber = 1
|
balanceReq.VideoConsumptionNumber = 1
|
||||||
}
|
}
|
||||||
_, err = service.BundleProvider.AddBundleBalance(context.Background(), balanceReq)
|
_, err = service.BundleProvider.AddBundleBalance(context.Background(), balanceReq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
//FIXME 进行回滚
|
return
|
||||||
|
}*/
|
||||||
|
resp, err = service.CastProvider.RePublish(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
service.Success(ctx, nil)
|
service.Success(ctx, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,3 +392,20 @@ func Remind(ctx *gin.Context) {
|
|||||||
service.Success(ctx, nil)
|
service.Success(ctx, nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func PublishInfo(ctx *gin.Context) {
|
||||||
|
var req *cast.PublishMediaInfoReq
|
||||||
|
var resp *cast.PublishMediaInfoResp
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err = service.CastProvider.PublishMediaInfo(context.Background(), req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
package emailalerts
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fonchain-fiee/api/emailAlerts"
|
|
||||||
"fonchain-fiee/pkg/service"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
)
|
|
||||||
|
|
||||||
func EmailAlertSubmit(ctx *gin.Context) {
|
|
||||||
var req emailAlerts.EmailAlertsSubmitReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.EmailAlertsProvider.EmailAlertsSubmit(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetEmailInformationList(ctx *gin.Context) {
|
|
||||||
var req emailAlerts.GetEmailInformationListReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.EmailAlertsProvider.GetEmailInformationList(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
@ -4,13 +4,20 @@ import (
|
|||||||
apiCast "fonchain-fiee/api/cast"
|
apiCast "fonchain-fiee/api/cast"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type AccountInfo struct {
|
||||||
|
NickName string `json:"nickName"`
|
||||||
|
AccountId string `json:"accountId"`
|
||||||
|
}
|
||||||
type ArtistAccount struct {
|
type ArtistAccount struct {
|
||||||
|
Index string `json:"index"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Account map[apiCast.PlatformIDENUM]string `json:"account"`
|
SubNum string `json:"subNum"`
|
||||||
|
Account map[apiCast.PlatformIDENUM]AccountInfo `json:"account"`
|
||||||
}
|
}
|
||||||
type ArtistMedia struct {
|
type ArtistMedia struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
SubNum string `json:"subNum"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Img string `json:"img"`
|
Img string `json:"img"`
|
||||||
Video string `json:"video"`
|
Video string `json:"video"`
|
||||||
@ -31,6 +38,8 @@ type ArtistVideoDetail struct {
|
|||||||
Youtube string `json:"youtube"`
|
Youtube string `json:"youtube"`
|
||||||
Instagram string `json:"instagram"`
|
Instagram string `json:"instagram"`
|
||||||
TikTok string `json:"tiktok"`
|
TikTok string `json:"tiktok"`
|
||||||
|
ArtistId string `json:"artistId"`
|
||||||
|
SubNum string `json:"subNum"`
|
||||||
}
|
}
|
||||||
type CreateRequest struct {
|
type CreateRequest struct {
|
||||||
Type string `json:"Type"`
|
Type string `json:"Type"`
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
modelCast "fonchain-fiee/pkg/model/cast"
|
modelCast "fonchain-fiee/pkg/model/cast"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"fonchain-fiee/pkg/service/cast"
|
"fonchain-fiee/pkg/service/cast"
|
||||||
|
"fonchain-fiee/pkg/service/upload"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -23,11 +24,9 @@ import (
|
|||||||
"github.com/xuri/excelize/v2"
|
"github.com/xuri/excelize/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
type artu struct {
|
|
||||||
}
|
|
||||||
|
|
||||||
func ImportBind(c *gin.Context) {
|
func ImportBind(c *gin.Context) {
|
||||||
var failedRecords []FailedRecord
|
var failedRecords []FailedRecord
|
||||||
|
var record []*apiCast.UpdateMediaAccountReq
|
||||||
// 1. 上传文件
|
// 1. 上传文件
|
||||||
excelFile, err := c.FormFile("excel")
|
excelFile, err := c.FormFile("excel")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -59,6 +58,7 @@ func ImportBind(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
res, err := service.AccountFieeProvider.UserList(context.Background(), &account.UserListRequest{
|
res, err := service.AccountFieeProvider.UserList(context.Background(), &account.UserListRequest{
|
||||||
Name: artist.Name,
|
Name: artist.Name,
|
||||||
|
SubNum: artist.SubNum,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
failedRecords = append(failedRecords, FailedRecord{
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
@ -68,6 +68,14 @@ func ImportBind(c *gin.Context) {
|
|||||||
log.Printf(fmt.Sprintf("获取用户信息失败: %s", err.Error()))
|
log.Printf(fmt.Sprintf("获取用户信息失败: %s", err.Error()))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if res.Count == 0 {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: "未找到用户信息",
|
||||||
|
})
|
||||||
|
log.Printf("未找到用户信息")
|
||||||
|
continue
|
||||||
|
}
|
||||||
if res != nil && len(res.UserList) > 0 {
|
if res != nil && len(res.UserList) > 0 {
|
||||||
var infoResp *account.UserInfoResponse
|
var infoResp *account.UserInfoResponse
|
||||||
var err error
|
var err error
|
||||||
@ -119,11 +127,11 @@ func ImportBind(c *gin.Context) {
|
|||||||
log.Printf(fmt.Sprintf("增加账户数量失败: %s", err.Error()))
|
log.Printf(fmt.Sprintf("增加账户数量失败: %s", err.Error()))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
_, err = service.CastProvider.UpdateMediaAccount(c, &apiCast.UpdateMediaAccountReq{
|
mediaAccountInfoRes, err := service.CastProvider.UpdateMediaAccount(c, &apiCast.UpdateMediaAccountReq{
|
||||||
ArtistUuid: strconv.FormatUint(res.UserList[0].Id, 10),
|
ArtistUuid: strconv.FormatUint(res.UserList[0].Id, 10),
|
||||||
PlatformID: accountType,
|
PlatformID: accountType,
|
||||||
PlatformUserName: artist.Name,
|
PlatformUserName: accountInfo.NickName,
|
||||||
PlatformUserID: accountInfo,
|
PlatformUserID: accountInfo.AccountId,
|
||||||
ArtistName: infoResp.Name,
|
ArtistName: infoResp.Name,
|
||||||
ArtistPhone: infoResp.TelNum,
|
ArtistPhone: infoResp.TelNum,
|
||||||
ArtistPhoneAreaCode: infoResp.TelAreaCode,
|
ArtistPhoneAreaCode: infoResp.TelAreaCode,
|
||||||
@ -134,23 +142,39 @@ func ImportBind(c *gin.Context) {
|
|||||||
Msg: fmt.Sprintf("绑定账户信息失败: %s", err.Error()),
|
Msg: fmt.Sprintf("绑定账户信息失败: %s", err.Error()),
|
||||||
})
|
})
|
||||||
log.Printf(fmt.Sprintf("绑定账户信息失败: %s", err.Error()))
|
log.Printf(fmt.Sprintf("绑定账户信息失败: %s", err.Error()))
|
||||||
_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
_, err1 := service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||||
UserId: int32(res.UserList[0].Id),
|
UserId: int32(res.UserList[0].Id),
|
||||||
AccountConsumptionNumber: -1,
|
AccountConsumptionNumber: -1,
|
||||||
})
|
})
|
||||||
|
if err1 != nil {
|
||||||
failedRecords = append(failedRecords, FailedRecord{
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
Name: artist.Name,
|
Name: artist.Name,
|
||||||
Msg: fmt.Sprintf("绑定失败后减少余额失败: %s", err.Error()),
|
Msg: fmt.Sprintf("绑定失败后减少余额失败: %s", err1.Error()),
|
||||||
})
|
})
|
||||||
log.Println(fmt.Sprintf("绑定失败后减少余额失败: %s", err.Error()), errors.New(e.GetMsg(e.InvalidParams)))
|
log.Println(fmt.Sprintf("绑定失败后减少余额失败: %s", err1.Error()), errors.New(e.GetMsg(e.InvalidParams)))
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
|
}
|
||||||
}
|
record = append(record, &apiCast.UpdateMediaAccountReq{
|
||||||
|
MediaAccountUuid: mediaAccountInfoRes.MediaAccountUuid,
|
||||||
|
ArtistUuid: strconv.FormatUint(res.UserList[0].Id, 10),
|
||||||
|
PlatformID: accountType,
|
||||||
|
PlatformUserName: accountInfo.NickName,
|
||||||
|
PlatformUserID: accountInfo.AccountId,
|
||||||
|
ArtistName: infoResp.Name,
|
||||||
|
ArtistPhone: infoResp.TelNum,
|
||||||
|
ArtistPhoneAreaCode: infoResp.TelAreaCode,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
excelUrl, err := exportBindingRecordsToExcel(record)
|
||||||
// 5. 返回结果
|
// 5. 返回结果
|
||||||
service.Success(c, failedRecords)
|
service.Success(c, map[string]interface{}{
|
||||||
|
"excelUrl": excelUrl,
|
||||||
|
"failedRecords": failedRecords,
|
||||||
|
"accountInfo": artists,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func readArtistAccountInfo(excelPath string) ([]ArtistAccount, error) {
|
func readArtistAccountInfo(excelPath string) ([]ArtistAccount, error) {
|
||||||
@ -171,29 +195,96 @@ func readArtistAccountInfo(excelPath string) ([]ArtistAccount, error) {
|
|||||||
if i == 0 || len(row) < 2 {
|
if i == 0 || len(row) < 2 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if i == 58 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
tmp := ArtistAccount{
|
tmp := ArtistAccount{
|
||||||
Account: make(map[apiCast.PlatformIDENUM]string),
|
Account: make(map[apiCast.PlatformIDENUM]AccountInfo),
|
||||||
|
Index: strings.TrimSpace(row[0]),
|
||||||
Name: strings.TrimSpace(row[1]),
|
Name: strings.TrimSpace(row[1]),
|
||||||
|
SubNum: strings.TrimSpace(row[2]),
|
||||||
}
|
}
|
||||||
youtube, _ := f.GetCellValue(sheetName, fmt.Sprintf("C%d", i+1))
|
youtubeId, _ := f.GetCellValue(sheetName, fmt.Sprintf("D%d", i+1))
|
||||||
if youtube != "" {
|
youtubeNickName, _ := f.GetCellValue(sheetName, fmt.Sprintf("E%d", i+1))
|
||||||
tmp.Account[2] = strings.TrimSpace(youtube)
|
youtube := AccountInfo{
|
||||||
|
AccountId: strings.TrimSpace(youtubeId),
|
||||||
|
NickName: strings.TrimSpace(youtubeNickName),
|
||||||
|
}
|
||||||
|
tmp.Account[2] = youtube
|
||||||
|
|
||||||
|
insId, _ := f.GetCellValue(sheetName, fmt.Sprintf("F%d", i+1))
|
||||||
|
insNickName, _ := f.GetCellValue(sheetName, fmt.Sprintf("G%d", i+1))
|
||||||
|
ins := AccountInfo{
|
||||||
|
AccountId: strings.TrimSpace(insId),
|
||||||
|
NickName: strings.TrimSpace(insNickName),
|
||||||
}
|
}
|
||||||
ins, _ := f.GetCellValue(sheetName, fmt.Sprintf("D%d", i+1))
|
tmp.Account[3] = ins
|
||||||
if ins != "" {
|
|
||||||
tmp.Account[3] = strings.TrimSpace(ins)
|
|
||||||
|
|
||||||
|
tiktokId, _ := f.GetCellValue(sheetName, fmt.Sprintf("H%d", i+1))
|
||||||
|
tiktokNiackName, _ := f.GetCellValue(sheetName, fmt.Sprintf("I%d", i+1))
|
||||||
|
tiktok := AccountInfo{
|
||||||
|
AccountId: strings.TrimSpace(tiktokId),
|
||||||
|
NickName: strings.TrimSpace(tiktokNiackName),
|
||||||
}
|
}
|
||||||
tiktok, _ := f.GetCellValue(sheetName, fmt.Sprintf("E%d", i+1))
|
tmp.Account[1] = tiktok
|
||||||
if tiktok != "" {
|
|
||||||
tmp.Account[1] = strings.TrimSpace(tiktok)
|
|
||||||
|
|
||||||
}
|
|
||||||
artists = append(artists, tmp)
|
artists = append(artists, tmp)
|
||||||
}
|
}
|
||||||
return artists, nil
|
return artists, nil
|
||||||
}
|
}
|
||||||
|
func exportBindingRecordsToExcel(records []*apiCast.UpdateMediaAccountReq) (string, error) {
|
||||||
|
fileDir := "./runtime/import/"
|
||||||
|
filename := "绑定账户记录.xlsx"
|
||||||
|
filePath := filepath.Join(fileDir, filename)
|
||||||
|
|
||||||
|
// 创建目录
|
||||||
|
_ = os.MkdirAll(fileDir, os.ModePerm)
|
||||||
|
|
||||||
|
var f *excelize.File
|
||||||
|
sheet := "Sheet1"
|
||||||
|
|
||||||
|
// 判断文件是否存在
|
||||||
|
if _, err := os.Stat(filePath); os.IsNotExist(err) {
|
||||||
|
f = excelize.NewFile()
|
||||||
|
f.NewSheet(sheet)
|
||||||
|
headers := []string{"序号", "MediaAccountUuid", "ArtistUuid", "PlatformID", "PlatformUserName", "PlatformUserID", "ArtistName", "ArtistPhone", "ArtistPhoneAreaCode"}
|
||||||
|
for col, h := range headers {
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("%c1", 'A'+col), h)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var err error
|
||||||
|
f, err = excelize.OpenFile(filePath)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 找到最后一行
|
||||||
|
rows, err := f.GetRows(sheet)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
startRow := len(rows) + 1
|
||||||
|
|
||||||
|
// 写入数据
|
||||||
|
for i, r := range records {
|
||||||
|
row := startRow + i
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("A%d", row), i+1)
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("B%d", row), r.MediaAccountUuid)
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("C%d", row), r.ArtistUuid)
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("D%d", row), r.PlatformID)
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("E%d", row), r.PlatformUserName)
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("F%d", row), r.PlatformUserID)
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("G%d", row), r.ArtistName)
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("H%d", row), r.ArtistPhone)
|
||||||
|
_ = f.SetCellValue(sheet, fmt.Sprintf("I%d", row), r.ArtistPhoneAreaCode)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存
|
||||||
|
if err = f.SaveAs(filePath); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
// 上传
|
||||||
|
excelUrl, err := upload.PutBos(filePath, "excel", true)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return excelUrl, nil
|
||||||
|
}
|
||||||
|
@ -1,52 +1,53 @@
|
|||||||
package imports
|
package imports
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
account "fonchain-fiee/api/accountFiee"
|
|
||||||
"fonchain-fiee/api/bundle"
|
"fonchain-fiee/api/bundle"
|
||||||
apiCast "fonchain-fiee/api/cast"
|
apiCast "fonchain-fiee/api/cast"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"fonchain-fiee/pkg/service/cast"
|
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/xuri/excelize/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||||
newCtx := cast.NewCtxWithUserInfo(c)
|
excelFile, err := c.FormFile("excel")
|
||||||
list, err := service.CastProvider.WorkList(newCtx, &apiCast.WorkListReq{
|
|
||||||
WorkStatus: 4,
|
|
||||||
Page: 1,
|
|
||||||
PageSize: 999,
|
|
||||||
})
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(c, err)
|
c.JSON(400, gin.H{"error": "缺少 Excel 文件 excel"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(list.Data) == 0 {
|
// 2. 保存临时文件
|
||||||
service.Error(c, errors.New("没有待确认的作品"))
|
tempDir := "tmp"
|
||||||
|
os.MkdirAll(tempDir, 0755)
|
||||||
|
excelPath := filepath.Join(tempDir, "artists.xlsx")
|
||||||
|
if err = c.SaveUploadedFile(excelFile, excelPath); err != nil {
|
||||||
|
c.JSON(500, gin.H{"error": "保存 Excel 失败"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer os.RemoveAll(tempDir)
|
||||||
|
// 3. 读取 Excel 视频发布信息
|
||||||
|
artists, err := readCastWorkList(excelPath)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(500, gin.H{"error": "读取 Excel 失败"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//遍历更新状态
|
//遍历更新状态
|
||||||
var failedRecords []FailedRecord
|
var failedRecords []FailedRecord
|
||||||
for _, v := range list.Data {
|
for _, v := range artists {
|
||||||
res, err := service.AccountFieeProvider.UserList(context.Background(), &account.UserListRequest{
|
artistId, err := strconv.ParseUint(v.ArtistId, 10, 32)
|
||||||
Name: v.ArtistName,
|
|
||||||
})
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
failedRecords = append(failedRecords, FailedRecord{
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
Name: v.ArtistName,
|
Name: v.ArtistName,
|
||||||
Msg: fmt.Sprintf("获取用户信息失败: %s", err.Error()),
|
Msg: fmt.Sprintf("解析用户ID失败: %s", err.Error()),
|
||||||
})
|
})
|
||||||
log.Printf(fmt.Sprintf("获取用户信息失败: %s", err.Error()))
|
log.Printf(fmt.Sprintf("解析用户ID失败: %s", err.Error()))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
var artistId uint64
|
|
||||||
if res != nil && len(res.UserList) > 0 {
|
|
||||||
artistId = res.UserList[0].Id
|
|
||||||
}
|
|
||||||
_, err = service.BundleProvider.AddBundleBalance(c, &bundle.AddBundleBalanceReq{
|
_, err = service.BundleProvider.AddBundleBalance(c, &bundle.AddBundleBalanceReq{
|
||||||
UserId: int32(artistId),
|
UserId: int32(artistId),
|
||||||
VideoConsumptionNumber: 1,
|
VideoConsumptionNumber: 1,
|
||||||
@ -64,6 +65,7 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
|||||||
WorkUuid: v.WorkUuid,
|
WorkUuid: v.WorkUuid,
|
||||||
ConfirmRemark: "",
|
ConfirmRemark: "",
|
||||||
ConfirmStatus: 1,
|
ConfirmStatus: 1,
|
||||||
|
AutoPublish: apiCast.AutoPublishENUM_AutoPublish_FALSE,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
failedRecords = append(failedRecords, FailedRecord{
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
@ -76,3 +78,30 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
|||||||
}
|
}
|
||||||
service.Success(c, failedRecords)
|
service.Success(c, failedRecords)
|
||||||
}
|
}
|
||||||
|
func readCastWorkList(excelPath string) ([]ArtistVideoDetail, error) {
|
||||||
|
f, err := excelize.OpenFile(excelPath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
|
||||||
|
sheetName := f.GetSheetName(0)
|
||||||
|
rows, err := f.GetRows(sheetName)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
log.Println("start read excel...")
|
||||||
|
var artistVideos []ArtistVideoDetail
|
||||||
|
for i, row := range rows {
|
||||||
|
if i == 0 || len(row) < 2 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
tmp := ArtistVideoDetail{
|
||||||
|
ArtistId: strings.TrimSpace(row[0]),
|
||||||
|
ArtistName: strings.TrimSpace(row[1]),
|
||||||
|
WorkUuid: strings.TrimSpace(row[2]),
|
||||||
|
}
|
||||||
|
artistVideos = append(artistVideos, tmp)
|
||||||
|
}
|
||||||
|
return artistVideos, nil
|
||||||
|
}
|
||||||
|
@ -1,23 +1,18 @@
|
|||||||
package imports
|
package imports
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"fonchain-fiee/api/accountFiee"
|
"fonchain-fiee/api/accountFiee"
|
||||||
"fonchain-fiee/api/bundle"
|
|
||||||
apiCast "fonchain-fiee/api/cast"
|
apiCast "fonchain-fiee/api/cast"
|
||||||
"fonchain-fiee/api/files"
|
"fonchain-fiee/api/files"
|
||||||
"fonchain-fiee/pkg/config"
|
"fonchain-fiee/cmd/config"
|
||||||
"fonchain-fiee/pkg/model"
|
"fonchain-fiee/pkg/model"
|
||||||
modelCast "fonchain-fiee/pkg/model/cast"
|
modelCast "fonchain-fiee/pkg/model/cast"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"fonchain-fiee/pkg/service/cast"
|
"fonchain-fiee/pkg/service/cast"
|
||||||
"fonchain-fiee/pkg/service/upload"
|
"fonchain-fiee/pkg/service/upload"
|
||||||
"io"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -47,16 +42,18 @@ func ImportPublish(c *gin.Context) {
|
|||||||
os.MkdirAll(tempDir, 0755)
|
os.MkdirAll(tempDir, 0755)
|
||||||
excelPath := filepath.Join(tempDir, "artists.xlsx")
|
excelPath := filepath.Join(tempDir, "artists.xlsx")
|
||||||
zipPath := filepath.Join(tempDir, "archive.zip")
|
zipPath := filepath.Join(tempDir, "archive.zip")
|
||||||
|
fmt.Println("before save excel...")
|
||||||
|
now := time.Now()
|
||||||
if err = c.SaveUploadedFile(excelFile, excelPath); err != nil {
|
if err = c.SaveUploadedFile(excelFile, excelPath); err != nil {
|
||||||
c.JSON(500, gin.H{"error": "保存 Excel 失败"})
|
c.JSON(500, gin.H{"error": "保存 Excel 失败"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println("save excel success", time.Since(now))
|
||||||
if err = c.SaveUploadedFile(zipFile, zipPath); err != nil {
|
if err = c.SaveUploadedFile(zipFile, zipPath); err != nil {
|
||||||
c.JSON(500, gin.H{"error": "保存 ZIP 文件失败"})
|
c.JSON(500, gin.H{"error": "保存 ZIP 文件失败"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println("save zip success", time.Since(now))
|
||||||
// 3. 解压 ZIP
|
// 3. 解压 ZIP
|
||||||
unzipPath := filepath.Join(tempDir, "unzipped")
|
unzipPath := filepath.Join(tempDir, "unzipped")
|
||||||
if _, err = os.Stat(unzipPath); err == nil {
|
if _, err = os.Stat(unzipPath); err == nil {
|
||||||
@ -66,6 +63,7 @@ func ImportPublish(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fmt.Println("开始解压...")
|
||||||
os.MkdirAll(unzipPath, 0755)
|
os.MkdirAll(unzipPath, 0755)
|
||||||
if err = archiver.Unarchive(zipPath, unzipPath); err != nil {
|
if err = archiver.Unarchive(zipPath, unzipPath); err != nil {
|
||||||
c.JSON(500, gin.H{"error": "解压 ZIP 失败: " + err.Error()})
|
c.JSON(500, gin.H{"error": "解压 ZIP 失败: " + err.Error()})
|
||||||
@ -76,11 +74,11 @@ func ImportPublish(c *gin.Context) {
|
|||||||
c.JSON(500, gin.H{"error": "读取解压目录失败或目录为空"})
|
c.JSON(500, gin.H{"error": "读取解压目录失败或目录为空"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(entries) == 1 && entries[0].IsDir() {
|
if len(entries) == 1 && entries[0].IsDir() {
|
||||||
// 说明解压后多了一层目录,把它设为新的 unzipPath
|
// 说明解压后多了一层目录,把它设为新的 unzipPath
|
||||||
unzipPath = filepath.Join(unzipPath, entries[0].Name())
|
unzipPath = filepath.Join(unzipPath, entries[0].Name())
|
||||||
}
|
}
|
||||||
|
fmt.Println("开始读取excel...")
|
||||||
defer os.RemoveAll(tempDir)
|
defer os.RemoveAll(tempDir)
|
||||||
// 4. 读取 Excel 画家名单, 匹配视频和图片
|
// 4. 读取 Excel 画家名单, 匹配视频和图片
|
||||||
artists, err := readArtistVideoInfo(excelPath, unzipPath)
|
artists, err := readArtistVideoInfo(excelPath, unzipPath)
|
||||||
@ -91,12 +89,12 @@ func ImportPublish(c *gin.Context) {
|
|||||||
// 5.发布视频
|
// 5.发布视频
|
||||||
var failedRecords []FailedRecord
|
var failedRecords []FailedRecord
|
||||||
var artistResp []ArtistVideoDetail
|
var artistResp []ArtistVideoDetail
|
||||||
|
fmt.Println("artists num: ", len(artists))
|
||||||
for _, artist := range artists {
|
for _, artist := range artists {
|
||||||
var infoResp *accountFiee.UserInfoResponse
|
var infoResp *accountFiee.UserInfoResponse
|
||||||
var err error
|
|
||||||
list, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
list, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||||
Name: artist.Name,
|
Name: artist.Name,
|
||||||
|
SubNum: artist.SubNum,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
failedRecords = append(failedRecords, FailedRecord{
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
@ -106,6 +104,14 @@ func ImportPublish(c *gin.Context) {
|
|||||||
log.Printf(fmt.Sprintf("获取用户信息失败: %s", err.Error()))
|
log.Printf(fmt.Sprintf("获取用户信息失败: %s", err.Error()))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if len(list.UserList) == 0 {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("未找到用户信息: %s", artist.Name),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("未找到用户信息: %s", artist.Name))
|
||||||
|
continue
|
||||||
|
}
|
||||||
if list != nil && len(list.UserList) > 0 {
|
if list != nil && len(list.UserList) > 0 {
|
||||||
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||||
ID: list.UserList[0].Id,
|
ID: list.UserList[0].Id,
|
||||||
@ -131,7 +137,226 @@ func ImportPublish(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
//自媒体账号
|
//自媒体账号
|
||||||
accountList, err := service.CastProvider.MediaUserList(c, &apiCast.MediaUserListReq{
|
accountList, err := service.CastProvider.MediaUserList(c, &apiCast.MediaUserListReq{
|
||||||
//ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
|
ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
|
||||||
|
ArtistVal: artist.Name,
|
||||||
|
Page: 1,
|
||||||
|
PageSize: 10,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("自媒体账号数量获取失败: %s,账号数量:%d", err.Error(), len(accountList.Data)),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("自媒体账号数量获取失败: %s,账号数量:%d", err.Error(), len(accountList.Data)))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if accountList == nil || len(accountList.Data) == 0 {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: "自媒体账号数量为0",
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("自媒体账号,账号数量:%d", len(accountList.Data)))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
mediaAccountUuids := []string{}
|
||||||
|
mediaAccountNames := []string{}
|
||||||
|
platformIDs := []apiCast.PlatformIDENUM{}
|
||||||
|
for _, info := range accountList.Data {
|
||||||
|
if info.PlatformID == 2 && ((artist.Id == "31" && info.ArtistName == "荣小松") ||
|
||||||
|
(artist.Id == "72" && info.ArtistName == "韩风霞")) {
|
||||||
|
continue // 跳过
|
||||||
|
}
|
||||||
|
mediaAccountUuids = append(mediaAccountUuids, info.MediaAccountUuid)
|
||||||
|
mediaAccountNames = append(mediaAccountNames, info.PlatformUserName)
|
||||||
|
platformIDs = append(platformIDs, apiCast.PlatformIDENUM(info.PlatformID))
|
||||||
|
}
|
||||||
|
newCtx := cast.NewCtxWithUserInfo(c)
|
||||||
|
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, &apiCast.UpdateWorkVideoReq{
|
||||||
|
Title: artist.Title,
|
||||||
|
Content: artist.Title,
|
||||||
|
VideoUrl: artist.Video,
|
||||||
|
CoverUrl: artist.Img,
|
||||||
|
AutoPublish: apiCast.AutoPublishENUM_AutoPublish_FALSE,
|
||||||
|
MediaAccountUuids: mediaAccountUuids,
|
||||||
|
MediaAccountNames: mediaAccountNames,
|
||||||
|
PlatformIDs: platformIDs,
|
||||||
|
PublishConfig1: &apiCast.PublishConfig{
|
||||||
|
CanComment: 1,
|
||||||
|
CanJoin: 1,
|
||||||
|
CanQuote: 1,
|
||||||
|
ForbidComment: 2,
|
||||||
|
IsAI: 1,
|
||||||
|
PublicType: 1,
|
||||||
|
},
|
||||||
|
PublishConfig2: &apiCast.PublishConfig{
|
||||||
|
CanComment: 1,
|
||||||
|
CanJoin: 1,
|
||||||
|
CanQuote: 1,
|
||||||
|
ForbidComment: 2,
|
||||||
|
IsAI: 1,
|
||||||
|
PublicType: 1,
|
||||||
|
},
|
||||||
|
PublishConfig3: &apiCast.PublishConfig{
|
||||||
|
CanComment: 1,
|
||||||
|
CanJoin: 1,
|
||||||
|
CanQuote: 1,
|
||||||
|
ForbidComment: 1,
|
||||||
|
IsAI: 1,
|
||||||
|
PublicType: 1,
|
||||||
|
},
|
||||||
|
Action: "submit",
|
||||||
|
ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
|
||||||
|
ArtistName: infoResp.Name,
|
||||||
|
ArtistPhone: infoResp.TelNum,
|
||||||
|
ArtistPhoneAreaCode: infoResp.TelAreaCode,
|
||||||
|
Source: 2,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("发布"+artist.Name+"视频"+artist.Title+"失败: %s", err.Error()),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("发布"+artist.Name+"视频"+artist.Title+"失败: %s", err.Error()))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
artistResp = append(artistResp, ArtistVideoDetail{
|
||||||
|
Id: artist.Id,
|
||||||
|
ArtistName: artist.Name,
|
||||||
|
SubNum: artist.SubNum,
|
||||||
|
Title: artist.Title,
|
||||||
|
WorkUuid: resp.WorkUuid,
|
||||||
|
Youtube: artist.Youtube,
|
||||||
|
Instagram: artist.Instagram,
|
||||||
|
TikTok: artist.TikTok,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// excelUrl, err := exportPublishRecordsToExcel(artistResp)
|
||||||
|
// if err != nil {
|
||||||
|
// service.Error(c, err)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 6. 返回结果
|
||||||
|
service.Success(c, map[string]interface{}{
|
||||||
|
//"excelUrl": excelUrl,
|
||||||
|
"failedRecords": failedRecords,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
func ImportPublishV2(c *gin.Context) {
|
||||||
|
// 1. 上传画家短视频详情文件
|
||||||
|
excelFile, err := c.FormFile("excel")
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(400, gin.H{"error": "缺少 Excel 文件 excel"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
zipFile, err := c.FormFile("zip")
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(400, gin.H{"error": "缺少 ZIP 文件"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 保存临时文件
|
||||||
|
tempDir := "tmp"
|
||||||
|
os.MkdirAll(tempDir, 0755)
|
||||||
|
excelPath := filepath.Join(tempDir, "artists.xlsx")
|
||||||
|
zipPath := filepath.Join(tempDir, "archive.zip")
|
||||||
|
fmt.Println("before save excel...")
|
||||||
|
now := time.Now()
|
||||||
|
if err = c.SaveUploadedFile(excelFile, excelPath); err != nil {
|
||||||
|
c.JSON(500, gin.H{"error": "保存 Excel 失败"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fmt.Println("save excel success", time.Since(now))
|
||||||
|
if err = c.SaveUploadedFile(zipFile, zipPath); err != nil {
|
||||||
|
c.JSON(500, gin.H{"error": "保存 ZIP 文件失败"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fmt.Println("save zip success", time.Since(now))
|
||||||
|
// 3. 解压 ZIP
|
||||||
|
unzipPath := filepath.Join(tempDir, "unzipped")
|
||||||
|
if _, err = os.Stat(unzipPath); err == nil {
|
||||||
|
// 路径已存在,删除
|
||||||
|
if removeErr := os.RemoveAll(unzipPath); removeErr != nil {
|
||||||
|
c.JSON(500, gin.H{"error": "清理已存在解压目录失败: " + removeErr.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fmt.Println("开始解压...")
|
||||||
|
os.MkdirAll(unzipPath, 0755)
|
||||||
|
if err = archiver.Unarchive(zipPath, unzipPath); err != nil {
|
||||||
|
c.JSON(500, gin.H{"error": "解压 ZIP 失败: " + err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
entries, err := os.ReadDir(unzipPath)
|
||||||
|
if err != nil || len(entries) == 0 {
|
||||||
|
c.JSON(500, gin.H{"error": "读取解压目录失败或目录为空"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fmt.Println("jieya后...")
|
||||||
|
if len(entries) == 1 && entries[0].IsDir() {
|
||||||
|
// 说明解压后多了一层目录,把它设为新的 unzipPath
|
||||||
|
unzipPath = filepath.Join(unzipPath, entries[0].Name())
|
||||||
|
}
|
||||||
|
fmt.Println("开始读取excel...")
|
||||||
|
defer os.RemoveAll(tempDir)
|
||||||
|
// 4. 读取 Excel 画家名单, 匹配视频和图片
|
||||||
|
artists, err := readArtistVideoInfo(excelPath, unzipPath)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(500, gin.H{"error": "读取 Excel 失败"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 5.发布视频
|
||||||
|
var failedRecords []FailedRecord
|
||||||
|
var artistResp []ArtistVideoDetail
|
||||||
|
fmt.Println("artists num: ", len(artists))
|
||||||
|
for _, artist := range artists {
|
||||||
|
var infoResp *accountFiee.UserInfoResponse
|
||||||
|
list, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||||
|
Name: artist.Name,
|
||||||
|
SubNum: artist.SubNum,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("获取用户信息失败: %s", err.Error()),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("获取用户信息失败: %s", err.Error()))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if len(list.UserList) == 0 {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("未找到用户信息: %s", artist.Name),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("未找到用户信息: %s", artist.Name))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if list != nil && len(list.UserList) > 0 {
|
||||||
|
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||||
|
ID: list.UserList[0].Id,
|
||||||
|
Domain: "app",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("获取用户信息失败: %s", err.Error()),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("获取用户信息失败: %s", err.Error()))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("检查用户视频可消耗数量: %s", err.Error()),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("检查用户视频可消耗数量: %s", err.Error()))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
//自媒体账号
|
||||||
|
accountList, err := service.CastProvider.MediaUserList(c, &apiCast.MediaUserListReq{
|
||||||
|
ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
|
||||||
ArtistVal: artist.Name,
|
ArtistVal: artist.Name,
|
||||||
Page: 1,
|
Page: 1,
|
||||||
PageSize: 10,
|
PageSize: 10,
|
||||||
@ -215,6 +440,7 @@ func ImportPublish(c *gin.Context) {
|
|||||||
artistResp = append(artistResp, ArtistVideoDetail{
|
artistResp = append(artistResp, ArtistVideoDetail{
|
||||||
Id: artist.Id,
|
Id: artist.Id,
|
||||||
ArtistName: artist.Name,
|
ArtistName: artist.Name,
|
||||||
|
SubNum: artist.SubNum,
|
||||||
Title: artist.Title,
|
Title: artist.Title,
|
||||||
WorkUuid: resp.WorkUuid,
|
WorkUuid: resp.WorkUuid,
|
||||||
Youtube: artist.Youtube,
|
Youtube: artist.Youtube,
|
||||||
@ -222,19 +448,18 @@ func ImportPublish(c *gin.Context) {
|
|||||||
TikTok: artist.TikTok,
|
TikTok: artist.TikTok,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
excelUrl, err := exportRecordsToExcel(artistResp)
|
// excelUrl, err := exportPublishRecordsToExcel(artistResp)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
service.Error(c, err)
|
// service.Error(c, err)
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 6. 返回结果
|
// 6. 返回结果
|
||||||
service.Success(c, map[string]interface{}{
|
service.Success(c, map[string]interface{}{
|
||||||
"excelUrl": excelUrl,
|
//"excelUrl": excelUrl,
|
||||||
"failedRecords": failedRecords,
|
"failedRecords": failedRecords,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func readArtistVideoInfo(excelPath, unzipPath string) ([]ArtistMedia, error) {
|
func readArtistVideoInfo(excelPath, unzipPath string) ([]ArtistMedia, error) {
|
||||||
log.Println(unzipPath)
|
log.Println(unzipPath)
|
||||||
f, err := excelize.OpenFile(excelPath)
|
f, err := excelize.OpenFile(excelPath)
|
||||||
@ -253,9 +478,6 @@ func readArtistVideoInfo(excelPath, unzipPath string) ([]ArtistMedia, error) {
|
|||||||
if i == 0 || i == 1 || len(row) < 2 {
|
if i == 0 || i == 1 || len(row) < 2 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if i == 165 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
id, _ := f.GetCellValue(sheetName, fmt.Sprintf("A%d", i+1))
|
id, _ := f.GetCellValue(sheetName, fmt.Sprintf("A%d", i+1))
|
||||||
if id != "" {
|
if id != "" {
|
||||||
id = strings.TrimSpace(id)
|
id = strings.TrimSpace(id)
|
||||||
@ -280,6 +502,10 @@ func readArtistVideoInfo(excelPath, unzipPath string) ([]ArtistMedia, error) {
|
|||||||
if tiktok != "" {
|
if tiktok != "" {
|
||||||
tiktok = strings.TrimSpace(tiktok)
|
tiktok = strings.TrimSpace(tiktok)
|
||||||
}
|
}
|
||||||
|
subNum, _ := f.GetCellValue(sheetName, fmt.Sprintf("G%d", i+1))
|
||||||
|
if subNum != "" {
|
||||||
|
subNum = strings.TrimSpace(subNum)
|
||||||
|
}
|
||||||
artists = append(artists, ArtistMedia{
|
artists = append(artists, ArtistMedia{
|
||||||
Id: id,
|
Id: id,
|
||||||
Name: artistName,
|
Name: artistName,
|
||||||
@ -287,6 +513,7 @@ func readArtistVideoInfo(excelPath, unzipPath string) ([]ArtistMedia, error) {
|
|||||||
Youtube: youtube,
|
Youtube: youtube,
|
||||||
Instagram: instagram,
|
Instagram: instagram,
|
||||||
TikTok: tiktok,
|
TikTok: tiktok,
|
||||||
|
SubNum: subNum,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
artists, err = matchArtistMedia(artists, unzipPath)
|
artists, err = matchArtistMedia(artists, unzipPath)
|
||||||
@ -296,13 +523,28 @@ func matchArtistMedia(artists []ArtistMedia, unzipPath string) ([]ArtistMedia, e
|
|||||||
var err error
|
var err error
|
||||||
var res []ArtistMedia
|
var res []ArtistMedia
|
||||||
for _, artist := range artists {
|
for _, artist := range artists {
|
||||||
oldImgPath := fmt.Sprintf("%s/%s/%s.jpg", unzipPath, artist.Name, artist.Id)
|
var oldVideoPath, oldImgPath string
|
||||||
oldVideoPath := fmt.Sprintf("%s/%s/%s.mp4", unzipPath, artist.Name, artist.Id)
|
for _, ext := range []string{".jpg", ".png", ".jpeg"} {
|
||||||
|
p := fmt.Sprintf("%s/%s/%s%s", unzipPath, artist.Name, artist.Id, ext)
|
||||||
|
if _, err = os.Stat(p); err == nil {
|
||||||
|
oldImgPath = p
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
// 检查源文件是否存在
|
// 检查源文件是否存在
|
||||||
if _, err = os.Stat(oldImgPath); os.IsNotExist(err) {
|
if _, err = os.Stat(oldImgPath); os.IsNotExist(err) {
|
||||||
|
fmt.Println("图片不存在: ", artist.Id, artist.Name, oldImgPath)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if _, err = os.Stat(oldVideoPath); os.IsNotExist(err) {
|
for _, ext := range []string{".mp4", ".mov"} {
|
||||||
|
p := fmt.Sprintf("%s/%s/%s%s", unzipPath, artist.Name, artist.Id, ext)
|
||||||
|
if _, err = os.Stat(p); err == nil {
|
||||||
|
oldVideoPath = p
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if oldVideoPath == "" {
|
||||||
|
fmt.Println("视频不存在: ", artist.Id, artist.Name, oldVideoPath)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
baseDir := filepath.Join(unzipPath, artist.Name)
|
baseDir := filepath.Join(unzipPath, artist.Name)
|
||||||
@ -334,12 +576,12 @@ func matchArtistMedia(artists []ArtistMedia, unzipPath string) ([]ArtistMedia, e
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var httpType string
|
var httpType string
|
||||||
if config.AppMode == "prod" {
|
if config.AppConfig.System.AppMode == "dev" {
|
||||||
url := "saas.fiee.com"
|
|
||||||
httpType = fmt.Sprintf("%s%s", model.HttpsType, url)
|
|
||||||
} else {
|
|
||||||
url := "114.218.158.24:9020"
|
url := "114.218.158.24:9020"
|
||||||
httpType = fmt.Sprintf("%s%s", model.HttpType, url)
|
httpType = fmt.Sprintf("%s%s", model.HttpType, url)
|
||||||
|
} else {
|
||||||
|
url := "saas.fiee.com"
|
||||||
|
httpType = fmt.Sprintf("%s%s", model.HttpsType, url)
|
||||||
}
|
}
|
||||||
baseUrl := fmt.Sprintf("%s/api/fiee/resource/raw/", httpType)
|
baseUrl := fmt.Sprintf("%s/api/fiee/resource/raw/", httpType)
|
||||||
videoUrl := baseUrl + filepath.Base(videoPath)
|
videoUrl := baseUrl + filepath.Base(videoPath)
|
||||||
@ -355,10 +597,12 @@ func matchArtistMedia(artists []ArtistMedia, unzipPath string) ([]ArtistMedia, e
|
|||||||
tmp.Img = imgUrl
|
tmp.Img = imgUrl
|
||||||
//tmp.Video = filepath.ToSlash(videoPath)
|
//tmp.Video = filepath.ToSlash(videoPath)
|
||||||
tmp.Video = videoUrl
|
tmp.Video = videoUrl
|
||||||
|
tmp.SubNum = artist.SubNum
|
||||||
res = append(res, tmp)
|
res = append(res, tmp)
|
||||||
}
|
}
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func UploadToAnotherService(ctx context.Context, fileData []byte, path string) error {
|
func UploadToAnotherService(ctx context.Context, fileData []byte, path string) error {
|
||||||
const chunkSize = 4*1024*1024 - 100
|
const chunkSize = 4*1024*1024 - 100
|
||||||
_, err := service.FilesProvider.TusCreate(ctx, &files.TusCreateReq{
|
_, err := service.FilesProvider.TusCreate(ctx, &files.TusCreateReq{
|
||||||
@ -392,148 +636,348 @@ func UploadToAnotherService(ctx context.Context, fileData []byte, path string) e
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func exportRecordsToExcel(artistInfos []ArtistVideoDetail) (string, error) {
|
|
||||||
f := excelize.NewFile()
|
|
||||||
sheet := "Sheet1"
|
|
||||||
f.NewSheet(sheet)
|
|
||||||
|
|
||||||
// 写表头
|
// func exportPublishRecordsToExcel(artistInfos []ArtistVideoDetail) (string, error) {
|
||||||
headers := []string{"序号", "画家名", "标题", "uuid", "youtube", "instagram", "tiktok"}
|
// fileDir := "./runtime/import/"
|
||||||
|
// filename := "画家视频详情记录0922.xlsx"
|
||||||
|
// filePath := filepath.Join(fileDir, filename)
|
||||||
|
|
||||||
for col, h := range headers {
|
// _ = os.MkdirAll(fileDir, os.ModePerm)
|
||||||
_ = f.SetCellValue(sheet, string(rune('A'+col))+"1", h)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 写数据
|
// var f *excelize.File
|
||||||
for i, artistInfo := range artistInfos {
|
// sheet := "Sheet1"
|
||||||
row := i + 2
|
|
||||||
_ = f.SetCellValue(sheet, "A"+strconv.Itoa(row), artistInfo.Id)
|
// // 判断文件是否存在
|
||||||
_ = f.SetCellValue(sheet, "B"+strconv.Itoa(row), artistInfo.ArtistName)
|
// if _, err := os.Stat(filePath); os.IsNotExist(err) {
|
||||||
_ = f.SetCellValue(sheet, "C"+strconv.Itoa(row), artistInfo.Title)
|
// // 文件不存在,新建文件和Sheet
|
||||||
_ = f.SetCellValue(sheet, "D"+strconv.Itoa(row), artistInfo.WorkUuid)
|
// f = excelize.NewFile()
|
||||||
_ = f.SetCellValue(sheet, "E"+strconv.Itoa(row), artistInfo.Youtube)
|
// f.SetSheetName(f.GetSheetName(0), sheet)
|
||||||
_ = f.SetCellValue(sheet, "F"+strconv.Itoa(row), artistInfo.Instagram)
|
|
||||||
_ = f.SetCellValue(sheet, "G"+strconv.Itoa(row), artistInfo.TikTok)
|
// // 写表头
|
||||||
}
|
// headers := []string{"序号", "画家名", "标题", "uuid", "youtube", "instagram", "tiktok", "用户编号"}
|
||||||
// 保存文件
|
// for col, h := range headers {
|
||||||
filename := "画家视频详情记录.xlsx"
|
// _ = f.SetCellValue(sheet, string('A'+col)+"1", h)
|
||||||
fileDir := "./runtime/import/" // 自定义目录
|
// }
|
||||||
_ = os.MkdirAll(fileDir, os.ModePerm)
|
// } else {
|
||||||
filePath := filepath.Join(fileDir, filename)
|
// // 文件存在,打开
|
||||||
if err := f.SaveAs(filePath); err != nil {
|
// var err error
|
||||||
return "", err
|
// f, err = excelize.OpenFile(filePath)
|
||||||
}
|
// if err != nil {
|
||||||
excelUrl, err := upload.PutBos(filePath, "excel", true)
|
// return "", err
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 找到最后一行,追加数据
|
||||||
|
// rows, err := f.GetRows(sheet)
|
||||||
|
// if err != nil {
|
||||||
|
// return "", err
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 计算下一行,从表头之后开始
|
||||||
|
// startRow := len(rows) + 1
|
||||||
|
// if startRow == 1 {
|
||||||
|
// startRow = 2 // 文件新建或没有数据,从第2行开始
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 写数据
|
||||||
|
// for i, artistInfo := range artistInfos {
|
||||||
|
// row := startRow + i
|
||||||
|
// _ = f.SetCellValue(sheet, "A"+strconv.Itoa(row), row-1) // 序号连续
|
||||||
|
// _ = f.SetCellValue(sheet, "B"+strconv.Itoa(row), artistInfo.ArtistName)
|
||||||
|
// _ = f.SetCellValue(sheet, "C"+strconv.Itoa(row), artistInfo.Title)
|
||||||
|
// _ = f.SetCellValue(sheet, "D"+strconv.Itoa(row), artistInfo.WorkUuid)
|
||||||
|
// _ = f.SetCellValue(sheet, "E"+strconv.Itoa(row), artistInfo.Youtube)
|
||||||
|
// _ = f.SetCellValue(sheet, "F"+strconv.Itoa(row), artistInfo.Instagram)
|
||||||
|
// _ = f.SetCellValue(sheet, "G"+strconv.Itoa(row), artistInfo.TikTok)
|
||||||
|
// _ = f.SetCellValue(sheet, "H"+strconv.Itoa(row), artistInfo.SubNum)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 保存文件
|
||||||
|
// if err = f.SaveAs(filePath); err != nil {
|
||||||
|
// fmt.Println("saveAs err: ", err)
|
||||||
|
// return "", err
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 上传
|
||||||
|
// excelUrl, err := upload.PutBos(filePath, "excel", false)
|
||||||
|
// if err != nil {
|
||||||
|
// return "", err
|
||||||
|
// }
|
||||||
|
// return excelUrl, nil
|
||||||
|
// }
|
||||||
|
|
||||||
|
func ImportPublishV3(c *gin.Context) {
|
||||||
|
// 1. 上传画家短视频详情文件
|
||||||
|
excelFile, err := c.FormFile("excel")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
c.JSON(400, gin.H{"error": "缺少 Excel 文件 excel"})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
return excelUrl, nil
|
// 2. 保存临时文件
|
||||||
}
|
tempDir := "tmp"
|
||||||
func updateApproval(ctx *gin.Context, artistId uint64, workUuid string, accountInfos []*apiCast.MediaUserInfo, videoUrl, imgUrl, title string) error {
|
os.MkdirAll(tempDir, 0755)
|
||||||
var publishAccounts []PublishAccount
|
excelPath := filepath.Join(tempDir, "artists.xlsx")
|
||||||
var publishPlatformIds []int32
|
|
||||||
|
|
||||||
for _, v := range accountInfos {
|
if err = c.SaveUploadedFile(excelFile, excelPath); err != nil {
|
||||||
publishAccounts = append(publishAccounts, PublishAccount{
|
c.JSON(500, gin.H{"error": "保存 Excel 失败"})
|
||||||
AccountName: v.PlatformUserName,
|
return
|
||||||
AccountID: v.MediaAccountUuid,
|
}
|
||||||
|
fmt.Println("save excel...")
|
||||||
|
defer os.RemoveAll(tempDir)
|
||||||
|
|
||||||
|
// 3. 读取 Excel 画家名单, 匹配视频和图片
|
||||||
|
artists, err := readArtistVideoInfoV2(c, excelPath)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(500, gin.H{"error": "读取 Excel 失败"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 4.发布视频
|
||||||
|
var failedRecords []FailedRecord
|
||||||
|
//var artistResp []ArtistVideoDetail
|
||||||
|
for _, artist := range artists {
|
||||||
|
var infoResp *accountFiee.UserInfoResponse
|
||||||
|
list, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||||
|
Name: artist.Name,
|
||||||
|
SubNum: artist.SubNum,
|
||||||
})
|
})
|
||||||
publishPlatformIds = append(publishPlatformIds, int32(v.PlatformID))
|
if err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("获取用户信息失败: %s", err.Error()),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("获取用户信息失败: %s", err.Error()))
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
var req CreateRequest
|
if len(list.UserList) == 0 {
|
||||||
var url string
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
saasPublishVideo := &SaasPublishVideo{
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("未找到用户信息: %s", artist.Name),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("未找到用户信息: %s", artist.Name))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if list != nil && len(list.UserList) > 0 {
|
||||||
|
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||||
|
ID: list.UserList[0].Id,
|
||||||
|
Domain: "app",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("获取用户信息失败: %s", err.Error()),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("获取用户信息失败: %s", err.Error()))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("检查用户视频可消耗数量: %s", err.Error()),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("检查用户视频可消耗数量: %s", err.Error()))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
//自媒体账号
|
||||||
|
accountList, err := service.CastProvider.MediaUserList(c, &apiCast.MediaUserListReq{
|
||||||
|
ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
|
||||||
|
ArtistVal: artist.Name,
|
||||||
|
Page: 1,
|
||||||
|
PageSize: 10,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("自媒体账号数量获取失败: %s,账号数量:%d", err.Error(), len(accountList.Data)),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("自媒体账号数量获取失败: %s,账号数量:%d", err.Error(), len(accountList.Data)))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if accountList == nil || len(accountList.Data) == 0 {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: "自媒体账号数量为0",
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("自媒体账号,账号数量:%d", len(accountList.Data)))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
mediaAccountUuids := []string{}
|
||||||
|
mediaAccountNames := []string{}
|
||||||
|
platformIDs := []apiCast.PlatformIDENUM{}
|
||||||
|
for _, info := range accountList.Data {
|
||||||
|
mediaAccountUuids = append(mediaAccountUuids, info.MediaAccountUuid)
|
||||||
|
mediaAccountNames = append(mediaAccountNames, info.PlatformUserName)
|
||||||
|
platformIDs = append(platformIDs, apiCast.PlatformIDENUM(info.PlatformID))
|
||||||
|
}
|
||||||
|
newCtx := cast.NewCtxWithUserInfo(c)
|
||||||
|
_, err = service.CastProvider.UpdateWorkVideo(newCtx, &apiCast.UpdateWorkVideoReq{
|
||||||
|
Title: artist.Title,
|
||||||
|
Content: artist.Title,
|
||||||
|
VideoUrl: artist.Video,
|
||||||
|
CoverUrl: artist.Img,
|
||||||
|
MediaAccountUuids: mediaAccountUuids,
|
||||||
|
MediaAccountNames: mediaAccountNames,
|
||||||
|
PlatformIDs: platformIDs,
|
||||||
|
PublishConfig1: &apiCast.PublishConfig{
|
||||||
|
CanComment: 1,
|
||||||
|
CanJoin: 1,
|
||||||
|
CanQuote: 1,
|
||||||
|
ForbidComment: 2,
|
||||||
|
IsAI: 1,
|
||||||
|
PublicType: 1,
|
||||||
|
},
|
||||||
|
PublishConfig2: &apiCast.PublishConfig{
|
||||||
|
CanComment: 1,
|
||||||
|
CanJoin: 1,
|
||||||
|
CanQuote: 1,
|
||||||
|
ForbidComment: 2,
|
||||||
|
IsAI: 1,
|
||||||
|
PublicType: 1,
|
||||||
|
},
|
||||||
|
PublishConfig3: &apiCast.PublishConfig{
|
||||||
|
CanComment: 1,
|
||||||
|
CanJoin: 1,
|
||||||
|
CanQuote: 1,
|
||||||
|
ForbidComment: 1,
|
||||||
|
IsAI: 1,
|
||||||
|
PublicType: 1,
|
||||||
|
},
|
||||||
|
Action: "submit",
|
||||||
|
ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
|
||||||
|
ArtistName: infoResp.Name,
|
||||||
|
ArtistPhone: infoResp.TelNum,
|
||||||
|
ArtistPhoneAreaCode: infoResp.TelAreaCode,
|
||||||
|
Source: 2,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
failedRecords = append(failedRecords, FailedRecord{
|
||||||
|
Name: artist.Name,
|
||||||
|
Msg: fmt.Sprintf("发布"+artist.Name+"视频"+artist.Title+"失败: %s", err.Error()),
|
||||||
|
})
|
||||||
|
log.Printf(fmt.Sprintf("发布"+artist.Name+"视频"+artist.Title+"失败: %s", err.Error()))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// artistResp = append(artistResp, ArtistVideoDetail{
|
||||||
|
// Id: artist.Id,
|
||||||
|
// ArtistName: artist.Name,
|
||||||
|
// SubNum: artist.SubNum,
|
||||||
|
// Title: artist.Title,
|
||||||
|
// WorkUuid: resp.WorkUuid,
|
||||||
|
// Youtube: artist.Youtube,
|
||||||
|
// Instagram: artist.Instagram,
|
||||||
|
// TikTok: artist.TikTok,
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
// excelUrl, err := exportPublishRecordsToExcel(artistResp)
|
||||||
|
// if err != nil {
|
||||||
|
// service.Error(c, err)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 6. 返回结果
|
||||||
|
service.Success(c, map[string]interface{}{
|
||||||
|
//"excelUrl": excelUrl,
|
||||||
|
"failedRecords": failedRecords,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
func readArtistVideoInfoV2(ctx *gin.Context, excelPath string) ([]ArtistMedia, error) {
|
||||||
|
f, err := excelize.OpenFile(excelPath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
sheetName := f.GetSheetName(0)
|
||||||
|
rows, err := f.GetRows(sheetName)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
log.Println("start read excel")
|
||||||
|
var artists []ArtistMedia
|
||||||
|
for i, row := range rows {
|
||||||
|
if i == 0 || i == 1 || len(row) < 2 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
id, _ := f.GetCellValue(sheetName, fmt.Sprintf("A%d", i+1))
|
||||||
|
if id != "" {
|
||||||
|
id = strings.TrimSpace(id)
|
||||||
|
}
|
||||||
|
artistName, _ := f.GetCellValue(sheetName, fmt.Sprintf("B%d", i+1))
|
||||||
|
if artistName != "" {
|
||||||
|
artistName = strings.TrimSpace(artistName)
|
||||||
|
}
|
||||||
|
title, _ := f.GetCellValue(sheetName, fmt.Sprintf("C%d", i+1))
|
||||||
|
if title != "" {
|
||||||
|
title = strings.TrimSpace(title)
|
||||||
|
}
|
||||||
|
subNum, _ := f.GetCellValue(sheetName, fmt.Sprintf("G%d", i+1))
|
||||||
|
if subNum != "" {
|
||||||
|
subNum = strings.TrimSpace(subNum)
|
||||||
|
}
|
||||||
|
artists = append(artists, ArtistMedia{
|
||||||
|
Id: id,
|
||||||
|
Name: artistName,
|
||||||
Title: title,
|
Title: title,
|
||||||
Describe: title,
|
SubNum: subNum,
|
||||||
IsYoutubeSee: 1,
|
})
|
||||||
IsTiktokScreen: 1,
|
|
||||||
IsTiktokComment: 1,
|
|
||||||
IsTiktokQuote: 1,
|
|
||||||
IsTiktokAiGenerate: 1,
|
|
||||||
Cover: imgUrl,
|
|
||||||
PlatformIds: publishPlatformIds,
|
|
||||||
PublishAccounts: publishAccounts,
|
|
||||||
Videos: []Video{
|
|
||||||
{
|
|
||||||
VideoAddress: videoUrl,
|
|
||||||
VideoThumbnail: imgUrl,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
if config.AppMode == "prod" {
|
artists, err = matchArtistMediaV3(ctx, artists)
|
||||||
url = "https://erp.fonchain.com/approval/v2/create"
|
return artists, nil
|
||||||
req = CreateRequest{
|
|
||||||
Type: "SaasPublishVideo",
|
|
||||||
DepartmentID: 3,
|
|
||||||
Domain: "7bfa3942cceb20389822af7b57c5798e",
|
|
||||||
MenuType: 2,
|
|
||||||
SaasPublishVideo: saasPublishVideo,
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
url = "http://114.218.158.24:9020/approval/v2/create"
|
|
||||||
req = CreateRequest{
|
|
||||||
Type: "SaasPublishVideo",
|
|
||||||
DepartmentID: 3,
|
|
||||||
Domain: "7bfa3942cceb20389822af7b57c5798e",
|
|
||||||
MenuType: 2,
|
|
||||||
SaasPublishVideo: saasPublishVideo,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jsonBytes, err := json.Marshal(req)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
|
|
||||||
}
|
func matchArtistMediaV3(ctx *gin.Context, artists []ArtistMedia) ([]ArtistMedia, error) {
|
||||||
res, err := http.Post(url, "application/json", bytes.NewBuffer(jsonBytes))
|
var medias = make(map[string][]*files.Items)
|
||||||
if err != nil {
|
var res []ArtistMedia
|
||||||
return err
|
for _, artist := range artists {
|
||||||
}
|
mediaPath := "fiee2/" + artist.Name
|
||||||
defer res.Body.Close()
|
imgPath := fmt.Sprintf("%s/%s/%s.jpg", mediaPath, artist.Name, artist.Title)
|
||||||
responseBodyBytes, err := io.ReadAll(res.Body)
|
videoPath := fmt.Sprintf("%s/%s/%s.mp4", mediaPath, artist.Name, artist.Title)
|
||||||
if err != nil {
|
//判断文件是否存在
|
||||||
return err
|
if _, ok := medias[artist.Name]; !ok {
|
||||||
}
|
sortBy := ctx.DefaultQuery("sortBy", "name")
|
||||||
var apiResp APIResponse
|
sortAsc, _ := strconv.ParseBool(ctx.DefaultQuery("sortAsc", "true"))
|
||||||
err = json.Unmarshal(responseBodyBytes, &apiResp)
|
resp, err := service.FilesProvider.List(ctx, &files.FileListReq{
|
||||||
if err != nil {
|
Path: mediaPath,
|
||||||
// 处理错误
|
UserSpacePath: "",
|
||||||
return err
|
Sorting: &files.Sorting{
|
||||||
}
|
By: sortBy,
|
||||||
fmt.Println("拿到审批ID:", apiResp.Data.ID)
|
Asc: sortAsc,
|
||||||
_, err = service.CastProvider.UpdateStatus(ctx, &apiCast.UpdateStatusReq{
|
},
|
||||||
WorkUuid: workUuid,
|
|
||||||
WorkAction: apiCast.WorkActionENUM_APPROVAL,
|
|
||||||
ApprovalID: strconv.FormatUint(apiResp.Data.ID, 10),
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return nil, err
|
||||||
}
|
}
|
||||||
_, err = service.CastProvider.UpdateStatus(ctx, &apiCast.UpdateStatusReq{
|
medias[artist.Name] = resp.Items
|
||||||
WorkUuid: workUuid,
|
|
||||||
WorkAction: apiCast.WorkActionENUM_APPROVAL_PASS,
|
|
||||||
ApprovalID: strconv.FormatUint(apiResp.Data.ID, 10),
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
_, err = service.BundleProvider.AddBundleBalance(ctx, &bundle.AddBundleBalanceReq{
|
isExist := false
|
||||||
UserId: int32(artistId),
|
for _, media := range medias[artist.Name] {
|
||||||
VideoConsumptionNumber: 1,
|
if media.Name == artist.Title+".jpg" || media.Name == artist.Title+".mp4" || media.Name == artist.Title+".mov" {
|
||||||
})
|
isExist = true
|
||||||
if err != nil {
|
break
|
||||||
log.Printf(fmt.Sprintf("扣除余额失败: %s", err.Error()))
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
_, err = service.CastProvider.UpdateStatus(ctx, &apiCast.UpdateStatusReq{
|
|
||||||
WorkAction: apiCast.WorkActionENUM_CONFIRM,
|
|
||||||
WorkUuid: workUuid,
|
|
||||||
ConfirmRemark: "",
|
|
||||||
ConfirmStatus: 1,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
log.Printf(fmt.Sprintf("更新状态失败: %s", err.Error()))
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
return nil
|
if !isExist {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
var httpType string
|
||||||
|
if config.AppConfig.System.AppMode == "dev" {
|
||||||
|
url := "114.218.158.24:9020"
|
||||||
|
httpType = fmt.Sprintf("%s%s", model.HttpType, url)
|
||||||
|
} else {
|
||||||
|
url := "saas.fiee.com"
|
||||||
|
httpType = fmt.Sprintf("%s%s", model.HttpsType, url)
|
||||||
|
}
|
||||||
|
baseUrl := fmt.Sprintf("%s/api/fiee/resource/raw/", httpType)
|
||||||
|
videoUrl := baseUrl + filepath.Base(videoPath)
|
||||||
|
imgUrl := baseUrl + filepath.Base(imgPath)
|
||||||
|
tmp := artist
|
||||||
|
tmp.Id = artist.Id
|
||||||
|
tmp.Name = artist.Name
|
||||||
|
tmp.Title = artist.Title
|
||||||
|
tmp.Img = imgUrl
|
||||||
|
tmp.Video = videoUrl
|
||||||
|
tmp.SubNum = artist.SubNum
|
||||||
|
res = append(res, tmp)
|
||||||
|
}
|
||||||
|
return res, nil
|
||||||
}
|
}
|
||||||
|
@ -6,14 +6,11 @@ import (
|
|||||||
"fonchain-fiee/api/accountFiee"
|
"fonchain-fiee/api/accountFiee"
|
||||||
"fonchain-fiee/api/bundle"
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
"fonchain-fiee/api/emailAlerts"
|
|
||||||
"fonchain-fiee/api/files"
|
"fonchain-fiee/api/files"
|
||||||
"fonchain-fiee/api/governance"
|
"fonchain-fiee/api/governance"
|
||||||
"fonchain-fiee/api/members"
|
|
||||||
"fonchain-fiee/api/order"
|
"fonchain-fiee/api/order"
|
||||||
"fonchain-fiee/api/payment"
|
"fonchain-fiee/api/payment"
|
||||||
"fonchain-fiee/api/pressreleases"
|
"fonchain-fiee/api/pressreleases"
|
||||||
"fonchain-fiee/api/reports"
|
|
||||||
"fonchain-fiee/api/secFilings"
|
"fonchain-fiee/api/secFilings"
|
||||||
pkConfig "fonchain-fiee/pkg/config"
|
pkConfig "fonchain-fiee/pkg/config"
|
||||||
"os"
|
"os"
|
||||||
@ -34,9 +31,6 @@ var CastProvider = new(cast.CastClientImpl)
|
|||||||
var GovernanceProvider = new(governance.GovernanceClientImpl)
|
var GovernanceProvider = new(governance.GovernanceClientImpl)
|
||||||
var PressReleasesProvider = new(pressreleases.PressReleasesClientImpl)
|
var PressReleasesProvider = new(pressreleases.PressReleasesClientImpl)
|
||||||
var SecFilingProvider = new(secFilings.SecFilingsClientImpl)
|
var SecFilingProvider = new(secFilings.SecFilingsClientImpl)
|
||||||
var ReportsProvider = new(reports.ReportsClientImpl)
|
|
||||||
var EmailAlertsProvider = new(emailAlerts.EmailAlertsClientImpl)
|
|
||||||
var MembersProvider = new(members.MembersClientImpl)
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
config.SetConsumerService(BundleProvider)
|
config.SetConsumerService(BundleProvider)
|
||||||
@ -49,9 +43,6 @@ func init() {
|
|||||||
config.SetConsumerService(GovernanceProvider)
|
config.SetConsumerService(GovernanceProvider)
|
||||||
config.SetConsumerService(PressReleasesProvider)
|
config.SetConsumerService(PressReleasesProvider)
|
||||||
config.SetConsumerService(SecFilingProvider)
|
config.SetConsumerService(SecFilingProvider)
|
||||||
config.SetConsumerService(ReportsProvider)
|
|
||||||
config.SetConsumerService(EmailAlertsProvider)
|
|
||||||
config.SetConsumerService(MembersProvider)
|
|
||||||
|
|
||||||
if err := config.Load(); err != nil {
|
if err := config.Load(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -1,164 +0,0 @@
|
|||||||
package members
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fonchain-fiee/api/members"
|
|
||||||
"fonchain-fiee/pkg/model/login"
|
|
||||||
"fonchain-fiee/pkg/service"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
)
|
|
||||||
|
|
||||||
func AddMember(ctx *gin.Context) {
|
|
||||||
var req members.AddMemberReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
user := login.GetUserInfoFromC(ctx)
|
|
||||||
req.Operator = user.Name
|
|
||||||
req.OperatorId = int32(user.ID)
|
|
||||||
resp, err := service.MembersProvider.AddMember(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetMemberList(ctx *gin.Context) {
|
|
||||||
var req members.GetMemberListReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.MembersProvider.GetMemberList(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func EditMember(ctx *gin.Context) {
|
|
||||||
var req members.EditMemberReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
user := login.GetUserInfoFromC(ctx)
|
|
||||||
req.Operator = user.Name
|
|
||||||
req.OperatorId = int32(user.ID)
|
|
||||||
resp, err := service.MembersProvider.EditMember(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeleteMember(ctx *gin.Context) {
|
|
||||||
var req members.DeleteMemberReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.MembersProvider.DeleteMember(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func EditManagement(ctx *gin.Context) {
|
|
||||||
var req members.EditManagementReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
user := login.GetUserInfoFromC(ctx)
|
|
||||||
req.Operator = user.Name
|
|
||||||
req.OperatorId = int32(user.ID)
|
|
||||||
resp, err := service.MembersProvider.EditManagement(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func EditBoardOfDirectors(ctx *gin.Context) {
|
|
||||||
var req members.EditBoardOfDirectorsReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
user := login.GetUserInfoFromC(ctx)
|
|
||||||
req.Operator = user.Name
|
|
||||||
req.OperatorId = int32(user.ID)
|
|
||||||
resp, err := service.MembersProvider.EditBoardOfDirectors(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func EditCommitteeAppointments(ctx *gin.Context) {
|
|
||||||
var req members.EditCommitteeAppointmentsReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
user := login.GetUserInfoFromC(ctx)
|
|
||||||
req.Operator = user.Name
|
|
||||||
req.OperatorId = int32(user.ID)
|
|
||||||
resp, err := service.MembersProvider.EditCommitteeAppointments(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func DisplayCommitteeAppointments(ctx *gin.Context) {
|
|
||||||
var req members.DisplayCommitteeAppointmentsReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.MembersProvider.DisplayCommitteeAppointments(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func DisplayBoardOfDirectors(ctx *gin.Context) {
|
|
||||||
var req members.DisplayBoardOfDirectorsReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.MembersProvider.DisplayBoardOfDirectors(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func DisplayManagement(ctx *gin.Context) {
|
|
||||||
var req members.DisplayManagementReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.MembersProvider.DisplayManagement(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
@ -1,100 +0,0 @@
|
|||||||
package reports
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fonchain-fiee/api/reports"
|
|
||||||
"fonchain-fiee/pkg/model/login"
|
|
||||||
"fonchain-fiee/pkg/service"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
)
|
|
||||||
|
|
||||||
func AnnualReportCreate(ctx *gin.Context) {
|
|
||||||
var req reports.AddAnnualReportReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
user := login.GetUserInfoFromC(ctx)
|
|
||||||
req.Operator = user.Name
|
|
||||||
req.OperatorId = int32(user.ID)
|
|
||||||
resp, err := service.ReportsProvider.AddAnnualReport(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取年度报告列表
|
|
||||||
func AnnualReportList(ctx *gin.Context) {
|
|
||||||
var req reports.GetAnnualReportListReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.ReportsProvider.GetAnnualReportList(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func AnnualReportDelete(ctx *gin.Context) {
|
|
||||||
var req reports.DeleteAnnualReportReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.ReportsProvider.DeleteAnnualReport(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func AnnualReportEdit(ctx *gin.Context) {
|
|
||||||
var req reports.EditAnnualReportReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
user := login.GetUserInfoFromC(ctx)
|
|
||||||
req.Operator = user.Name
|
|
||||||
req.OperatorId = int32(user.ID)
|
|
||||||
resp, err := service.ReportsProvider.EditAnnualReport(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func AnnualReportDisplay(ctx *gin.Context) {
|
|
||||||
var req reports.DisplayAnnualReportReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.ReportsProvider.DisplayAnnualReport(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func QuarterlyReportDisplay(ctx *gin.Context) {
|
|
||||||
var req reports.DisplayQuarterlyReportReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.ReportsProvider.DisplayQuarterlyReport(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
package reports
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fonchain-fiee/api/reports"
|
|
||||||
"fonchain-fiee/pkg/model/login"
|
|
||||||
"fonchain-fiee/pkg/service"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
)
|
|
||||||
|
|
||||||
func QuarterlyReportCreate(ctx *gin.Context) {
|
|
||||||
var req reports.AddQuarterlyReportReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
user := login.GetUserInfoFromC(ctx)
|
|
||||||
req.Operator = user.Name
|
|
||||||
req.OperatorId = int32(user.ID)
|
|
||||||
resp, err := service.ReportsProvider.AddQuarterlyReport(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func QuarterlyReportList(ctx *gin.Context) {
|
|
||||||
var req reports.GetQuarterlyReportListReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.ReportsProvider.GetQuarterlyReportList(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func QuarterlyReportDelete(ctx *gin.Context) {
|
|
||||||
var req reports.DeleteQuarterlyReportReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
resp, err := service.ReportsProvider.DeleteQuarterlyReport(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
||||||
|
|
||||||
func QuarterlyReportEdit(ctx *gin.Context) {
|
|
||||||
var req reports.EditQuarterlyReportReq
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
user := login.GetUserInfoFromC(ctx)
|
|
||||||
req.Operator = user.Name
|
|
||||||
req.OperatorId = int32(user.ID)
|
|
||||||
resp, err := service.ReportsProvider.EditQuarterlyReport(ctx, &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
}
|
|
@ -7,6 +7,9 @@
|
|||||||
package stime
|
package stime
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"fonchain-fiee/pkg/e"
|
||||||
|
"go.uber.org/zap"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -88,3 +91,19 @@ var WeekStrMap = map[string]string{
|
|||||||
"Saturday": "六",
|
"Saturday": "六",
|
||||||
"Sunday": "日",
|
"Sunday": "日",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DatetimeToTimes(datetime string, dateFormat string) (times int32, err error) {
|
||||||
|
if datetime == "" {
|
||||||
|
times = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
loc, _ := time.LoadLocation("Asia/Shanghai")
|
||||||
|
t, err := time.ParseInLocation(dateFormat, datetime, loc)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("DatetimeToTimes err:"+datetime+":", zap.Error(err))
|
||||||
|
err = errors.New(e.GetCodeMsg(e.InvalidParams))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
times = int32(t.Unix())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -7,14 +7,16 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"fonchain-fiee/pkg/e"
|
"fonchain-fiee/pkg/e"
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/tealeg/xlsx"
|
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/tealeg/xlsx"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -128,3 +130,36 @@ func ResponseXls(c *gin.Context, content io.ReadSeeker, fileTag string) {
|
|||||||
//c.Writer.Header().Add("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
//c.Writer.Header().Add("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||||
http.ServeContent(c.Writer, c.Request, fileName, time.Now(), content)
|
http.ServeContent(c.Writer, c.Request, fileName, time.Now(), content)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func CreateDirPath(path string) (err error) {
|
||||||
|
if _, err = os.Stat(path); os.IsNotExist(err) {
|
||||||
|
if err = os.MkdirAll(path, os.ModePerm); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func CopyFile(src, dstDir string) (string, error) {
|
||||||
|
in, err := os.Open(src)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
defer in.Close()
|
||||||
|
if err := os.MkdirAll(dstDir, 0755); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
dst := filepath.Join(dstDir, filepath.Base(src))
|
||||||
|
out, err := os.Create(dst)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
defer out.Close()
|
||||||
|
if _, err = io.Copy(out, in); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
if err = out.Sync(); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return dst, nil
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user