Compare commits
139 Commits
jng-code-0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abcd4609c7 | ||
|
|
f10c36d9fa | ||
|
|
6106253c98 | ||
| 7eba8c6293 | |||
| de4020fbbe | |||
| 050a82d732 | |||
| 354d71b53e | |||
| 151324b413 | |||
| 5081b26e25 | |||
| 302a5a40d0 | |||
| badb2eb240 | |||
| 773799e6e0 | |||
| 9a899613c3 | |||
| 60c8855993 | |||
| 9aefcc8f76 | |||
| cfdf82195c | |||
| dc677b4344 | |||
| 41a621ad1e | |||
| ca9ba548ec | |||
| 3380ba541f | |||
|
|
d0ea217581 | ||
|
|
f4a0117c04 | ||
| 9f12454100 | |||
| f7dbcfea06 | |||
| e6459e14a1 | |||
| 7b9f75f27e | |||
| 4f544673bb | |||
| 7ce6994bc4 | |||
| cecf48c37c | |||
| 3c57d024d0 | |||
| 81325137a9 | |||
| 2ba217c315 | |||
| 6b90728831 | |||
| a62549e503 | |||
|
|
5d3c21624c | ||
|
|
68f2de32ca | ||
|
|
efe79ec250 | ||
| d4bf96fef5 | |||
| f57532630c | |||
| 1b5461d005 | |||
| 0947f8533d | |||
|
|
b121c12f7c | ||
| 0562f21c3b | |||
|
|
fcc838ff43 | ||
| f4a3d39df6 | |||
| 50f2c59c0b | |||
| e295a58a43 | |||
| 44dd68fd84 | |||
| 3286f12505 | |||
| cf99647d57 | |||
| 84e8a6dfda | |||
| 7e1bf3ca60 | |||
| fac24b72ac | |||
| b220a4ea96 | |||
| bcee7cdaf3 | |||
| 312ecca943 | |||
| f8e8f4806b | |||
| a92526a399 | |||
|
|
cfdd16ca47 | ||
| 68de32f89d | |||
| 1bdd0eabb2 | |||
| 751e5c4900 | |||
| b378f85bbd | |||
| ae88e366ee | |||
| b2050626b7 | |||
| dfc8ddb9b1 | |||
| a5fa884ebc | |||
| 317d50bad6 | |||
| df21fe78fa | |||
| 3ded74991c | |||
| 411c1ccbb3 | |||
| 390d3ea35b | |||
| ab8bdde9d9 | |||
| 3b2a6d059e | |||
| aed787f8ca | |||
| d5a81f5c74 | |||
| 5bee5bf5aa | |||
| d8b972be26 | |||
| c17028fbcf | |||
| 3318bd45fc | |||
| 70452455b9 | |||
| 8ba457d1b8 | |||
| 74bfc30e82 | |||
| dea92bc15c | |||
| 8b63419bd5 | |||
| cb395d19c2 | |||
| 7f583f1a21 | |||
| e8289367bb | |||
| d074c80af4 | |||
|
|
f60487123e | ||
|
|
d040842181 | ||
|
|
a81a85998b | ||
| 96d5c78b11 | |||
| d34cef19c3 | |||
| 7b8e56c0b4 | |||
| d464de6210 | |||
| 4069fe50c3 | |||
| 0b7cd36b26 | |||
| a0f7998a13 | |||
| 658722fe43 | |||
| 1505d88b25 | |||
| 81d99cbc91 | |||
| 2cb1301cfa | |||
| 1f1b61e26f | |||
|
|
560617806d | ||
|
|
53513764c8 | ||
|
|
582522a146 | ||
|
|
2900dddc2f | ||
|
|
85936fc340 | ||
|
|
66d5d9c114 | ||
|
|
ed9a384b9d | ||
|
|
3fb3b684f4 | ||
|
|
feb176680d | ||
|
|
36905994f9 | ||
|
|
8954360414 | ||
|
|
da43d8e174 | ||
|
|
da8c8a61d2 | ||
|
|
4db2456430 | ||
|
|
41e7dc9d75 | ||
|
|
f7fcd96762 | ||
|
|
540aeb23ea | ||
|
|
d8d840185f | ||
|
|
4edbf3f58b | ||
|
|
51d79406db | ||
|
|
dc28c258b9 | ||
|
|
db1e91d888 | ||
|
|
9d2cac4587 | ||
|
|
1bc900c6b1 | ||
|
|
94732f1fb4 | ||
|
|
c3cfc2b6e0 | ||
|
|
98c1476944 | ||
|
|
0119505418 | ||
|
|
663c8e235c | ||
|
|
9486aad885 | ||
|
|
c4aca47508 | ||
|
|
7aef40402e | ||
|
|
722d05bd7a | ||
|
|
d82f148687 | ||
|
|
9492a186e2 |
@ -4269,20 +4269,6 @@ func (x *RemoveRequest) GetCode() string {
|
|||||||
type WriteOffRequest struct {
|
type WriteOffRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
||||||
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain"`
|
|
||||||
UserId uint64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId"`
|
|
||||||
Tel string `protobuf:"bytes,4,opt,name=tel,proto3" json:"tel"`
|
|
||||||
JonNum string `protobuf:"bytes,5,opt,name=jonNum,proto3" json:"jonNum"`
|
|
||||||
UserName string `protobuf:"bytes,6,opt,name=userName,proto3" json:"userName"`
|
|
||||||
EnterDate string `protobuf:"bytes,7,opt,name=enterDate,proto3" json:"enterDate"`
|
|
||||||
PositionName string `protobuf:"bytes,8,opt,name=positionName,proto3" json:"positionName"`
|
|
||||||
PositionId uint64 `protobuf:"varint,9,opt,name=positionId,proto3" json:"positionId"`
|
|
||||||
SiteName string `protobuf:"bytes,10,opt,name=siteName,proto3" json:"siteName"`
|
|
||||||
SiteId uint64 `protobuf:"varint,11,opt,name=siteId,proto3" json:"siteId"`
|
|
||||||
AuthUrl string `protobuf:"bytes,12,opt,name=authUrl,proto3" json:"authUrl"`
|
|
||||||
Type string `protobuf:"bytes,13,opt,name=type,proto3" json:"type"`
|
|
||||||
Status uint32 `protobuf:"varint,14,opt,name=status,proto3" json:"status"`
|
|
||||||
SubmitDate string `protobuf:"bytes,15,opt,name=submitDate,proto3" json:"submitDate"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@ -4324,104 +4310,6 @@ func (x *WriteOffRequest) GetId() uint64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetDomain() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Domain
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetUserId() uint64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.UserId
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetTel() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Tel
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetJonNum() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.JonNum
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetUserName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.UserName
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetEnterDate() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.EnterDate
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetPositionName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.PositionName
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetPositionId() uint64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.PositionId
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetSiteName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.SiteName
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetSiteId() uint64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.SiteId
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetAuthUrl() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.AuthUrl
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetType() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Type
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetStatus() uint32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Status
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteOffRequest) GetSubmitDate() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.SubmitDate
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type WriteOffListRequest struct {
|
type WriteOffListRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Page uint64 `protobuf:"varint,1,opt,name=page,proto3" json:"page"`
|
Page uint64 `protobuf:"varint,1,opt,name=page,proto3" json:"page"`
|
||||||
@ -6000,6 +5888,7 @@ type AccountInfo struct {
|
|||||||
UpdatedAt string `protobuf:"bytes,41,opt,name=updatedAt,proto3" json:"updatedAt"`
|
UpdatedAt string `protobuf:"bytes,41,opt,name=updatedAt,proto3" json:"updatedAt"`
|
||||||
SecurityCode string `protobuf:"bytes,42,opt,name=SecurityCode,json=securityCode,proto3" json:"SecurityCode"`
|
SecurityCode string `protobuf:"bytes,42,opt,name=SecurityCode,json=securityCode,proto3" json:"SecurityCode"`
|
||||||
BlockAddr string `protobuf:"bytes,43,opt,name=BlockAddr,json=blockAddr,proto3" json:"BlockAddr"`
|
BlockAddr string `protobuf:"bytes,43,opt,name=BlockAddr,json=blockAddr,proto3" json:"BlockAddr"`
|
||||||
|
WriteOff bool `protobuf:"varint,44,opt,name=WriteOff,json=writeOff,proto3" json:"WriteOff"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@ -6335,6 +6224,13 @@ func (x *AccountInfo) GetBlockAddr() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetWriteOff() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.WriteOff
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type UserInfoV2 struct {
|
type UserInfoV2 struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID"`
|
ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID"`
|
||||||
@ -10756,28 +10652,9 @@ const file_api_accountFiee_accountFiee_proto_rawDesc = "" +
|
|||||||
"\rRemoveRequest\x12%\n" +
|
"\rRemoveRequest\x12%\n" +
|
||||||
"\x06Domain\x18\x01 \x01(\tB\r\xe2\xdf\x1f\t*\x0570001X\x01R\x06domain\x12\x1d\n" +
|
"\x06Domain\x18\x01 \x01(\tB\r\xe2\xdf\x1f\t*\x0570001X\x01R\x06domain\x12\x1d\n" +
|
||||||
"\x02ID\x18\x02 \x01(\x04B\r\xe2\xdf\x1f\t\x10\x00*\x0570004R\x02ID\x12\x12\n" +
|
"\x02ID\x18\x02 \x01(\x04B\r\xe2\xdf\x1f\t\x10\x00*\x0570004R\x02ID\x12\x12\n" +
|
||||||
"\x04code\x18\x03 \x01(\tR\x04code\"\x93\x03\n" +
|
"\x04code\x18\x03 \x01(\tR\x04code\"!\n" +
|
||||||
"\x0fWriteOffRequest\x12\x0e\n" +
|
"\x0fWriteOffRequest\x12\x0e\n" +
|
||||||
"\x02id\x18\x01 \x01(\x04R\x02id\x12\x16\n" +
|
"\x02id\x18\x01 \x01(\x04R\x02id\"\xd5\x01\n" +
|
||||||
"\x06domain\x18\x02 \x01(\tR\x06domain\x12\x16\n" +
|
|
||||||
"\x06userId\x18\x03 \x01(\x04R\x06userId\x12\x10\n" +
|
|
||||||
"\x03tel\x18\x04 \x01(\tR\x03tel\x12\x16\n" +
|
|
||||||
"\x06jonNum\x18\x05 \x01(\tR\x06jonNum\x12\x1a\n" +
|
|
||||||
"\buserName\x18\x06 \x01(\tR\buserName\x12\x1c\n" +
|
|
||||||
"\tenterDate\x18\a \x01(\tR\tenterDate\x12\"\n" +
|
|
||||||
"\fpositionName\x18\b \x01(\tR\fpositionName\x12\x1e\n" +
|
|
||||||
"\n" +
|
|
||||||
"positionId\x18\t \x01(\x04R\n" +
|
|
||||||
"positionId\x12\x1a\n" +
|
|
||||||
"\bsiteName\x18\n" +
|
|
||||||
" \x01(\tR\bsiteName\x12\x16\n" +
|
|
||||||
"\x06siteId\x18\v \x01(\x04R\x06siteId\x12\x18\n" +
|
|
||||||
"\aauthUrl\x18\f \x01(\tR\aauthUrl\x12\x12\n" +
|
|
||||||
"\x04type\x18\r \x01(\tR\x04type\x12\x16\n" +
|
|
||||||
"\x06status\x18\x0e \x01(\rR\x06status\x12\x1e\n" +
|
|
||||||
"\n" +
|
|
||||||
"submitDate\x18\x0f \x01(\tR\n" +
|
|
||||||
"submitDate\"\xd5\x01\n" +
|
|
||||||
"\x13WriteOffListRequest\x12\x12\n" +
|
"\x13WriteOffListRequest\x12\x12\n" +
|
||||||
"\x04page\x18\x01 \x01(\x04R\x04page\x12\x1a\n" +
|
"\x04page\x18\x01 \x01(\x04R\x04page\x12\x1a\n" +
|
||||||
"\bpageSize\x18\x02 \x01(\x04R\bpageSize\x12\x16\n" +
|
"\bpageSize\x18\x02 \x01(\x04R\bpageSize\x12\x16\n" +
|
||||||
@ -10893,7 +10770,7 @@ const file_api_accountFiee_accountFiee_proto_rawDesc = "" +
|
|||||||
"\n" +
|
"\n" +
|
||||||
"Department\x12\x0e\n" +
|
"Department\x12\x0e\n" +
|
||||||
"\x02ID\x18\x01 \x01(\x04R\x02ID\x12\x12\n" +
|
"\x02ID\x18\x01 \x01(\x04R\x02ID\x12\x12\n" +
|
||||||
"\x04Name\x18\x02 \x01(\tR\x04name\"\xb9\n" +
|
"\x04Name\x18\x02 \x01(\tR\x04name\"\xd5\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"\vAccountInfo\x12\x0e\n" +
|
"\vAccountInfo\x12\x0e\n" +
|
||||||
"\x02ID\x18\x01 \x01(\x04R\x02id\x12\x18\n" +
|
"\x02ID\x18\x01 \x01(\x04R\x02id\x12\x18\n" +
|
||||||
@ -10942,7 +10819,8 @@ const file_api_accountFiee_accountFiee_proto_rawDesc = "" +
|
|||||||
"\boperator\x18( \x01(\v2\x15.accountFiee.OperatorR\boperator\x12\x1c\n" +
|
"\boperator\x18( \x01(\v2\x15.accountFiee.OperatorR\boperator\x12\x1c\n" +
|
||||||
"\tupdatedAt\x18) \x01(\tR\tupdatedAt\x12\"\n" +
|
"\tupdatedAt\x18) \x01(\tR\tupdatedAt\x12\"\n" +
|
||||||
"\fSecurityCode\x18* \x01(\tR\fsecurityCode\x12\x1c\n" +
|
"\fSecurityCode\x18* \x01(\tR\fsecurityCode\x12\x1c\n" +
|
||||||
"\tBlockAddr\x18+ \x01(\tR\tblockAddr\"\xdc\x03\n" +
|
"\tBlockAddr\x18+ \x01(\tR\tblockAddr\x12\x1a\n" +
|
||||||
|
"\bWriteOff\x18, \x01(\bR\bwriteOff\"\xdc\x03\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"UserInfoV2\x12\x0e\n" +
|
"UserInfoV2\x12\x0e\n" +
|
||||||
"\x02ID\x18\x01 \x01(\x04R\x02ID\x12\x18\n" +
|
"\x02ID\x18\x01 \x01(\x04R\x02ID\x12\x18\n" +
|
||||||
@ -11302,7 +11180,7 @@ const file_api_accountFiee_accountFiee_proto_rawDesc = "" +
|
|||||||
"\fImageMsgType\x10\x02\x12\x10\n" +
|
"\fImageMsgType\x10\x02\x12\x10\n" +
|
||||||
"\fAudioMsgType\x10\x03\x12\x10\n" +
|
"\fAudioMsgType\x10\x03\x12\x10\n" +
|
||||||
"\fVideoMsgType\x10\x04\x12\f\n" +
|
"\fVideoMsgType\x10\x04\x12\f\n" +
|
||||||
"\bCardType\x10\x052\xc2/\n" +
|
"\bCardType\x10\x052\x8b0\n" +
|
||||||
"\vAccountFiee\x12<\n" +
|
"\vAccountFiee\x12<\n" +
|
||||||
"\x05Login\x12\x19.accountFiee.LoginRequest\x1a\x16.accountFiee.TokenInfo\"\x00\x12J\n" +
|
"\x05Login\x12\x19.accountFiee.LoginRequest\x1a\x16.accountFiee.TokenInfo\"\x00\x12J\n" +
|
||||||
"\fRefreshToken\x12 .accountFiee.RefreshTokenRequest\x1a\x16.accountFiee.TokenInfo\"\x00\x12G\n" +
|
"\fRefreshToken\x12 .accountFiee.RefreshTokenRequest\x1a\x16.accountFiee.TokenInfo\"\x00\x12G\n" +
|
||||||
@ -11348,7 +11226,8 @@ const file_api_accountFiee_accountFiee_proto_rawDesc = "" +
|
|||||||
"\x12VerifySliderStatus\x12&.accountFiee.VerifySliderStatusRequest\x1a'.accountFiee.VerifySliderStatusResponse\"\x00\x12`\n" +
|
"\x12VerifySliderStatus\x12&.accountFiee.VerifySliderStatusRequest\x1a'.accountFiee.VerifySliderStatusResponse\"\x00\x12`\n" +
|
||||||
"\x15SendNationTemplateMsg\x12!.accountFiee.SendNationMsgRequest\x1a\".accountFiee.SendMsgStatusResponse\"\x00\x12U\n" +
|
"\x15SendNationTemplateMsg\x12!.accountFiee.SendNationMsgRequest\x1a\".accountFiee.SendMsgStatusResponse\"\x00\x12U\n" +
|
||||||
"\x0eGetInviterInfo\x12\x1f.accountFiee.InviterInfoRequest\x1a .accountFiee.InviterInfoResponse\"\x00\x12U\n" +
|
"\x0eGetInviterInfo\x12\x1f.accountFiee.InviterInfoRequest\x1a .accountFiee.InviterInfoResponse\"\x00\x12U\n" +
|
||||||
"\x0eGetInviterList\x12\x1f.accountFiee.InviterListRequest\x1a .accountFiee.InviterListResponse\"\x00\x12p\n" +
|
"\x0eGetInviterList\x12\x1f.accountFiee.InviterListRequest\x1a .accountFiee.InviterListResponse\"\x00\x12G\n" +
|
||||||
|
"\bWriteOff\x12\x1c.accountFiee.WriteOffRequest\x1a\x1b.accountFiee.RemoveResponse\"\x00\x12p\n" +
|
||||||
"\x15CreateUserAndRealName\x12).accountFiee.CreateUserAndRealNameRequest\x1a*.accountFiee.CreateUserAndRealNameResponse\"\x00\x12M\n" +
|
"\x15CreateUserAndRealName\x12).accountFiee.CreateUserAndRealNameRequest\x1a*.accountFiee.CreateUserAndRealNameResponse\"\x00\x12M\n" +
|
||||||
"\x0eSaveSubmitInfo\x12\x1e.accountFiee.SubmitInfoRequest\x1a\x1b.accountFiee.CommonResponse\x12N\n" +
|
"\x0eSaveSubmitInfo\x12\x1e.accountFiee.SubmitInfoRequest\x1a\x1b.accountFiee.CommonResponse\x12N\n" +
|
||||||
"\x0eCreateChatUser\x12\x19.accountFiee.ChatUserData\x1a\x1f.accountFiee.CreateChatUserResp\"\x00\x12E\n" +
|
"\x0eCreateChatUser\x12\x19.accountFiee.ChatUserData\x1a\x1f.accountFiee.CreateChatUserResp\"\x00\x12E\n" +
|
||||||
@ -11613,107 +11492,109 @@ var file_api_accountFiee_accountFiee_proto_depIdxs = []int32{
|
|||||||
7, // 78: accountFiee.AccountFiee.SendNationTemplateMsg:input_type -> accountFiee.SendNationMsgRequest
|
7, // 78: accountFiee.AccountFiee.SendNationTemplateMsg:input_type -> accountFiee.SendNationMsgRequest
|
||||||
3, // 79: accountFiee.AccountFiee.GetInviterInfo:input_type -> accountFiee.InviterInfoRequest
|
3, // 79: accountFiee.AccountFiee.GetInviterInfo:input_type -> accountFiee.InviterInfoRequest
|
||||||
1, // 80: accountFiee.AccountFiee.GetInviterList:input_type -> accountFiee.InviterListRequest
|
1, // 80: accountFiee.AccountFiee.GetInviterList:input_type -> accountFiee.InviterListRequest
|
||||||
135, // 81: accountFiee.AccountFiee.CreateUserAndRealName:input_type -> accountFiee.CreateUserAndRealNameRequest
|
57, // 81: accountFiee.AccountFiee.WriteOff:input_type -> accountFiee.WriteOffRequest
|
||||||
104, // 82: accountFiee.AccountFiee.SaveSubmitInfo:input_type -> accountFiee.SubmitInfoRequest
|
135, // 82: accountFiee.AccountFiee.CreateUserAndRealName:input_type -> accountFiee.CreateUserAndRealNameRequest
|
||||||
129, // 83: accountFiee.AccountFiee.CreateChatUser:input_type -> accountFiee.ChatUserData
|
104, // 83: accountFiee.AccountFiee.SaveSubmitInfo:input_type -> accountFiee.SubmitInfoRequest
|
||||||
129, // 84: accountFiee.AccountFiee.UpdateChatUser:input_type -> accountFiee.ChatUserData
|
129, // 84: accountFiee.AccountFiee.CreateChatUser:input_type -> accountFiee.ChatUserData
|
||||||
129, // 85: accountFiee.AccountFiee.SaveChatUser:input_type -> accountFiee.ChatUserData
|
129, // 85: accountFiee.AccountFiee.UpdateChatUser:input_type -> accountFiee.ChatUserData
|
||||||
131, // 86: accountFiee.AccountFiee.DeleteChatUser:input_type -> accountFiee.DeleteChatUserRequest
|
129, // 86: accountFiee.AccountFiee.SaveChatUser:input_type -> accountFiee.ChatUserData
|
||||||
132, // 87: accountFiee.AccountFiee.GetChatUserDetail:input_type -> accountFiee.GetChatUserByIdRequest
|
131, // 87: accountFiee.AccountFiee.DeleteChatUser:input_type -> accountFiee.DeleteChatUserRequest
|
||||||
133, // 88: accountFiee.AccountFiee.GetChatUserList:input_type -> accountFiee.GetChatUserListRequest
|
132, // 88: accountFiee.AccountFiee.GetChatUserDetail:input_type -> accountFiee.GetChatUserByIdRequest
|
||||||
120, // 89: accountFiee.AccountFiee.GetChatUserList2:input_type -> accountFiee.GetChatUserListRequest2
|
133, // 89: accountFiee.AccountFiee.GetChatUserList:input_type -> accountFiee.GetChatUserListRequest
|
||||||
112, // 90: accountFiee.AccountFiee.RegisterWaiter:input_type -> accountFiee.RegisterWaiterRequest
|
120, // 90: accountFiee.AccountFiee.GetChatUserList2:input_type -> accountFiee.GetChatUserListRequest2
|
||||||
106, // 91: accountFiee.AccountFiee.CreateChatRecord:input_type -> accountFiee.ChatRecordData
|
112, // 91: accountFiee.AccountFiee.RegisterWaiter:input_type -> accountFiee.RegisterWaiterRequest
|
||||||
106, // 92: accountFiee.AccountFiee.UpdateChatRecord:input_type -> accountFiee.ChatRecordData
|
106, // 92: accountFiee.AccountFiee.CreateChatRecord:input_type -> accountFiee.ChatRecordData
|
||||||
106, // 93: accountFiee.AccountFiee.SaveChatRecord:input_type -> accountFiee.ChatRecordData
|
106, // 93: accountFiee.AccountFiee.UpdateChatRecord:input_type -> accountFiee.ChatRecordData
|
||||||
108, // 94: accountFiee.AccountFiee.DeleteChatRecord:input_type -> accountFiee.DeleteChatRecordRequest
|
106, // 94: accountFiee.AccountFiee.SaveChatRecord:input_type -> accountFiee.ChatRecordData
|
||||||
109, // 95: accountFiee.AccountFiee.GetChatRecordDetail:input_type -> accountFiee.GetChatRecordByIdRequest
|
108, // 95: accountFiee.AccountFiee.DeleteChatRecord:input_type -> accountFiee.DeleteChatRecordRequest
|
||||||
110, // 96: accountFiee.AccountFiee.GetChatRecordList:input_type -> accountFiee.GetChatRecordListRequest
|
109, // 96: accountFiee.AccountFiee.GetChatRecordDetail:input_type -> accountFiee.GetChatRecordByIdRequest
|
||||||
114, // 97: accountFiee.AccountFiee.CreateChatMedia:input_type -> accountFiee.ChatMediaData
|
110, // 97: accountFiee.AccountFiee.GetChatRecordList:input_type -> accountFiee.GetChatRecordListRequest
|
||||||
114, // 98: accountFiee.AccountFiee.UpdateChatMedia:input_type -> accountFiee.ChatMediaData
|
114, // 98: accountFiee.AccountFiee.CreateChatMedia:input_type -> accountFiee.ChatMediaData
|
||||||
114, // 99: accountFiee.AccountFiee.SaveChatMedia:input_type -> accountFiee.ChatMediaData
|
114, // 99: accountFiee.AccountFiee.UpdateChatMedia:input_type -> accountFiee.ChatMediaData
|
||||||
116, // 100: accountFiee.AccountFiee.DeleteChatMedia:input_type -> accountFiee.DeleteChatMediaRequest
|
114, // 100: accountFiee.AccountFiee.SaveChatMedia:input_type -> accountFiee.ChatMediaData
|
||||||
117, // 101: accountFiee.AccountFiee.GetChatMediaDetail:input_type -> accountFiee.GetChatMediaByIdRequest
|
116, // 101: accountFiee.AccountFiee.DeleteChatMedia:input_type -> accountFiee.DeleteChatMediaRequest
|
||||||
118, // 102: accountFiee.AccountFiee.GetChatMediaList:input_type -> accountFiee.GetChatMediaListRequest
|
117, // 102: accountFiee.AccountFiee.GetChatMediaDetail:input_type -> accountFiee.GetChatMediaByIdRequest
|
||||||
123, // 103: accountFiee.AccountFiee.CreateChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
118, // 103: accountFiee.AccountFiee.GetChatMediaList:input_type -> accountFiee.GetChatMediaListRequest
|
||||||
123, // 104: accountFiee.AccountFiee.UpdateChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
123, // 104: accountFiee.AccountFiee.CreateChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
||||||
123, // 105: accountFiee.AccountFiee.SaveChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
123, // 105: accountFiee.AccountFiee.UpdateChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
||||||
125, // 106: accountFiee.AccountFiee.DeleteChatAutoReplyRuler:input_type -> accountFiee.DeleteChatAutoReplyRulerRequest
|
123, // 106: accountFiee.AccountFiee.SaveChatAutoReplyRuler:input_type -> accountFiee.ChatAutoReplyRulerData
|
||||||
126, // 107: accountFiee.AccountFiee.GetChatAutoReplyRulerDetail:input_type -> accountFiee.GetChatAutoReplyRulerByIdRequest
|
125, // 107: accountFiee.AccountFiee.DeleteChatAutoReplyRuler:input_type -> accountFiee.DeleteChatAutoReplyRulerRequest
|
||||||
127, // 108: accountFiee.AccountFiee.GetChatAutoReplyRulerList:input_type -> accountFiee.GetChatAutoReplyRulerListRequest
|
126, // 108: accountFiee.AccountFiee.GetChatAutoReplyRulerDetail:input_type -> accountFiee.GetChatAutoReplyRulerByIdRequest
|
||||||
78, // 109: accountFiee.AccountFiee.Login:output_type -> accountFiee.TokenInfo
|
127, // 109: accountFiee.AccountFiee.GetChatAutoReplyRulerList:input_type -> accountFiee.GetChatAutoReplyRulerListRequest
|
||||||
78, // 110: accountFiee.AccountFiee.RefreshToken:output_type -> accountFiee.TokenInfo
|
78, // 110: accountFiee.AccountFiee.Login:output_type -> accountFiee.TokenInfo
|
||||||
49, // 111: accountFiee.AccountFiee.Logout:output_type -> accountFiee.CommonResponse
|
78, // 111: accountFiee.AccountFiee.RefreshToken:output_type -> accountFiee.TokenInfo
|
||||||
49, // 112: accountFiee.AccountFiee.OffLine:output_type -> accountFiee.CommonResponse
|
49, // 112: accountFiee.AccountFiee.Logout:output_type -> accountFiee.CommonResponse
|
||||||
43, // 113: accountFiee.AccountFiee.OnlineLog:output_type -> accountFiee.LoginLogsResponse
|
49, // 113: accountFiee.AccountFiee.OffLine:output_type -> accountFiee.CommonResponse
|
||||||
44, // 114: accountFiee.AccountFiee.OnlineLogById:output_type -> accountFiee.LoginLog
|
43, // 114: accountFiee.AccountFiee.OnlineLog:output_type -> accountFiee.LoginLogsResponse
|
||||||
65, // 115: accountFiee.AccountFiee.CheckPwd:output_type -> accountFiee.UpdateResponse
|
44, // 115: accountFiee.AccountFiee.OnlineLogById:output_type -> accountFiee.LoginLog
|
||||||
55, // 116: accountFiee.AccountFiee.SendMsg:output_type -> accountFiee.SendMsgStatusResponse
|
65, // 116: accountFiee.AccountFiee.CheckPwd:output_type -> accountFiee.UpdateResponse
|
||||||
55, // 117: accountFiee.AccountFiee.SendCustomMsg:output_type -> accountFiee.SendMsgStatusResponse
|
55, // 117: accountFiee.AccountFiee.SendMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
55, // 118: accountFiee.AccountFiee.SendExCustomMsg:output_type -> accountFiee.SendMsgStatusResponse
|
55, // 118: accountFiee.AccountFiee.SendCustomMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
55, // 119: accountFiee.AccountFiee.SendMsgRegister:output_type -> accountFiee.SendMsgStatusResponse
|
55, // 119: accountFiee.AccountFiee.SendExCustomMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
55, // 120: accountFiee.AccountFiee.CheckMsg:output_type -> accountFiee.SendMsgStatusResponse
|
55, // 120: accountFiee.AccountFiee.SendMsgRegister:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
55, // 121: accountFiee.AccountFiee.SendNewTelNumMsg:output_type -> accountFiee.SendMsgStatusResponse
|
55, // 121: accountFiee.AccountFiee.CheckMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
55, // 122: accountFiee.AccountFiee.UpdateTelNum:output_type -> accountFiee.SendMsgStatusResponse
|
55, // 122: accountFiee.AccountFiee.SendNewTelNumMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
75, // 123: accountFiee.AccountFiee.Authentication:output_type -> accountFiee.RequestStatus
|
55, // 123: accountFiee.AccountFiee.UpdateTelNum:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
71, // 124: accountFiee.AccountFiee.DecryptJwt:output_type -> accountFiee.DecryptJwtResponse
|
75, // 124: accountFiee.AccountFiee.Authentication:output_type -> accountFiee.RequestStatus
|
||||||
17, // 125: accountFiee.AccountFiee.Info:output_type -> accountFiee.UserInfoResponse
|
71, // 125: accountFiee.AccountFiee.DecryptJwt:output_type -> accountFiee.DecryptJwtResponse
|
||||||
70, // 126: accountFiee.AccountFiee.JobNumGetInfo:output_type -> accountFiee.InfoResponse
|
17, // 126: accountFiee.AccountFiee.Info:output_type -> accountFiee.UserInfoResponse
|
||||||
17, // 127: accountFiee.AccountFiee.SubNumGetInfo:output_type -> accountFiee.UserInfoResponse
|
70, // 127: accountFiee.AccountFiee.JobNumGetInfo:output_type -> accountFiee.InfoResponse
|
||||||
68, // 128: accountFiee.AccountFiee.List:output_type -> accountFiee.ListResponse
|
17, // 128: accountFiee.AccountFiee.SubNumGetInfo:output_type -> accountFiee.UserInfoResponse
|
||||||
68, // 129: accountFiee.AccountFiee.RandList:output_type -> accountFiee.ListResponse
|
68, // 129: accountFiee.AccountFiee.List:output_type -> accountFiee.ListResponse
|
||||||
68, // 130: accountFiee.AccountFiee.ListByIDs:output_type -> accountFiee.ListResponse
|
68, // 130: accountFiee.AccountFiee.RandList:output_type -> accountFiee.ListResponse
|
||||||
61, // 131: accountFiee.AccountFiee.Remove:output_type -> accountFiee.RemoveResponse
|
68, // 131: accountFiee.AccountFiee.ListByIDs:output_type -> accountFiee.ListResponse
|
||||||
65, // 132: accountFiee.AccountFiee.Update:output_type -> accountFiee.UpdateResponse
|
61, // 132: accountFiee.AccountFiee.Remove:output_type -> accountFiee.RemoveResponse
|
||||||
68, // 133: accountFiee.AccountFiee.UsersByTel:output_type -> accountFiee.ListResponse
|
65, // 133: accountFiee.AccountFiee.Update:output_type -> accountFiee.UpdateResponse
|
||||||
17, // 134: accountFiee.AccountFiee.UserByTel:output_type -> accountFiee.UserInfoResponse
|
68, // 134: accountFiee.AccountFiee.UsersByTel:output_type -> accountFiee.ListResponse
|
||||||
55, // 135: accountFiee.AccountFiee.OnlySendMsg:output_type -> accountFiee.SendMsgStatusResponse
|
17, // 135: accountFiee.AccountFiee.UserByTel:output_type -> accountFiee.UserInfoResponse
|
||||||
55, // 136: accountFiee.AccountFiee.OnlyCheckMsg:output_type -> accountFiee.SendMsgStatusResponse
|
55, // 136: accountFiee.AccountFiee.OnlySendMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
28, // 137: accountFiee.AccountFiee.MailAccountByNickName:output_type -> accountFiee.MaiAccountResponse
|
55, // 137: accountFiee.AccountFiee.OnlyCheckMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
68, // 138: accountFiee.AccountFiee.ListV2:output_type -> accountFiee.ListResponse
|
28, // 138: accountFiee.AccountFiee.MailAccountByNickName:output_type -> accountFiee.MaiAccountResponse
|
||||||
23, // 139: accountFiee.AccountFiee.QueryPersonnelWithTheSameName:output_type -> accountFiee.QueryPersonnelWithTheSameNameResponse
|
68, // 139: accountFiee.AccountFiee.ListV2:output_type -> accountFiee.ListResponse
|
||||||
68, // 140: accountFiee.AccountFiee.UsersByJobNum:output_type -> accountFiee.ListResponse
|
23, // 140: accountFiee.AccountFiee.QueryPersonnelWithTheSameName:output_type -> accountFiee.QueryPersonnelWithTheSameNameResponse
|
||||||
18, // 141: accountFiee.AccountFiee.RealName:output_type -> accountFiee.RealNameResponse
|
68, // 141: accountFiee.AccountFiee.UsersByJobNum:output_type -> accountFiee.ListResponse
|
||||||
20, // 142: accountFiee.AccountFiee.Register:output_type -> accountFiee.RegisterResponse
|
18, // 142: accountFiee.AccountFiee.RealName:output_type -> accountFiee.RealNameResponse
|
||||||
14, // 143: accountFiee.AccountFiee.UserList:output_type -> accountFiee.UserListResponse
|
20, // 143: accountFiee.AccountFiee.Register:output_type -> accountFiee.RegisterResponse
|
||||||
12, // 144: accountFiee.AccountFiee.CheckRealName:output_type -> accountFiee.CheckRealNameResponse
|
14, // 144: accountFiee.AccountFiee.UserList:output_type -> accountFiee.UserListResponse
|
||||||
10, // 145: accountFiee.AccountFiee.GenerateSliderCaptcha:output_type -> accountFiee.GenerateSliderCaptchaResponse
|
12, // 145: accountFiee.AccountFiee.CheckRealName:output_type -> accountFiee.CheckRealNameResponse
|
||||||
8, // 146: accountFiee.AccountFiee.VerifySliderCaptcha:output_type -> accountFiee.VerifySliderCaptchaResponse
|
10, // 146: accountFiee.AccountFiee.GenerateSliderCaptcha:output_type -> accountFiee.GenerateSliderCaptchaResponse
|
||||||
55, // 147: accountFiee.AccountFiee.SendNationMsg:output_type -> accountFiee.SendMsgStatusResponse
|
8, // 147: accountFiee.AccountFiee.VerifySliderCaptcha:output_type -> accountFiee.VerifySliderCaptchaResponse
|
||||||
6, // 148: accountFiee.AccountFiee.VerifySliderStatus:output_type -> accountFiee.VerifySliderStatusResponse
|
55, // 148: accountFiee.AccountFiee.SendNationMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
55, // 149: accountFiee.AccountFiee.SendNationTemplateMsg:output_type -> accountFiee.SendMsgStatusResponse
|
6, // 149: accountFiee.AccountFiee.VerifySliderStatus:output_type -> accountFiee.VerifySliderStatusResponse
|
||||||
4, // 150: accountFiee.AccountFiee.GetInviterInfo:output_type -> accountFiee.InviterInfoResponse
|
55, // 150: accountFiee.AccountFiee.SendNationTemplateMsg:output_type -> accountFiee.SendMsgStatusResponse
|
||||||
2, // 151: accountFiee.AccountFiee.GetInviterList:output_type -> accountFiee.InviterListResponse
|
4, // 151: accountFiee.AccountFiee.GetInviterInfo:output_type -> accountFiee.InviterInfoResponse
|
||||||
136, // 152: accountFiee.AccountFiee.CreateUserAndRealName:output_type -> accountFiee.CreateUserAndRealNameResponse
|
2, // 152: accountFiee.AccountFiee.GetInviterList:output_type -> accountFiee.InviterListResponse
|
||||||
49, // 153: accountFiee.AccountFiee.SaveSubmitInfo:output_type -> accountFiee.CommonResponse
|
61, // 153: accountFiee.AccountFiee.WriteOff:output_type -> accountFiee.RemoveResponse
|
||||||
130, // 154: accountFiee.AccountFiee.CreateChatUser:output_type -> accountFiee.CreateChatUserResp
|
136, // 154: accountFiee.AccountFiee.CreateUserAndRealName:output_type -> accountFiee.CreateUserAndRealNameResponse
|
||||||
105, // 155: accountFiee.AccountFiee.UpdateChatUser:output_type -> accountFiee.CommonMsg
|
49, // 155: accountFiee.AccountFiee.SaveSubmitInfo:output_type -> accountFiee.CommonResponse
|
||||||
105, // 156: accountFiee.AccountFiee.SaveChatUser:output_type -> accountFiee.CommonMsg
|
130, // 156: accountFiee.AccountFiee.CreateChatUser:output_type -> accountFiee.CreateChatUserResp
|
||||||
105, // 157: accountFiee.AccountFiee.DeleteChatUser:output_type -> accountFiee.CommonMsg
|
105, // 157: accountFiee.AccountFiee.UpdateChatUser:output_type -> accountFiee.CommonMsg
|
||||||
129, // 158: accountFiee.AccountFiee.GetChatUserDetail:output_type -> accountFiee.ChatUserData
|
105, // 158: accountFiee.AccountFiee.SaveChatUser:output_type -> accountFiee.CommonMsg
|
||||||
134, // 159: accountFiee.AccountFiee.GetChatUserList:output_type -> accountFiee.GetChatUserListResp
|
105, // 159: accountFiee.AccountFiee.DeleteChatUser:output_type -> accountFiee.CommonMsg
|
||||||
122, // 160: accountFiee.AccountFiee.GetChatUserList2:output_type -> accountFiee.GetChatUserListResp2
|
129, // 160: accountFiee.AccountFiee.GetChatUserDetail:output_type -> accountFiee.ChatUserData
|
||||||
113, // 161: accountFiee.AccountFiee.RegisterWaiter:output_type -> accountFiee.RegisterWaiterResp
|
134, // 161: accountFiee.AccountFiee.GetChatUserList:output_type -> accountFiee.GetChatUserListResp
|
||||||
107, // 162: accountFiee.AccountFiee.CreateChatRecord:output_type -> accountFiee.CreateChatRecordResp
|
122, // 162: accountFiee.AccountFiee.GetChatUserList2:output_type -> accountFiee.GetChatUserListResp2
|
||||||
105, // 163: accountFiee.AccountFiee.UpdateChatRecord:output_type -> accountFiee.CommonMsg
|
113, // 163: accountFiee.AccountFiee.RegisterWaiter:output_type -> accountFiee.RegisterWaiterResp
|
||||||
105, // 164: accountFiee.AccountFiee.SaveChatRecord:output_type -> accountFiee.CommonMsg
|
107, // 164: accountFiee.AccountFiee.CreateChatRecord:output_type -> accountFiee.CreateChatRecordResp
|
||||||
105, // 165: accountFiee.AccountFiee.DeleteChatRecord:output_type -> accountFiee.CommonMsg
|
105, // 165: accountFiee.AccountFiee.UpdateChatRecord:output_type -> accountFiee.CommonMsg
|
||||||
106, // 166: accountFiee.AccountFiee.GetChatRecordDetail:output_type -> accountFiee.ChatRecordData
|
105, // 166: accountFiee.AccountFiee.SaveChatRecord:output_type -> accountFiee.CommonMsg
|
||||||
111, // 167: accountFiee.AccountFiee.GetChatRecordList:output_type -> accountFiee.GetChatRecordListResp
|
105, // 167: accountFiee.AccountFiee.DeleteChatRecord:output_type -> accountFiee.CommonMsg
|
||||||
115, // 168: accountFiee.AccountFiee.CreateChatMedia:output_type -> accountFiee.CreateChatMediaResp
|
106, // 168: accountFiee.AccountFiee.GetChatRecordDetail:output_type -> accountFiee.ChatRecordData
|
||||||
105, // 169: accountFiee.AccountFiee.UpdateChatMedia:output_type -> accountFiee.CommonMsg
|
111, // 169: accountFiee.AccountFiee.GetChatRecordList:output_type -> accountFiee.GetChatRecordListResp
|
||||||
105, // 170: accountFiee.AccountFiee.SaveChatMedia:output_type -> accountFiee.CommonMsg
|
115, // 170: accountFiee.AccountFiee.CreateChatMedia:output_type -> accountFiee.CreateChatMediaResp
|
||||||
105, // 171: accountFiee.AccountFiee.DeleteChatMedia:output_type -> accountFiee.CommonMsg
|
105, // 171: accountFiee.AccountFiee.UpdateChatMedia:output_type -> accountFiee.CommonMsg
|
||||||
114, // 172: accountFiee.AccountFiee.GetChatMediaDetail:output_type -> accountFiee.ChatMediaData
|
105, // 172: accountFiee.AccountFiee.SaveChatMedia:output_type -> accountFiee.CommonMsg
|
||||||
119, // 173: accountFiee.AccountFiee.GetChatMediaList:output_type -> accountFiee.GetChatMediaListResp
|
105, // 173: accountFiee.AccountFiee.DeleteChatMedia:output_type -> accountFiee.CommonMsg
|
||||||
124, // 174: accountFiee.AccountFiee.CreateChatAutoReplyRuler:output_type -> accountFiee.CreateChatAutoReplyRulerResp
|
114, // 174: accountFiee.AccountFiee.GetChatMediaDetail:output_type -> accountFiee.ChatMediaData
|
||||||
105, // 175: accountFiee.AccountFiee.UpdateChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
119, // 175: accountFiee.AccountFiee.GetChatMediaList:output_type -> accountFiee.GetChatMediaListResp
|
||||||
105, // 176: accountFiee.AccountFiee.SaveChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
124, // 176: accountFiee.AccountFiee.CreateChatAutoReplyRuler:output_type -> accountFiee.CreateChatAutoReplyRulerResp
|
||||||
105, // 177: accountFiee.AccountFiee.DeleteChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
105, // 177: accountFiee.AccountFiee.UpdateChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
||||||
123, // 178: accountFiee.AccountFiee.GetChatAutoReplyRulerDetail:output_type -> accountFiee.ChatAutoReplyRulerData
|
105, // 178: accountFiee.AccountFiee.SaveChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
||||||
128, // 179: accountFiee.AccountFiee.GetChatAutoReplyRulerList:output_type -> accountFiee.GetChatAutoReplyRulerListResp
|
105, // 179: accountFiee.AccountFiee.DeleteChatAutoReplyRuler:output_type -> accountFiee.CommonMsg
|
||||||
109, // [109:180] is the sub-list for method output_type
|
123, // 180: accountFiee.AccountFiee.GetChatAutoReplyRulerDetail:output_type -> accountFiee.ChatAutoReplyRulerData
|
||||||
38, // [38:109] is the sub-list for method input_type
|
128, // 181: accountFiee.AccountFiee.GetChatAutoReplyRulerList:output_type -> accountFiee.GetChatAutoReplyRulerListResp
|
||||||
|
110, // [110:182] is the sub-list for method output_type
|
||||||
|
38, // [38:110] is the sub-list for method input_type
|
||||||
38, // [38:38] is the sub-list for extension type_name
|
38, // [38:38] is the sub-list for extension type_name
|
||||||
38, // [38:38] is the sub-list for extension extendee
|
38, // [38:38] is the sub-list for extension extendee
|
||||||
0, // [0:38] is the sub-list for field type_name
|
0, // [0:38] is the sub-list for field type_name
|
||||||
|
|||||||
@ -68,6 +68,7 @@ service AccountFiee {
|
|||||||
rpc SendNationTemplateMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
rpc SendNationTemplateMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||||
rpc GetInviterInfo(InviterInfoRequest) returns(InviterInfoResponse) {} //获取邀请人信息
|
rpc GetInviterInfo(InviterInfoRequest) returns(InviterInfoResponse) {} //获取邀请人信息
|
||||||
rpc GetInviterList(InviterListRequest) returns(InviterListResponse) {} //获取邀请人信息
|
rpc GetInviterList(InviterListRequest) returns(InviterListResponse) {} //获取邀请人信息
|
||||||
|
rpc WriteOff (WriteOffRequest) returns (RemoveResponse) {} //用户注销
|
||||||
|
|
||||||
|
|
||||||
rpc CreateUserAndRealName (CreateUserAndRealNameRequest) returns (CreateUserAndRealNameResponse) {}// 创建用户并实名, 自动导入
|
rpc CreateUserAndRealName (CreateUserAndRealNameRequest) returns (CreateUserAndRealNameResponse) {}// 创建用户并实名, 自动导入
|
||||||
@ -526,20 +527,6 @@ message RemoveRequest {
|
|||||||
}
|
}
|
||||||
message WriteOffRequest{
|
message WriteOffRequest{
|
||||||
uint64 id = 1;
|
uint64 id = 1;
|
||||||
string domain = 2;
|
|
||||||
uint64 userId = 3;
|
|
||||||
string tel = 4;
|
|
||||||
string jonNum = 5;
|
|
||||||
string userName = 6;
|
|
||||||
string enterDate = 7;
|
|
||||||
string positionName =8;
|
|
||||||
uint64 positionId = 9;
|
|
||||||
string siteName = 10;
|
|
||||||
uint64 siteId =11;
|
|
||||||
string authUrl =12;
|
|
||||||
string type =13;
|
|
||||||
uint32 status =14;
|
|
||||||
string submitDate=15;
|
|
||||||
}
|
}
|
||||||
message WriteOffListRequest{
|
message WriteOffListRequest{
|
||||||
uint64 page = 1;
|
uint64 page = 1;
|
||||||
@ -740,6 +727,7 @@ message AccountInfo {
|
|||||||
string updatedAt = 41;
|
string updatedAt = 41;
|
||||||
string SecurityCode = 42 [json_name = "securityCode"];
|
string SecurityCode = 42 [json_name = "securityCode"];
|
||||||
string BlockAddr = 43 [json_name = "blockAddr"];
|
string BlockAddr = 43 [json_name = "blockAddr"];
|
||||||
|
bool WriteOff = 44 [json_name = "writeOff"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message UserInfoV2 {
|
message UserInfoV2 {
|
||||||
|
|||||||
@ -72,6 +72,7 @@ type AccountFieeClient interface {
|
|||||||
SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||||
GetInviterInfo(ctx context.Context, in *InviterInfoRequest, opts ...grpc_go.CallOption) (*InviterInfoResponse, common.ErrorWithAttachment)
|
GetInviterInfo(ctx context.Context, in *InviterInfoRequest, opts ...grpc_go.CallOption) (*InviterInfoResponse, common.ErrorWithAttachment)
|
||||||
GetInviterList(ctx context.Context, in *InviterListRequest, opts ...grpc_go.CallOption) (*InviterListResponse, common.ErrorWithAttachment)
|
GetInviterList(ctx context.Context, in *InviterListRequest, opts ...grpc_go.CallOption) (*InviterListResponse, common.ErrorWithAttachment)
|
||||||
|
WriteOff(ctx context.Context, in *WriteOffRequest, opts ...grpc_go.CallOption) (*RemoveResponse, common.ErrorWithAttachment)
|
||||||
CreateUserAndRealName(ctx context.Context, in *CreateUserAndRealNameRequest, opts ...grpc_go.CallOption) (*CreateUserAndRealNameResponse, common.ErrorWithAttachment)
|
CreateUserAndRealName(ctx context.Context, in *CreateUserAndRealNameRequest, opts ...grpc_go.CallOption) (*CreateUserAndRealNameResponse, common.ErrorWithAttachment)
|
||||||
// submit info
|
// submit info
|
||||||
SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
@ -152,6 +153,7 @@ type AccountFieeClientImpl struct {
|
|||||||
SendNationTemplateMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
SendNationTemplateMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||||
GetInviterInfo func(ctx context.Context, in *InviterInfoRequest) (*InviterInfoResponse, error)
|
GetInviterInfo func(ctx context.Context, in *InviterInfoRequest) (*InviterInfoResponse, error)
|
||||||
GetInviterList func(ctx context.Context, in *InviterListRequest) (*InviterListResponse, error)
|
GetInviterList func(ctx context.Context, in *InviterListRequest) (*InviterListResponse, error)
|
||||||
|
WriteOff func(ctx context.Context, in *WriteOffRequest) (*RemoveResponse, error)
|
||||||
CreateUserAndRealName func(ctx context.Context, in *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
|
CreateUserAndRealName func(ctx context.Context, in *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
|
||||||
SaveSubmitInfo func(ctx context.Context, in *SubmitInfoRequest) (*CommonResponse, error)
|
SaveSubmitInfo func(ctx context.Context, in *SubmitInfoRequest) (*CommonResponse, error)
|
||||||
CreateChatUser func(ctx context.Context, in *ChatUserData) (*CreateChatUserResp, error)
|
CreateChatUser func(ctx context.Context, in *ChatUserData) (*CreateChatUserResp, error)
|
||||||
@ -452,6 +454,12 @@ func (c *accountFieeClient) GetInviterList(ctx context.Context, in *InviterListR
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetInviterList", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetInviterList", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *accountFieeClient) WriteOff(ctx context.Context, in *WriteOffRequest, opts ...grpc_go.CallOption) (*RemoveResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(RemoveResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WriteOff", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *accountFieeClient) CreateUserAndRealName(ctx context.Context, in *CreateUserAndRealNameRequest, opts ...grpc_go.CallOption) (*CreateUserAndRealNameResponse, common.ErrorWithAttachment) {
|
func (c *accountFieeClient) CreateUserAndRealName(ctx context.Context, in *CreateUserAndRealNameRequest, opts ...grpc_go.CallOption) (*CreateUserAndRealNameResponse, common.ErrorWithAttachment) {
|
||||||
out := new(CreateUserAndRealNameResponse)
|
out := new(CreateUserAndRealNameResponse)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -668,6 +676,7 @@ type AccountFieeServer interface {
|
|||||||
SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||||
GetInviterInfo(context.Context, *InviterInfoRequest) (*InviterInfoResponse, error)
|
GetInviterInfo(context.Context, *InviterInfoRequest) (*InviterInfoResponse, error)
|
||||||
GetInviterList(context.Context, *InviterListRequest) (*InviterListResponse, error)
|
GetInviterList(context.Context, *InviterListRequest) (*InviterListResponse, error)
|
||||||
|
WriteOff(context.Context, *WriteOffRequest) (*RemoveResponse, error)
|
||||||
CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
|
CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
|
||||||
// submit info
|
// submit info
|
||||||
SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error)
|
SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error)
|
||||||
@ -835,6 +844,9 @@ func (UnimplementedAccountFieeServer) GetInviterInfo(context.Context, *InviterIn
|
|||||||
func (UnimplementedAccountFieeServer) GetInviterList(context.Context, *InviterListRequest) (*InviterListResponse, error) {
|
func (UnimplementedAccountFieeServer) GetInviterList(context.Context, *InviterListRequest) (*InviterListResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetInviterList not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetInviterList not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedAccountFieeServer) WriteOff(context.Context, *WriteOffRequest) (*RemoveResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method WriteOff not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedAccountFieeServer) CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error) {
|
func (UnimplementedAccountFieeServer) CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CreateUserAndRealName not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CreateUserAndRealName not implemented")
|
||||||
}
|
}
|
||||||
@ -2194,6 +2206,35 @@ func _AccountFiee_GetInviterList_Handler(srv interface{}, ctx context.Context, d
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _AccountFiee_WriteOff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(WriteOffRequest)
|
||||||
|
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("WriteOff", 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 _AccountFiee_CreateUserAndRealName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _AccountFiee_CreateUserAndRealName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(CreateUserAndRealNameRequest)
|
in := new(CreateUserAndRealNameRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -3185,6 +3226,10 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "GetInviterList",
|
MethodName: "GetInviterList",
|
||||||
Handler: _AccountFiee_GetInviterList_Handler,
|
Handler: _AccountFiee_GetInviterList_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "WriteOff",
|
||||||
|
Handler: _AccountFiee_WriteOff_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "CreateUserAndRealName",
|
MethodName: "CreateUserAndRealName",
|
||||||
Handler: _AccountFiee_CreateUserAndRealName_Handler,
|
Handler: _AccountFiee_CreateUserAndRealName_Handler,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -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.5
|
// - protoc-gen-go-triple v1.0.5
|
||||||
// - protoc v6.32.0
|
// - protoc v5.26.0
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
|
|||||||
13477
api/cast/cast.pb.go
13477
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
@ -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 v6.32.0--rc2
|
// - protoc v3.21.1
|
||||||
// source: pb/fiee/cast.proto
|
// source: pb/fiee/cast.proto
|
||||||
|
|
||||||
package cast
|
package cast
|
||||||
@ -38,6 +38,7 @@ type CastClient interface {
|
|||||||
MediaInfo(ctx context.Context, in *MediaInfoReq, opts ...grpc_go.CallOption) (*MediaInfoResp, common.ErrorWithAttachment)
|
MediaInfo(ctx context.Context, in *MediaInfoReq, opts ...grpc_go.CallOption) (*MediaInfoResp, common.ErrorWithAttachment)
|
||||||
MediaInfoByPlatform(ctx context.Context, in *MediaInfoByPlatformReq, opts ...grpc_go.CallOption) (*MediaInfoByPlatformResp, common.ErrorWithAttachment)
|
MediaInfoByPlatform(ctx context.Context, in *MediaInfoByPlatformReq, opts ...grpc_go.CallOption) (*MediaInfoByPlatformResp, common.ErrorWithAttachment)
|
||||||
WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment)
|
WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment)
|
||||||
|
WorkListPublished(ctx context.Context, in *WorkListPublishedReq, opts ...grpc_go.CallOption) (*WorkListPublishedResp, common.ErrorWithAttachment)
|
||||||
WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment)
|
WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment)
|
||||||
UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
MediaAccounts(ctx context.Context, in *MediaAccountsReq, opts ...grpc_go.CallOption) (*MediaAccountsResp, common.ErrorWithAttachment)
|
MediaAccounts(ctx context.Context, in *MediaAccountsReq, opts ...grpc_go.CallOption) (*MediaAccountsResp, common.ErrorWithAttachment)
|
||||||
@ -51,6 +52,8 @@ type CastClient interface {
|
|||||||
UpdateWorkPlatformInfo(ctx context.Context, in *UpdateWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*UpdateWorkPlatformInfoResp, common.ErrorWithAttachment)
|
UpdateWorkPlatformInfo(ctx context.Context, in *UpdateWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*UpdateWorkPlatformInfoResp, common.ErrorWithAttachment)
|
||||||
UpdateWorkPublishLog(ctx context.Context, in *UpdateWorkPublishLogReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
UpdateWorkPublishLog(ctx context.Context, in *UpdateWorkPublishLogReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
RefreshWorkList(ctx context.Context, in *RefreshWorkListReq, opts ...grpc_go.CallOption) (*RefreshWorkListResp, common.ErrorWithAttachment)
|
RefreshWorkList(ctx context.Context, in *RefreshWorkListReq, opts ...grpc_go.CallOption) (*RefreshWorkListResp, common.ErrorWithAttachment)
|
||||||
|
WorkResource(ctx context.Context, in *WorkResourceReq, opts ...grpc_go.CallOption) (*WorkResourceResp, common.ErrorWithAttachment)
|
||||||
|
UpdateWorkResource(ctx context.Context, in *UpdateWorkResourceReq, opts ...grpc_go.CallOption) (*UpdateWorkResourceResp, common.ErrorWithAttachment)
|
||||||
OAuthAccount(ctx context.Context, in *OAuthAccountReq, opts ...grpc_go.CallOption) (*OAuthAccountResp, common.ErrorWithAttachment)
|
OAuthAccount(ctx context.Context, in *OAuthAccountReq, opts ...grpc_go.CallOption) (*OAuthAccountResp, common.ErrorWithAttachment)
|
||||||
OAuthAccountV2(ctx context.Context, in *OAuthAccountV2Req, opts ...grpc_go.CallOption) (*OAuthAccountV2Resp, common.ErrorWithAttachment)
|
OAuthAccountV2(ctx context.Context, in *OAuthAccountV2Req, opts ...grpc_go.CallOption) (*OAuthAccountV2Resp, common.ErrorWithAttachment)
|
||||||
OAuthCodeToToken(ctx context.Context, in *OAuthCodeToTokenReq, opts ...grpc_go.CallOption) (*OAuthCodeToTokenResp, common.ErrorWithAttachment)
|
OAuthCodeToToken(ctx context.Context, in *OAuthCodeToTokenReq, opts ...grpc_go.CallOption) (*OAuthCodeToTokenResp, common.ErrorWithAttachment)
|
||||||
@ -104,6 +107,7 @@ type CastClient interface {
|
|||||||
CalculateMediaMetricsByWorks(ctx context.Context, in *CalculateMediaMetricsByWorksReq, opts ...grpc_go.CallOption) (*CalculateMediaMetricsByWorksResp, common.ErrorWithAttachment)
|
CalculateMediaMetricsByWorks(ctx context.Context, in *CalculateMediaMetricsByWorksReq, opts ...grpc_go.CallOption) (*CalculateMediaMetricsByWorksResp, common.ErrorWithAttachment)
|
||||||
// 艺人AyrShare信息相关接口
|
// 艺人AyrShare信息相关接口
|
||||||
GetArtistAyrShareInfo(ctx context.Context, in *GetArtistAyrShareInfoReq, opts ...grpc_go.CallOption) (*GetArtistAyrShareInfoResp, common.ErrorWithAttachment)
|
GetArtistAyrShareInfo(ctx context.Context, in *GetArtistAyrShareInfoReq, opts ...grpc_go.CallOption) (*GetArtistAyrShareInfoResp, common.ErrorWithAttachment)
|
||||||
|
GetArtistAyrShareInfoByPlatformIDs(ctx context.Context, in *GetArtistAyrShareInfoByPlatformIDsReq, opts ...grpc_go.CallOption) (*GetArtistAyrShareInfoByPlatformIDsResp, common.ErrorWithAttachment)
|
||||||
// 作品平台信息相关接口
|
// 作品平台信息相关接口
|
||||||
ListWorkPlatformInfo(ctx context.Context, in *ListWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*ListWorkPlatformInfoResp, common.ErrorWithAttachment)
|
ListWorkPlatformInfo(ctx context.Context, in *ListWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*ListWorkPlatformInfoResp, common.ErrorWithAttachment)
|
||||||
// 任务列表相关接口
|
// 任务列表相关接口
|
||||||
@ -115,8 +119,19 @@ type CastClient interface {
|
|||||||
UpdateCastTag(ctx context.Context, in *UpdateCastTagReq, opts ...grpc_go.CallOption) (*UpdateCastTagResp, common.ErrorWithAttachment)
|
UpdateCastTag(ctx context.Context, in *UpdateCastTagReq, opts ...grpc_go.CallOption) (*UpdateCastTagResp, common.ErrorWithAttachment)
|
||||||
ListCastTags(ctx context.Context, in *ListCastTagsReq, opts ...grpc_go.CallOption) (*ListCastTagsResp, common.ErrorWithAttachment)
|
ListCastTags(ctx context.Context, in *ListCastTagsReq, opts ...grpc_go.CallOption) (*ListCastTagsResp, common.ErrorWithAttachment)
|
||||||
UpdateCastTagBatch(ctx context.Context, in *UpdateCastTagBatchReq, opts ...grpc_go.CallOption) (*UpdateCastTagBatchResp, common.ErrorWithAttachment)
|
UpdateCastTagBatch(ctx context.Context, in *UpdateCastTagBatchReq, opts ...grpc_go.CallOption) (*UpdateCastTagBatchResp, common.ErrorWithAttachment)
|
||||||
|
BatchUpdateCastTags(ctx context.Context, in *BatchUpdateCastTagsReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
RecalculateCastTagQuoteCount(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*RecalculateCastTagQuoteCountResp, common.ErrorWithAttachment)
|
RecalculateCastTagQuoteCount(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*RecalculateCastTagQuoteCountResp, common.ErrorWithAttachment)
|
||||||
|
// 竞品报告相关接口
|
||||||
|
CreateCompetitiveReport(ctx context.Context, in *CreateCompetitiveReportReq, opts ...grpc_go.CallOption) (*CreateCompetitiveReportResp, common.ErrorWithAttachment)
|
||||||
|
ImportCompetitiveReportBatch(ctx context.Context, in *ImportCompetitiveReportBatchReq, opts ...grpc_go.CallOption) (*ImportCompetitiveReportBatchResp, common.ErrorWithAttachment)
|
||||||
|
UpdateCompetitiveReportStatus(ctx context.Context, in *UpdateCompetitiveReportStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
|
GetCompetitiveReport(ctx context.Context, in *GetCompetitiveReportDetailReq, opts ...grpc_go.CallOption) (*GetCompetitiveReportDetailResp, common.ErrorWithAttachment)
|
||||||
|
GetCompetitiveReportForApp(ctx context.Context, in *GetCompetitiveReportForAppReq, opts ...grpc_go.CallOption) (*GetCompetitiveReportForAppResp, common.ErrorWithAttachment)
|
||||||
|
ListCompetitiveReport(ctx context.Context, in *ListCompetitiveReportReq, opts ...grpc_go.CallOption) (*ListCompetitiveReportResp, common.ErrorWithAttachment)
|
||||||
|
DeleteCompetitiveReport(ctx context.Context, in *DeleteCompetitiveReportReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
|
UpdateCompetitiveReportApprovalID(ctx context.Context, in *UpdateCompetitiveReportApprovalIDReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
|
CountCompetitiveReportByWorkUuids(ctx context.Context, in *CountCompetitiveReportByWorkUuidsReq, opts ...grpc_go.CallOption) (*CountCompetitiveReportByWorkUuidsResp, common.ErrorWithAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
type castClient struct {
|
type castClient struct {
|
||||||
@ -133,6 +148,7 @@ type CastClientImpl struct {
|
|||||||
MediaInfo func(ctx context.Context, in *MediaInfoReq) (*MediaInfoResp, error)
|
MediaInfo func(ctx context.Context, in *MediaInfoReq) (*MediaInfoResp, error)
|
||||||
MediaInfoByPlatform func(ctx context.Context, in *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
|
MediaInfoByPlatform func(ctx context.Context, in *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
|
||||||
WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error)
|
WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error)
|
||||||
|
WorkListPublished func(ctx context.Context, in *WorkListPublishedReq) (*WorkListPublishedResp, error)
|
||||||
WorkDetail func(ctx context.Context, in *WorkDetailReq) (*WorkDetailResp, error)
|
WorkDetail func(ctx context.Context, in *WorkDetailReq) (*WorkDetailResp, error)
|
||||||
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
|
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
|
||||||
MediaAccounts func(ctx context.Context, in *MediaAccountsReq) (*MediaAccountsResp, error)
|
MediaAccounts func(ctx context.Context, in *MediaAccountsReq) (*MediaAccountsResp, error)
|
||||||
@ -146,6 +162,8 @@ type CastClientImpl struct {
|
|||||||
UpdateWorkPlatformInfo func(ctx context.Context, in *UpdateWorkPlatformInfoReq) (*UpdateWorkPlatformInfoResp, error)
|
UpdateWorkPlatformInfo func(ctx context.Context, in *UpdateWorkPlatformInfoReq) (*UpdateWorkPlatformInfoResp, error)
|
||||||
UpdateWorkPublishLog func(ctx context.Context, in *UpdateWorkPublishLogReq) (*emptypb.Empty, error)
|
UpdateWorkPublishLog func(ctx context.Context, in *UpdateWorkPublishLogReq) (*emptypb.Empty, error)
|
||||||
RefreshWorkList func(ctx context.Context, in *RefreshWorkListReq) (*RefreshWorkListResp, error)
|
RefreshWorkList func(ctx context.Context, in *RefreshWorkListReq) (*RefreshWorkListResp, error)
|
||||||
|
WorkResource func(ctx context.Context, in *WorkResourceReq) (*WorkResourceResp, error)
|
||||||
|
UpdateWorkResource func(ctx context.Context, in *UpdateWorkResourceReq) (*UpdateWorkResourceResp, error)
|
||||||
OAuthAccount func(ctx context.Context, in *OAuthAccountReq) (*OAuthAccountResp, error)
|
OAuthAccount func(ctx context.Context, in *OAuthAccountReq) (*OAuthAccountResp, error)
|
||||||
OAuthAccountV2 func(ctx context.Context, in *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
OAuthAccountV2 func(ctx context.Context, in *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
||||||
OAuthCodeToToken func(ctx context.Context, in *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
OAuthCodeToToken func(ctx context.Context, in *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
||||||
@ -188,6 +206,7 @@ type CastClientImpl struct {
|
|||||||
ListWorkMetricsDaily func(ctx context.Context, in *ListWorkMetricsDailyReq) (*ListWorkMetricsDailyResp, error)
|
ListWorkMetricsDaily func(ctx context.Context, in *ListWorkMetricsDailyReq) (*ListWorkMetricsDailyResp, error)
|
||||||
CalculateMediaMetricsByWorks func(ctx context.Context, in *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
|
CalculateMediaMetricsByWorks func(ctx context.Context, in *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
|
||||||
GetArtistAyrShareInfo func(ctx context.Context, in *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
|
GetArtistAyrShareInfo func(ctx context.Context, in *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
|
||||||
|
GetArtistAyrShareInfoByPlatformIDs func(ctx context.Context, in *GetArtistAyrShareInfoByPlatformIDsReq) (*GetArtistAyrShareInfoByPlatformIDsResp, error)
|
||||||
ListWorkPlatformInfo func(ctx context.Context, in *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
|
ListWorkPlatformInfo func(ctx context.Context, in *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
|
||||||
UpsertTaskList func(ctx context.Context, in *UpsertTaskListReq) (*UpsertTaskListResp, error)
|
UpsertTaskList func(ctx context.Context, in *UpsertTaskListReq) (*UpsertTaskListResp, error)
|
||||||
GetTaskList func(ctx context.Context, in *GetTaskListReq) (*GetTaskListResp, error)
|
GetTaskList func(ctx context.Context, in *GetTaskListReq) (*GetTaskListResp, error)
|
||||||
@ -196,8 +215,18 @@ type CastClientImpl struct {
|
|||||||
UpdateCastTag func(ctx context.Context, in *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
UpdateCastTag func(ctx context.Context, in *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
||||||
ListCastTags func(ctx context.Context, in *ListCastTagsReq) (*ListCastTagsResp, error)
|
ListCastTags func(ctx context.Context, in *ListCastTagsReq) (*ListCastTagsResp, error)
|
||||||
UpdateCastTagBatch func(ctx context.Context, in *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
UpdateCastTagBatch func(ctx context.Context, in *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
||||||
|
BatchUpdateCastTags func(ctx context.Context, in *BatchUpdateCastTagsReq) (*emptypb.Empty, error)
|
||||||
UpdateCastTagStatus func(ctx context.Context, in *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
UpdateCastTagStatus func(ctx context.Context, in *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
||||||
RecalculateCastTagQuoteCount func(ctx context.Context, in *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
RecalculateCastTagQuoteCount func(ctx context.Context, in *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
||||||
|
CreateCompetitiveReport func(ctx context.Context, in *CreateCompetitiveReportReq) (*CreateCompetitiveReportResp, error)
|
||||||
|
ImportCompetitiveReportBatch func(ctx context.Context, in *ImportCompetitiveReportBatchReq) (*ImportCompetitiveReportBatchResp, error)
|
||||||
|
UpdateCompetitiveReportStatus func(ctx context.Context, in *UpdateCompetitiveReportStatusReq) (*emptypb.Empty, error)
|
||||||
|
GetCompetitiveReport func(ctx context.Context, in *GetCompetitiveReportDetailReq) (*GetCompetitiveReportDetailResp, error)
|
||||||
|
GetCompetitiveReportForApp func(ctx context.Context, in *GetCompetitiveReportForAppReq) (*GetCompetitiveReportForAppResp, error)
|
||||||
|
ListCompetitiveReport func(ctx context.Context, in *ListCompetitiveReportReq) (*ListCompetitiveReportResp, error)
|
||||||
|
DeleteCompetitiveReport func(ctx context.Context, in *DeleteCompetitiveReportReq) (*emptypb.Empty, error)
|
||||||
|
UpdateCompetitiveReportApprovalID func(ctx context.Context, in *UpdateCompetitiveReportApprovalIDReq) (*emptypb.Empty, error)
|
||||||
|
CountCompetitiveReportByWorkUuids func(ctx context.Context, in *CountCompetitiveReportByWorkUuidsReq) (*CountCompetitiveReportByWorkUuidsResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
||||||
@ -266,6 +295,12 @@ func (c *castClient) WorkList(ctx context.Context, in *WorkListReq, opts ...grpc
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkList", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkList", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *castClient) WorkListPublished(ctx context.Context, in *WorkListPublishedReq, opts ...grpc_go.CallOption) (*WorkListPublishedResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(WorkListPublishedResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkListPublished", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *castClient) WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment) {
|
func (c *castClient) WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment) {
|
||||||
out := new(WorkDetailResp)
|
out := new(WorkDetailResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -344,6 +379,18 @@ func (c *castClient) RefreshWorkList(ctx context.Context, in *RefreshWorkListReq
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RefreshWorkList", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RefreshWorkList", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *castClient) WorkResource(ctx context.Context, in *WorkResourceReq, opts ...grpc_go.CallOption) (*WorkResourceResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(WorkResourceResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkResource", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) UpdateWorkResource(ctx context.Context, in *UpdateWorkResourceReq, opts ...grpc_go.CallOption) (*UpdateWorkResourceResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(UpdateWorkResourceResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateWorkResource", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *castClient) OAuthAccount(ctx context.Context, in *OAuthAccountReq, opts ...grpc_go.CallOption) (*OAuthAccountResp, common.ErrorWithAttachment) {
|
func (c *castClient) OAuthAccount(ctx context.Context, in *OAuthAccountReq, opts ...grpc_go.CallOption) (*OAuthAccountResp, common.ErrorWithAttachment) {
|
||||||
out := new(OAuthAccountResp)
|
out := new(OAuthAccountResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -596,6 +643,12 @@ func (c *castClient) GetArtistAyrShareInfo(ctx context.Context, in *GetArtistAyr
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtistAyrShareInfo", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtistAyrShareInfo", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *castClient) GetArtistAyrShareInfoByPlatformIDs(ctx context.Context, in *GetArtistAyrShareInfoByPlatformIDsReq, opts ...grpc_go.CallOption) (*GetArtistAyrShareInfoByPlatformIDsResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetArtistAyrShareInfoByPlatformIDsResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtistAyrShareInfoByPlatformIDs", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *castClient) ListWorkPlatformInfo(ctx context.Context, in *ListWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*ListWorkPlatformInfoResp, common.ErrorWithAttachment) {
|
func (c *castClient) ListWorkPlatformInfo(ctx context.Context, in *ListWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*ListWorkPlatformInfoResp, common.ErrorWithAttachment) {
|
||||||
out := new(ListWorkPlatformInfoResp)
|
out := new(ListWorkPlatformInfoResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -644,6 +697,12 @@ func (c *castClient) UpdateCastTagBatch(ctx context.Context, in *UpdateCastTagBa
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateCastTagBatch", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateCastTagBatch", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *castClient) BatchUpdateCastTags(ctx context.Context, in *BatchUpdateCastTagsReq, 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+"/BatchUpdateCastTags", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *castClient) UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
func (c *castClient) UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||||
out := new(emptypb.Empty)
|
out := new(emptypb.Empty)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -656,6 +715,60 @@ func (c *castClient) RecalculateCastTagQuoteCount(ctx context.Context, in *empty
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RecalculateCastTagQuoteCount", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RecalculateCastTagQuoteCount", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *castClient) CreateCompetitiveReport(ctx context.Context, in *CreateCompetitiveReportReq, opts ...grpc_go.CallOption) (*CreateCompetitiveReportResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(CreateCompetitiveReportResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateCompetitiveReport", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) ImportCompetitiveReportBatch(ctx context.Context, in *ImportCompetitiveReportBatchReq, opts ...grpc_go.CallOption) (*ImportCompetitiveReportBatchResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(ImportCompetitiveReportBatchResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ImportCompetitiveReportBatch", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) UpdateCompetitiveReportStatus(ctx context.Context, in *UpdateCompetitiveReportStatusReq, 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+"/UpdateCompetitiveReportStatus", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) GetCompetitiveReport(ctx context.Context, in *GetCompetitiveReportDetailReq, opts ...grpc_go.CallOption) (*GetCompetitiveReportDetailResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetCompetitiveReportDetailResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetCompetitiveReport", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) GetCompetitiveReportForApp(ctx context.Context, in *GetCompetitiveReportForAppReq, opts ...grpc_go.CallOption) (*GetCompetitiveReportForAppResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetCompetitiveReportForAppResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetCompetitiveReportForApp", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) ListCompetitiveReport(ctx context.Context, in *ListCompetitiveReportReq, opts ...grpc_go.CallOption) (*ListCompetitiveReportResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(ListCompetitiveReportResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ListCompetitiveReport", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) DeleteCompetitiveReport(ctx context.Context, in *DeleteCompetitiveReportReq, 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+"/DeleteCompetitiveReport", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) UpdateCompetitiveReportApprovalID(ctx context.Context, in *UpdateCompetitiveReportApprovalIDReq, 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+"/UpdateCompetitiveReportApprovalID", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) CountCompetitiveReportByWorkUuids(ctx context.Context, in *CountCompetitiveReportByWorkUuidsReq, opts ...grpc_go.CallOption) (*CountCompetitiveReportByWorkUuidsResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(CountCompetitiveReportByWorkUuidsResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CountCompetitiveReportByWorkUuids", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
// CastServer is the server API for Cast service.
|
// CastServer is the server API for Cast service.
|
||||||
// All implementations must embed UnimplementedCastServer
|
// All implementations must embed UnimplementedCastServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@ -669,6 +782,7 @@ type CastServer interface {
|
|||||||
MediaInfo(context.Context, *MediaInfoReq) (*MediaInfoResp, error)
|
MediaInfo(context.Context, *MediaInfoReq) (*MediaInfoResp, error)
|
||||||
MediaInfoByPlatform(context.Context, *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
|
MediaInfoByPlatform(context.Context, *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
|
||||||
WorkList(context.Context, *WorkListReq) (*WorkListResp, error)
|
WorkList(context.Context, *WorkListReq) (*WorkListResp, error)
|
||||||
|
WorkListPublished(context.Context, *WorkListPublishedReq) (*WorkListPublishedResp, error)
|
||||||
WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error)
|
WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error)
|
||||||
UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error)
|
UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error)
|
||||||
MediaAccounts(context.Context, *MediaAccountsReq) (*MediaAccountsResp, error)
|
MediaAccounts(context.Context, *MediaAccountsReq) (*MediaAccountsResp, error)
|
||||||
@ -682,6 +796,8 @@ type CastServer interface {
|
|||||||
UpdateWorkPlatformInfo(context.Context, *UpdateWorkPlatformInfoReq) (*UpdateWorkPlatformInfoResp, error)
|
UpdateWorkPlatformInfo(context.Context, *UpdateWorkPlatformInfoReq) (*UpdateWorkPlatformInfoResp, error)
|
||||||
UpdateWorkPublishLog(context.Context, *UpdateWorkPublishLogReq) (*emptypb.Empty, error)
|
UpdateWorkPublishLog(context.Context, *UpdateWorkPublishLogReq) (*emptypb.Empty, error)
|
||||||
RefreshWorkList(context.Context, *RefreshWorkListReq) (*RefreshWorkListResp, error)
|
RefreshWorkList(context.Context, *RefreshWorkListReq) (*RefreshWorkListResp, error)
|
||||||
|
WorkResource(context.Context, *WorkResourceReq) (*WorkResourceResp, error)
|
||||||
|
UpdateWorkResource(context.Context, *UpdateWorkResourceReq) (*UpdateWorkResourceResp, error)
|
||||||
OAuthAccount(context.Context, *OAuthAccountReq) (*OAuthAccountResp, error)
|
OAuthAccount(context.Context, *OAuthAccountReq) (*OAuthAccountResp, error)
|
||||||
OAuthAccountV2(context.Context, *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
OAuthAccountV2(context.Context, *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
||||||
OAuthCodeToToken(context.Context, *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
OAuthCodeToToken(context.Context, *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
||||||
@ -735,6 +851,7 @@ type CastServer interface {
|
|||||||
CalculateMediaMetricsByWorks(context.Context, *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
|
CalculateMediaMetricsByWorks(context.Context, *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
|
||||||
// 艺人AyrShare信息相关接口
|
// 艺人AyrShare信息相关接口
|
||||||
GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
|
GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
|
||||||
|
GetArtistAyrShareInfoByPlatformIDs(context.Context, *GetArtistAyrShareInfoByPlatformIDsReq) (*GetArtistAyrShareInfoByPlatformIDsResp, error)
|
||||||
// 作品平台信息相关接口
|
// 作品平台信息相关接口
|
||||||
ListWorkPlatformInfo(context.Context, *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
|
ListWorkPlatformInfo(context.Context, *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
|
||||||
// 任务列表相关接口
|
// 任务列表相关接口
|
||||||
@ -746,8 +863,19 @@ type CastServer interface {
|
|||||||
UpdateCastTag(context.Context, *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
UpdateCastTag(context.Context, *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
||||||
ListCastTags(context.Context, *ListCastTagsReq) (*ListCastTagsResp, error)
|
ListCastTags(context.Context, *ListCastTagsReq) (*ListCastTagsResp, error)
|
||||||
UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
||||||
|
BatchUpdateCastTags(context.Context, *BatchUpdateCastTagsReq) (*emptypb.Empty, error)
|
||||||
UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
||||||
RecalculateCastTagQuoteCount(context.Context, *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
RecalculateCastTagQuoteCount(context.Context, *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
||||||
|
// 竞品报告相关接口
|
||||||
|
CreateCompetitiveReport(context.Context, *CreateCompetitiveReportReq) (*CreateCompetitiveReportResp, error)
|
||||||
|
ImportCompetitiveReportBatch(context.Context, *ImportCompetitiveReportBatchReq) (*ImportCompetitiveReportBatchResp, error)
|
||||||
|
UpdateCompetitiveReportStatus(context.Context, *UpdateCompetitiveReportStatusReq) (*emptypb.Empty, error)
|
||||||
|
GetCompetitiveReport(context.Context, *GetCompetitiveReportDetailReq) (*GetCompetitiveReportDetailResp, error)
|
||||||
|
GetCompetitiveReportForApp(context.Context, *GetCompetitiveReportForAppReq) (*GetCompetitiveReportForAppResp, error)
|
||||||
|
ListCompetitiveReport(context.Context, *ListCompetitiveReportReq) (*ListCompetitiveReportResp, error)
|
||||||
|
DeleteCompetitiveReport(context.Context, *DeleteCompetitiveReportReq) (*emptypb.Empty, error)
|
||||||
|
UpdateCompetitiveReportApprovalID(context.Context, *UpdateCompetitiveReportApprovalIDReq) (*emptypb.Empty, error)
|
||||||
|
CountCompetitiveReportByWorkUuids(context.Context, *CountCompetitiveReportByWorkUuidsReq) (*CountCompetitiveReportByWorkUuidsResp, error)
|
||||||
mustEmbedUnimplementedCastServer()
|
mustEmbedUnimplementedCastServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -783,6 +911,9 @@ func (UnimplementedCastServer) MediaInfoByPlatform(context.Context, *MediaInfoBy
|
|||||||
func (UnimplementedCastServer) WorkList(context.Context, *WorkListReq) (*WorkListResp, error) {
|
func (UnimplementedCastServer) WorkList(context.Context, *WorkListReq) (*WorkListResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method WorkList not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method WorkList not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedCastServer) WorkListPublished(context.Context, *WorkListPublishedReq) (*WorkListPublishedResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method WorkListPublished not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedCastServer) WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error) {
|
func (UnimplementedCastServer) WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method WorkDetail not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method WorkDetail not implemented")
|
||||||
}
|
}
|
||||||
@ -822,6 +953,12 @@ func (UnimplementedCastServer) UpdateWorkPublishLog(context.Context, *UpdateWork
|
|||||||
func (UnimplementedCastServer) RefreshWorkList(context.Context, *RefreshWorkListReq) (*RefreshWorkListResp, error) {
|
func (UnimplementedCastServer) RefreshWorkList(context.Context, *RefreshWorkListReq) (*RefreshWorkListResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method RefreshWorkList not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method RefreshWorkList not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedCastServer) WorkResource(context.Context, *WorkResourceReq) (*WorkResourceResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method WorkResource not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) UpdateWorkResource(context.Context, *UpdateWorkResourceReq) (*UpdateWorkResourceResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkResource not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedCastServer) OAuthAccount(context.Context, *OAuthAccountReq) (*OAuthAccountResp, error) {
|
func (UnimplementedCastServer) OAuthAccount(context.Context, *OAuthAccountReq) (*OAuthAccountResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method OAuthAccount not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthAccount not implemented")
|
||||||
}
|
}
|
||||||
@ -948,6 +1085,9 @@ func (UnimplementedCastServer) CalculateMediaMetricsByWorks(context.Context, *Ca
|
|||||||
func (UnimplementedCastServer) GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error) {
|
func (UnimplementedCastServer) GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetArtistAyrShareInfo not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetArtistAyrShareInfo not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedCastServer) GetArtistAyrShareInfoByPlatformIDs(context.Context, *GetArtistAyrShareInfoByPlatformIDsReq) (*GetArtistAyrShareInfoByPlatformIDsResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetArtistAyrShareInfoByPlatformIDs not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedCastServer) ListWorkPlatformInfo(context.Context, *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error) {
|
func (UnimplementedCastServer) ListWorkPlatformInfo(context.Context, *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ListWorkPlatformInfo not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method ListWorkPlatformInfo not implemented")
|
||||||
}
|
}
|
||||||
@ -972,12 +1112,42 @@ func (UnimplementedCastServer) ListCastTags(context.Context, *ListCastTagsReq) (
|
|||||||
func (UnimplementedCastServer) UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error) {
|
func (UnimplementedCastServer) UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagBatch not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagBatch not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedCastServer) BatchUpdateCastTags(context.Context, *BatchUpdateCastTagsReq) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateCastTags not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedCastServer) UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error) {
|
func (UnimplementedCastServer) UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagStatus not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagStatus not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedCastServer) RecalculateCastTagQuoteCount(context.Context, *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error) {
|
func (UnimplementedCastServer) RecalculateCastTagQuoteCount(context.Context, *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method RecalculateCastTagQuoteCount not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method RecalculateCastTagQuoteCount not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedCastServer) CreateCompetitiveReport(context.Context, *CreateCompetitiveReportReq) (*CreateCompetitiveReportResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CreateCompetitiveReport not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) ImportCompetitiveReportBatch(context.Context, *ImportCompetitiveReportBatchReq) (*ImportCompetitiveReportBatchResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ImportCompetitiveReportBatch not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) UpdateCompetitiveReportStatus(context.Context, *UpdateCompetitiveReportStatusReq) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateCompetitiveReportStatus not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) GetCompetitiveReport(context.Context, *GetCompetitiveReportDetailReq) (*GetCompetitiveReportDetailResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetCompetitiveReport not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) GetCompetitiveReportForApp(context.Context, *GetCompetitiveReportForAppReq) (*GetCompetitiveReportForAppResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetCompetitiveReportForApp not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) ListCompetitiveReport(context.Context, *ListCompetitiveReportReq) (*ListCompetitiveReportResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ListCompetitiveReport not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) DeleteCompetitiveReport(context.Context, *DeleteCompetitiveReportReq) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteCompetitiveReport not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) UpdateCompetitiveReportApprovalID(context.Context, *UpdateCompetitiveReportApprovalIDReq) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateCompetitiveReportApprovalID not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) CountCompetitiveReportByWorkUuids(context.Context, *CountCompetitiveReportByWorkUuidsReq) (*CountCompetitiveReportByWorkUuidsResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CountCompetitiveReportByWorkUuids not implemented")
|
||||||
|
}
|
||||||
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||||
s.proxyImpl = impl
|
s.proxyImpl = impl
|
||||||
}
|
}
|
||||||
@ -1267,6 +1437,35 @@ func _Cast_WorkList_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Cast_WorkListPublished_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(WorkListPublishedReq)
|
||||||
|
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("WorkListPublished", 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_WorkDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Cast_WorkDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(WorkDetailReq)
|
in := new(WorkDetailReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -1644,6 +1843,64 @@ func _Cast_RefreshWorkList_Handler(srv interface{}, ctx context.Context, dec fun
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Cast_WorkResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(WorkResourceReq)
|
||||||
|
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("WorkResource", 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_UpdateWorkResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateWorkResourceReq)
|
||||||
|
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("UpdateWorkResource", 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_OAuthAccount_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(OAuthAccountReq)
|
in := new(OAuthAccountReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -2862,6 +3119,35 @@ func _Cast_GetArtistAyrShareInfo_Handler(srv interface{}, ctx context.Context, d
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Cast_GetArtistAyrShareInfoByPlatformIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetArtistAyrShareInfoByPlatformIDsReq)
|
||||||
|
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("GetArtistAyrShareInfoByPlatformIDs", 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_ListWorkPlatformInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Cast_ListWorkPlatformInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(ListWorkPlatformInfoReq)
|
in := new(ListWorkPlatformInfoReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -3094,6 +3380,35 @@ func _Cast_UpdateCastTagBatch_Handler(srv interface{}, ctx context.Context, dec
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Cast_BatchUpdateCastTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(BatchUpdateCastTagsReq)
|
||||||
|
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("BatchUpdateCastTags", 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_UpdateCastTagStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Cast_UpdateCastTagStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(UpdateCastTagStatusReq)
|
in := new(UpdateCastTagStatusReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -3152,6 +3467,267 @@ func _Cast_RecalculateCastTagQuoteCount_Handler(srv interface{}, ctx context.Con
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Cast_CreateCompetitiveReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CreateCompetitiveReportReq)
|
||||||
|
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("CreateCompetitiveReport", 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_ImportCompetitiveReportBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ImportCompetitiveReportBatchReq)
|
||||||
|
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("ImportCompetitiveReportBatch", 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_UpdateCompetitiveReportStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateCompetitiveReportStatusReq)
|
||||||
|
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("UpdateCompetitiveReportStatus", 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_GetCompetitiveReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetCompetitiveReportDetailReq)
|
||||||
|
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("GetCompetitiveReport", 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_GetCompetitiveReportForApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetCompetitiveReportForAppReq)
|
||||||
|
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("GetCompetitiveReportForApp", 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_ListCompetitiveReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ListCompetitiveReportReq)
|
||||||
|
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("ListCompetitiveReport", 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_DeleteCompetitiveReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DeleteCompetitiveReportReq)
|
||||||
|
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("DeleteCompetitiveReport", 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_UpdateCompetitiveReportApprovalID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateCompetitiveReportApprovalIDReq)
|
||||||
|
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("UpdateCompetitiveReportApprovalID", 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_CountCompetitiveReportByWorkUuids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CountCompetitiveReportByWorkUuidsReq)
|
||||||
|
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("CountCompetitiveReportByWorkUuids", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Cast_ServiceDesc is the grpc_go.ServiceDesc for Cast service.
|
// Cast_ServiceDesc is the grpc_go.ServiceDesc for Cast service.
|
||||||
// It's only intended for direct use with grpc_go.RegisterService,
|
// It's only intended for direct use with grpc_go.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -3195,6 +3771,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "WorkList",
|
MethodName: "WorkList",
|
||||||
Handler: _Cast_WorkList_Handler,
|
Handler: _Cast_WorkList_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "WorkListPublished",
|
||||||
|
Handler: _Cast_WorkListPublished_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "WorkDetail",
|
MethodName: "WorkDetail",
|
||||||
Handler: _Cast_WorkDetail_Handler,
|
Handler: _Cast_WorkDetail_Handler,
|
||||||
@ -3247,6 +3827,14 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "RefreshWorkList",
|
MethodName: "RefreshWorkList",
|
||||||
Handler: _Cast_RefreshWorkList_Handler,
|
Handler: _Cast_RefreshWorkList_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "WorkResource",
|
||||||
|
Handler: _Cast_WorkResource_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateWorkResource",
|
||||||
|
Handler: _Cast_UpdateWorkResource_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "OAuthAccount",
|
MethodName: "OAuthAccount",
|
||||||
Handler: _Cast_OAuthAccount_Handler,
|
Handler: _Cast_OAuthAccount_Handler,
|
||||||
@ -3415,6 +4003,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "GetArtistAyrShareInfo",
|
MethodName: "GetArtistAyrShareInfo",
|
||||||
Handler: _Cast_GetArtistAyrShareInfo_Handler,
|
Handler: _Cast_GetArtistAyrShareInfo_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetArtistAyrShareInfoByPlatformIDs",
|
||||||
|
Handler: _Cast_GetArtistAyrShareInfoByPlatformIDs_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "ListWorkPlatformInfo",
|
MethodName: "ListWorkPlatformInfo",
|
||||||
Handler: _Cast_ListWorkPlatformInfo_Handler,
|
Handler: _Cast_ListWorkPlatformInfo_Handler,
|
||||||
@ -3447,6 +4039,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "UpdateCastTagBatch",
|
MethodName: "UpdateCastTagBatch",
|
||||||
Handler: _Cast_UpdateCastTagBatch_Handler,
|
Handler: _Cast_UpdateCastTagBatch_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "BatchUpdateCastTags",
|
||||||
|
Handler: _Cast_BatchUpdateCastTags_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "UpdateCastTagStatus",
|
MethodName: "UpdateCastTagStatus",
|
||||||
Handler: _Cast_UpdateCastTagStatus_Handler,
|
Handler: _Cast_UpdateCastTagStatus_Handler,
|
||||||
@ -3455,6 +4051,42 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "RecalculateCastTagQuoteCount",
|
MethodName: "RecalculateCastTagQuoteCount",
|
||||||
Handler: _Cast_RecalculateCastTagQuoteCount_Handler,
|
Handler: _Cast_RecalculateCastTagQuoteCount_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CreateCompetitiveReport",
|
||||||
|
Handler: _Cast_CreateCompetitiveReport_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ImportCompetitiveReportBatch",
|
||||||
|
Handler: _Cast_ImportCompetitiveReportBatch_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateCompetitiveReportStatus",
|
||||||
|
Handler: _Cast_UpdateCompetitiveReportStatus_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetCompetitiveReport",
|
||||||
|
Handler: _Cast_GetCompetitiveReport_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetCompetitiveReportForApp",
|
||||||
|
Handler: _Cast_GetCompetitiveReportForApp_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ListCompetitiveReport",
|
||||||
|
Handler: _Cast_ListCompetitiveReport_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "DeleteCompetitiveReport",
|
||||||
|
Handler: _Cast_DeleteCompetitiveReport_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateCompetitiveReportApprovalID",
|
||||||
|
Handler: _Cast_UpdateCompetitiveReportApprovalID_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CountCompetitiveReportByWorkUuids",
|
||||||
|
Handler: _Cast_CountCompetitiveReportByWorkUuids_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "pb/fiee/cast.proto",
|
Metadata: "pb/fiee/cast.proto",
|
||||||
|
|||||||
@ -640,6 +640,16 @@ type ExecutionResult struct {
|
|||||||
StatusDescription string `protobuf:"bytes,110,opt,name=status_description,json=statusDescription,proto3" json:"status_description"` // 执行状态描述
|
StatusDescription string `protobuf:"bytes,110,opt,name=status_description,json=statusDescription,proto3" json:"status_description"` // 执行状态描述
|
||||||
ResultDescription string `protobuf:"bytes,111,opt,name=result_description,json=resultDescription,proto3" json:"result_description"` // 执行结果描述
|
ResultDescription string `protobuf:"bytes,111,opt,name=result_description,json=resultDescription,proto3" json:"result_description"` // 执行结果描述
|
||||||
ContentTypeDescription string `protobuf:"bytes,115,opt,name=content_type_description,json=contentTypeDescription,proto3" json:"content_type_description"` // 内容类型描述
|
ContentTypeDescription string `protobuf:"bytes,115,opt,name=content_type_description,json=contentTypeDescription,proto3" json:"content_type_description"` // 内容类型描述
|
||||||
|
TIKTOKStatusDesc string `protobuf:"bytes,121,opt,name=TIKTOKStatusDesc,proto3" json:"TIKTOKStatusDesc"`
|
||||||
|
YOUTUBEStatusDesc string `protobuf:"bytes,122,opt,name=YOUTUBEStatusDesc,proto3" json:"YOUTUBEStatusDesc"`
|
||||||
|
INSStatusDesc string `protobuf:"bytes,123,opt,name=INSStatusDesc,proto3" json:"INSStatusDesc"`
|
||||||
|
DMStatusDesc string `protobuf:"bytes,124,opt,name=DMStatusDesc,proto3" json:"DMStatusDesc"`
|
||||||
|
BULESKYStatusDesc string `protobuf:"bytes,125,opt,name=BULESKYStatusDesc,proto3" json:"BULESKYStatusDesc"`
|
||||||
|
TIKTOKResult string `protobuf:"bytes,131,opt,name=TIKTOKResult,proto3" json:"TIKTOKResult"`
|
||||||
|
YOUTUBEResult string `protobuf:"bytes,132,opt,name=YOUTUBEResult,proto3" json:"YOUTUBEResult"`
|
||||||
|
INSResult string `protobuf:"bytes,133,opt,name=INSResult,proto3" json:"INSResult"`
|
||||||
|
DMResult string `protobuf:"bytes,134,opt,name=DMResult,proto3" json:"DMResult"`
|
||||||
|
BULESKYResult string `protobuf:"bytes,135,opt,name=BULESKYResult,proto3" json:"BULESKYResult"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@ -793,6 +803,76 @@ func (x *ExecutionResult) GetContentTypeDescription() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetTIKTOKStatusDesc() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.TIKTOKStatusDesc
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetYOUTUBEStatusDesc() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.YOUTUBEStatusDesc
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetINSStatusDesc() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.INSStatusDesc
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetDMStatusDesc() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.DMStatusDesc
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetBULESKYStatusDesc() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.BULESKYStatusDesc
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetTIKTOKResult() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.TIKTOKResult
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetYOUTUBEResult() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.YOUTUBEResult
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetINSResult() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.INSResult
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetDMResult() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.DMResult
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ExecutionResult) GetBULESKYResult() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.BULESKYResult
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
type CreateScheduleTaskRequest struct {
|
type CreateScheduleTaskRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
TaskTitle string `protobuf:"bytes,1,opt,name=task_title,json=taskTitle,proto3" json:"task_title"` // 任务标题
|
TaskTitle string `protobuf:"bytes,1,opt,name=task_title,json=taskTitle,proto3" json:"task_title"` // 任务标题
|
||||||
@ -2059,7 +2139,7 @@ const file_pb_cron_proto_rawDesc = "" +
|
|||||||
"\n" +
|
"\n" +
|
||||||
"task_title\x18\x0e \x01(\tR\ttaskTitle\x12!\n" +
|
"task_title\x18\x0e \x01(\tR\ttaskTitle\x12!\n" +
|
||||||
"\fcontent_type\x18\x0f \x01(\x05R\vcontentType\x12\x0e\n" +
|
"\fcontent_type\x18\x0f \x01(\x05R\vcontentType\x12\x0e\n" +
|
||||||
"\x02id\x18\x10 \x01(\x04R\x02id\"\xc8\x04\n" +
|
"\x02id\x18\x10 \x01(\x04R\x02id\"\xc9\a\n" +
|
||||||
"\x0fExecutionResult\x12!\n" +
|
"\x0fExecutionResult\x12!\n" +
|
||||||
"\fexecution_id\x18\x01 \x01(\x05R\vexecutionId\x12\x17\n" +
|
"\fexecution_id\x18\x01 \x01(\x05R\vexecutionId\x12\x17\n" +
|
||||||
"\atask_id\x18\x02 \x01(\x05R\x06taskId\x12\x1b\n" +
|
"\atask_id\x18\x02 \x01(\x05R\x06taskId\x12\x1b\n" +
|
||||||
@ -2083,7 +2163,17 @@ const file_pb_cron_proto_rawDesc = "" +
|
|||||||
"work_title\x18\x10 \x01(\tR\tworkTitle\x12-\n" +
|
"work_title\x18\x10 \x01(\tR\tworkTitle\x12-\n" +
|
||||||
"\x12status_description\x18n \x01(\tR\x11statusDescription\x12-\n" +
|
"\x12status_description\x18n \x01(\tR\x11statusDescription\x12-\n" +
|
||||||
"\x12result_description\x18o \x01(\tR\x11resultDescription\x128\n" +
|
"\x12result_description\x18o \x01(\tR\x11resultDescription\x128\n" +
|
||||||
"\x18content_type_description\x18s \x01(\tR\x16contentTypeDescription\"\x83\x03\n" +
|
"\x18content_type_description\x18s \x01(\tR\x16contentTypeDescription\x12*\n" +
|
||||||
|
"\x10TIKTOKStatusDesc\x18y \x01(\tR\x10TIKTOKStatusDesc\x12,\n" +
|
||||||
|
"\x11YOUTUBEStatusDesc\x18z \x01(\tR\x11YOUTUBEStatusDesc\x12$\n" +
|
||||||
|
"\rINSStatusDesc\x18{ \x01(\tR\rINSStatusDesc\x12\"\n" +
|
||||||
|
"\fDMStatusDesc\x18| \x01(\tR\fDMStatusDesc\x12,\n" +
|
||||||
|
"\x11BULESKYStatusDesc\x18} \x01(\tR\x11BULESKYStatusDesc\x12#\n" +
|
||||||
|
"\fTIKTOKResult\x18\x83\x01 \x01(\tR\fTIKTOKResult\x12%\n" +
|
||||||
|
"\rYOUTUBEResult\x18\x84\x01 \x01(\tR\rYOUTUBEResult\x12\x1d\n" +
|
||||||
|
"\tINSResult\x18\x85\x01 \x01(\tR\tINSResult\x12\x1b\n" +
|
||||||
|
"\bDMResult\x18\x86\x01 \x01(\tR\bDMResult\x12%\n" +
|
||||||
|
"\rBULESKYResult\x18\x87\x01 \x01(\tR\rBULESKYResult\"\x83\x03\n" +
|
||||||
"\x19CreateScheduleTaskRequest\x12\x1d\n" +
|
"\x19CreateScheduleTaskRequest\x12\x1d\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"task_title\x18\x01 \x01(\tR\ttaskTitle\x12 \n" +
|
"task_title\x18\x01 \x01(\tR\ttaskTitle\x12 \n" +
|
||||||
|
|||||||
644
api/emailAlerts/emailAlerts.pb.go
Normal file
644
api/emailAlerts/emailAlerts.pb.go
Normal file
@ -0,0 +1,644 @@
|
|||||||
|
// 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
|
||||||
|
}
|
||||||
47
api/emailAlerts/emailAlerts.validator.pb.go
Normal file
47
api/emailAlerts/emailAlerts.validator.pb.go
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
// 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
|
||||||
|
}
|
||||||
194
api/emailAlerts/emailAlerts_triple.pb.go
Normal file
194
api/emailAlerts/emailAlerts_triple.pb.go
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
// 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
@ -9,20 +9,53 @@ service Governance{
|
|||||||
rpc List(ListReq) returns (ListResp) {}
|
rpc List(ListReq) returns (ListResp) {}
|
||||||
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
||||||
rpc Edit(EditReq) returns (EditResp) {}
|
rpc Edit(EditReq) returns (EditResp) {}
|
||||||
|
rpc UpdataStatus(UpdataStatusReq) returns (UpdataStatusResp) {}
|
||||||
|
rpc GetGovernanceInfo(GetGovernanceInfoReq) returns (GetGovernanceInfoResp) {}
|
||||||
rpc Create(CreateReq) returns (CreateResp) {}
|
rpc Create(CreateReq) returns (CreateResp) {}
|
||||||
rpc Display(DisplayReq) returns (DisplayResp) {}
|
rpc Display(DisplayReq) returns (DisplayResp) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message LangSetting {
|
||||||
|
string langType = 1;//语言类型
|
||||||
|
int32 isSetting = 2;//是否设置
|
||||||
|
}
|
||||||
|
|
||||||
|
message GovernanceLangData{
|
||||||
|
string title = 1;//标题
|
||||||
|
string attachment = 2;//附件
|
||||||
|
string attachmentName = 3;//附件名称
|
||||||
|
int32 isSetting = 4;//是否设置
|
||||||
|
}
|
||||||
|
|
||||||
|
message GovernanceLang{
|
||||||
|
string langType = 1;//语言类型
|
||||||
|
GovernanceLangData data = 2;//语言数据
|
||||||
|
}
|
||||||
|
|
||||||
|
message GovernanceInfo{
|
||||||
|
string uuid = 1;
|
||||||
|
repeated GovernanceLang dataByLang = 2;//语言数据
|
||||||
|
int32 sort = 3;//排序
|
||||||
|
int32 status = 4;//状态
|
||||||
|
}
|
||||||
|
|
||||||
message Item{
|
message Item{
|
||||||
int32 id = 1;
|
string uuid = 1;
|
||||||
string title = 2;
|
string title = 2;
|
||||||
string attachment = 3;
|
string attachment = 3;
|
||||||
string attachmentName = 4;
|
string attachmentName = 4;
|
||||||
int32 sort = 5;
|
repeated LangSetting langSetting = 5;//语言设置
|
||||||
int32 status = 6;
|
int32 sort = 6;
|
||||||
int64 updatedAt = 7;
|
int32 status = 7;
|
||||||
string operator = 8;
|
int64 updatedAt = 8;
|
||||||
int32 operatorId = 9;
|
string operator = 9;
|
||||||
|
int32 operatorId = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DisplayItem{
|
||||||
|
string title = 1;
|
||||||
|
string attachment = 2;
|
||||||
|
string attachmentName = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ListReq{
|
message ListReq{
|
||||||
@ -38,34 +71,48 @@ message ListResp{
|
|||||||
}
|
}
|
||||||
|
|
||||||
message DeleteReq{
|
message DeleteReq{
|
||||||
int32 id = 1;
|
string uuid = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeleteResp{
|
message DeleteResp{
|
||||||
}
|
}
|
||||||
|
|
||||||
message EditReq{
|
message EditReq{
|
||||||
uint32 id = 1;
|
string uuid = 1;
|
||||||
string title = 2;
|
repeated GovernanceLang dataByLang = 2;
|
||||||
string attachment = 3;
|
int32 sort = 3;
|
||||||
string attachmentName = 4;
|
string operator = 4;
|
||||||
int32 sort = 5;
|
int32 operatorId = 5;
|
||||||
int32 status = 6;
|
|
||||||
string operator = 7;
|
|
||||||
int32 operatorId = 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message EditResp{
|
message EditResp{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message UpdataStatusReq{
|
||||||
|
string uuid = 1;
|
||||||
|
int32 status = 2;
|
||||||
|
string operator = 3;
|
||||||
|
int32 operatorId = 4;
|
||||||
|
}
|
||||||
|
message UpdataStatusResp{
|
||||||
|
string msg = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGovernanceInfoReq{
|
||||||
|
string uuid = 1;
|
||||||
|
}
|
||||||
|
message GetGovernanceInfoResp{
|
||||||
|
string msg = 1;
|
||||||
|
GovernanceInfo data = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message CreateReq{
|
message CreateReq{
|
||||||
string title = 1;
|
string uuid = 1;
|
||||||
uint32 sort = 2;
|
repeated GovernanceLang dataByLang = 2;
|
||||||
string attachment = 3;
|
uint32 sort = 3;
|
||||||
string attachmentName = 4;
|
int32 status = 4;
|
||||||
int32 status = 5;
|
string operator = 5;
|
||||||
string operator = 6;
|
int32 operatorId = 6;
|
||||||
int32 operatorId = 7;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateResp{
|
message CreateResp{
|
||||||
@ -73,9 +120,9 @@ message CreateResp{
|
|||||||
}
|
}
|
||||||
|
|
||||||
message DisplayReq{
|
message DisplayReq{
|
||||||
|
string langType = 1;//语言类型
|
||||||
}
|
}
|
||||||
|
|
||||||
message DisplayResp{
|
message DisplayResp{
|
||||||
repeated Item data = 1;
|
repeated DisplayItem data = 1;
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: governance.proto
|
// source: api/governance/governance.proto
|
||||||
|
|
||||||
package governance
|
package governance
|
||||||
|
|
||||||
@ -15,7 +15,41 @@ var _ = proto.Marshal
|
|||||||
var _ = fmt.Errorf
|
var _ = fmt.Errorf
|
||||||
var _ = math.Inf
|
var _ = math.Inf
|
||||||
|
|
||||||
|
func (this *LangSetting) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GovernanceLangData) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GovernanceLang) Validate() error {
|
||||||
|
if this.Data != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GovernanceInfo) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *Item) Validate() error {
|
func (this *Item) Validate() error {
|
||||||
|
for _, item := range this.LangSetting {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *DisplayItem) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *ListReq) Validate() error {
|
func (this *ListReq) Validate() error {
|
||||||
@ -38,12 +72,43 @@ func (this *DeleteResp) Validate() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *EditReq) Validate() error {
|
func (this *EditReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *EditResp) Validate() error {
|
func (this *EditResp) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *UpdataStatusReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *UpdataStatusResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetGovernanceInfoReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetGovernanceInfoResp) Validate() error {
|
||||||
|
if this.Data != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *CreateReq) Validate() error {
|
func (this *CreateReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *CreateResp) Validate() error {
|
func (this *CreateResp) Validate() error {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
// 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.5
|
||||||
// - protoc v3.20.3
|
// - protoc v5.26.0
|
||||||
// source: governance.proto
|
// source: api/governance/governance.proto
|
||||||
|
|
||||||
package governance
|
package governance
|
||||||
|
|
||||||
@ -31,6 +31,8 @@ type GovernanceClient interface {
|
|||||||
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
||||||
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
|
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
|
||||||
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
||||||
|
UpdataStatus(ctx context.Context, in *UpdataStatusReq, opts ...grpc_go.CallOption) (*UpdataStatusResp, common.ErrorWithAttachment)
|
||||||
|
GetGovernanceInfo(ctx context.Context, in *GetGovernanceInfoReq, opts ...grpc_go.CallOption) (*GetGovernanceInfoResp, common.ErrorWithAttachment)
|
||||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||||
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
||||||
}
|
}
|
||||||
@ -43,6 +45,8 @@ type GovernanceClientImpl struct {
|
|||||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||||
|
UpdataStatus func(ctx context.Context, in *UpdataStatusReq) (*UpdataStatusResp, error)
|
||||||
|
GetGovernanceInfo func(ctx context.Context, in *GetGovernanceInfoReq) (*GetGovernanceInfoResp, error)
|
||||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||||
}
|
}
|
||||||
@ -77,6 +81,18 @@ func (c *governanceClient) Edit(ctx context.Context, in *EditReq, opts ...grpc_g
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *governanceClient) UpdataStatus(ctx context.Context, in *UpdataStatusReq, opts ...grpc_go.CallOption) (*UpdataStatusResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(UpdataStatusResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdataStatus", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *governanceClient) GetGovernanceInfo(ctx context.Context, in *GetGovernanceInfoReq, opts ...grpc_go.CallOption) (*GetGovernanceInfoResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetGovernanceInfoResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetGovernanceInfo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *governanceClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
|
func (c *governanceClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
|
||||||
out := new(CreateResp)
|
out := new(CreateResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -96,6 +112,8 @@ type GovernanceServer interface {
|
|||||||
List(context.Context, *ListReq) (*ListResp, error)
|
List(context.Context, *ListReq) (*ListResp, error)
|
||||||
Delete(context.Context, *DeleteReq) (*DeleteResp, error)
|
Delete(context.Context, *DeleteReq) (*DeleteResp, error)
|
||||||
Edit(context.Context, *EditReq) (*EditResp, error)
|
Edit(context.Context, *EditReq) (*EditResp, error)
|
||||||
|
UpdataStatus(context.Context, *UpdataStatusReq) (*UpdataStatusResp, error)
|
||||||
|
GetGovernanceInfo(context.Context, *GetGovernanceInfoReq) (*GetGovernanceInfoResp, error)
|
||||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||||
mustEmbedUnimplementedGovernanceServer()
|
mustEmbedUnimplementedGovernanceServer()
|
||||||
@ -115,6 +133,12 @@ func (UnimplementedGovernanceServer) Delete(context.Context, *DeleteReq) (*Delet
|
|||||||
func (UnimplementedGovernanceServer) Edit(context.Context, *EditReq) (*EditResp, error) {
|
func (UnimplementedGovernanceServer) Edit(context.Context, *EditReq) (*EditResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedGovernanceServer) UpdataStatus(context.Context, *UpdataStatusReq) (*UpdataStatusResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdataStatus not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedGovernanceServer) GetGovernanceInfo(context.Context, *GetGovernanceInfoReq) (*GetGovernanceInfoResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetGovernanceInfo not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedGovernanceServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
|
func (UnimplementedGovernanceServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||||
}
|
}
|
||||||
@ -236,6 +260,64 @@ func _Governance_Edit_Handler(srv interface{}, ctx context.Context, dec func(int
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Governance_UpdataStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdataStatusReq)
|
||||||
|
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("UpdataStatus", 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 _Governance_GetGovernanceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetGovernanceInfoReq)
|
||||||
|
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("GetGovernanceInfo", 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 _Governance_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Governance_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(CreateReq)
|
in := new(CreateReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -313,6 +395,14 @@ var Governance_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "Edit",
|
MethodName: "Edit",
|
||||||
Handler: _Governance_Edit_Handler,
|
Handler: _Governance_Edit_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdataStatus",
|
||||||
|
Handler: _Governance_UpdataStatus_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetGovernanceInfo",
|
||||||
|
Handler: _Governance_GetGovernanceInfo_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "Create",
|
MethodName: "Create",
|
||||||
Handler: _Governance_Create_Handler,
|
Handler: _Governance_Create_Handler,
|
||||||
@ -323,5 +413,5 @@ var Governance_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "governance.proto",
|
Metadata: "api/governance/governance.proto",
|
||||||
}
|
}
|
||||||
|
|||||||
5111
api/members/members.pb.go
Normal file
5111
api/members/members.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
341
api/members/members.validator.pb.go
Normal file
341
api/members/members.validator.pb.go
Normal file
@ -0,0 +1,341 @@
|
|||||||
|
// 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 *Filtrate) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *LangSetting) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ManagementLangData) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ManagementLang) Validate() error {
|
||||||
|
if this.Data != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *Management) Validate() error {
|
||||||
|
for _, item := range this.LangSetting {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddManagementReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddManagementResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusManagementReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusManagementResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *EditManagementReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *EditManagementResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *DeleteManagementReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *DeleteManagementResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetManagementListReq) 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 *GetManagementListResp) 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 *GetManagementInfoReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetManagementInfoResp) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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 *BoardOfDirectorsLang) Validate() error {
|
||||||
|
if this.Data != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BoardOfDirectorsLangData) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BoardOfDirectors) Validate() error {
|
||||||
|
for _, item := range this.LangSetting {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddBoardOfDirectorsReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddBoardOfDirectorsResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusBoardOfDirectorsReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusBoardOfDirectorsResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *EditBoardOfDirectorsReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *EditBoardOfDirectorsResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *DeleteBoardOfDirectorsReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *DeleteBoardOfDirectorsResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetBoardOfDirectorsListReq) 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 *GetBoardOfDirectorsListResp) 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 *GetBoardOfDirectorsInfoReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetBoardOfDirectorsInfoResp) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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 {
|
||||||
|
for _, item := range this.LangSetting {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CommitteeAppointmentsLang) Validate() error {
|
||||||
|
if this.Data != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CommitteeAppointmentsLangData) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddCommitteeAppointmentsReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddCommitteeAppointmentsResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusCommitteeAppointmentsReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusCommitteeAppointmentsResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *EditCommitteeAppointmentsReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *EditCommitteeAppointmentsResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *DeleteCommitteeAppointmentsReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *DeleteCommitteeAppointmentsResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetCommitteeAppointmentsListReq) 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 *GetCommitteeAppointmentsListResp) 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 *GetCommitteeAppointmentsInfoReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetCommitteeAppointmentsInfoResp) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
|
}
|
||||||
1095
api/members/members_triple.pb.go
Normal file
1095
api/members/members_triple.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,119 +0,0 @@
|
|||||||
syntax = "proto3";
|
|
||||||
package pressreleases;
|
|
||||||
//import "descriptor.proto";
|
|
||||||
//import "validator.proto";
|
|
||||||
|
|
||||||
option go_package = "./;pressreleases";
|
|
||||||
|
|
||||||
service PressReleases{
|
|
||||||
rpc List(ListReq) returns (ListResp) {}
|
|
||||||
rpc Display(DisplayReq) returns (DisplayResp) {}
|
|
||||||
rpc Edit(EditReq) returns (EditResp) {}
|
|
||||||
rpc Create(CreateReq) returns (CreateResp) {}
|
|
||||||
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
|
||||||
rpc Get(GetReq) returns (GetResp) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
message Item{
|
|
||||||
uint32 id = 1;
|
|
||||||
string title = 2;
|
|
||||||
uint64 createdAt = 3;
|
|
||||||
uint32 sort = 4;
|
|
||||||
string content = 5;
|
|
||||||
string attachment = 6;
|
|
||||||
string attachmentName = 7;
|
|
||||||
uint64 updatedAt = 8;
|
|
||||||
uint32 status = 9;
|
|
||||||
uint32 display = 10;
|
|
||||||
string summary = 11;
|
|
||||||
string operator = 12;
|
|
||||||
int32 operatorId = 13;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ListReq{
|
|
||||||
string title = 1;
|
|
||||||
uint64 startTime = 2;
|
|
||||||
uint64 endTime = 3;
|
|
||||||
uint32 status = 4;
|
|
||||||
uint32 display = 5;
|
|
||||||
int32 page = 6;
|
|
||||||
int32 pageSize = 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ListResp{
|
|
||||||
uint64 total = 1;
|
|
||||||
repeated Item data = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message DisplayReq{
|
|
||||||
string query = 1;
|
|
||||||
uint32 page = 2;
|
|
||||||
uint32 pageSize = 3;
|
|
||||||
int64 timeStart = 4;
|
|
||||||
int64 timeEnd = 5;
|
|
||||||
int32 display = 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
message DisplayResp{
|
|
||||||
int64 total = 1;
|
|
||||||
repeated Item data = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message EditReq{
|
|
||||||
uint32 id = 1;
|
|
||||||
string title = 2;
|
|
||||||
uint64 createdAt = 3;
|
|
||||||
uint32 sort = 4;
|
|
||||||
string content = 5;
|
|
||||||
string attachment = 6;
|
|
||||||
string attachmentName = 7;
|
|
||||||
uint32 status = 8;
|
|
||||||
uint32 display = 9;
|
|
||||||
string summary = 10;
|
|
||||||
string operator = 11;
|
|
||||||
int32 operatorId = 12;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
message EditResp{
|
|
||||||
}
|
|
||||||
|
|
||||||
message CreateReq{
|
|
||||||
string title = 1;
|
|
||||||
uint64 createdAt = 2;
|
|
||||||
uint32 sort = 3;
|
|
||||||
string content = 4;
|
|
||||||
string attachment = 5;
|
|
||||||
string attachmentName = 6;
|
|
||||||
uint32 status = 7;
|
|
||||||
uint32 display = 8;
|
|
||||||
string summary = 9;
|
|
||||||
string operator = 10;
|
|
||||||
int32 operatorId = 11;
|
|
||||||
}
|
|
||||||
|
|
||||||
message CreateResp{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
message DeleteReq{
|
|
||||||
uint32 id = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message DeleteResp{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
message GetReq{
|
|
||||||
int64 id = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message GetResp{
|
|
||||||
uint32 id = 1;
|
|
||||||
string title = 2;
|
|
||||||
uint64 createdAt = 3;
|
|
||||||
string content = 4;
|
|
||||||
string attachment = 5;
|
|
||||||
string attachmentName = 6;
|
|
||||||
string summary = 7;
|
|
||||||
}
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
// source: press_releases.proto
|
// source: api/pressreleases/press_releases.proto
|
||||||
|
|
||||||
package pressreleases
|
package pressreleases
|
||||||
|
|
||||||
@ -15,7 +15,23 @@ var _ = proto.Marshal
|
|||||||
var _ = fmt.Errorf
|
var _ = fmt.Errorf
|
||||||
var _ = math.Inf
|
var _ = math.Inf
|
||||||
|
|
||||||
func (this *Item) Validate() error {
|
func (this *LangSetting) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *PressReleasesLang) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *PressReleasesData) Validate() error {
|
||||||
|
for _, item := range this.LangSetting {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *DisplayItem) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *ListReq) Validate() error {
|
func (this *ListReq) Validate() error {
|
||||||
@ -31,6 +47,25 @@ func (this *ListResp) Validate() error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *SortAndStatusReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *InfoReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *InfoResp) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *DisplayReq) Validate() error {
|
func (this *DisplayReq) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -45,12 +80,26 @@ func (this *DisplayResp) Validate() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *EditReq) Validate() error {
|
func (this *EditReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *EditResp) Validate() error {
|
func (this *EditResp) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *CreateReq) Validate() error {
|
func (this *CreateReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *CreateResp) Validate() error {
|
func (this *CreateResp) Validate() error {
|
||||||
@ -66,5 +115,10 @@ func (this *GetReq) Validate() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *GetResp) Validate() error {
|
func (this *GetResp) Validate() error {
|
||||||
|
if this.Data != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
// 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.5
|
||||||
// - protoc v3.20.3
|
// - protoc v5.26.0
|
||||||
// source: press_releases.proto
|
// source: api/pressreleases/press_releases.proto
|
||||||
|
|
||||||
package pressreleases
|
package pressreleases
|
||||||
|
|
||||||
@ -29,6 +29,8 @@ const _ = grpc_go.SupportPackageIsVersion7
|
|||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// 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 PressReleasesClient interface {
|
type PressReleasesClient interface {
|
||||||
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
||||||
|
SortAndStatus(ctx context.Context, in *SortAndStatusReq, opts ...grpc_go.CallOption) (*SortAndStatusResp, common.ErrorWithAttachment)
|
||||||
|
Info(ctx context.Context, in *InfoReq, opts ...grpc_go.CallOption) (*InfoResp, common.ErrorWithAttachment)
|
||||||
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
||||||
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
||||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||||
@ -42,6 +44,8 @@ type pressReleasesClient struct {
|
|||||||
|
|
||||||
type PressReleasesClientImpl struct {
|
type PressReleasesClientImpl struct {
|
||||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||||
|
SortAndStatus func(ctx context.Context, in *SortAndStatusReq) (*SortAndStatusResp, error)
|
||||||
|
Info func(ctx context.Context, in *InfoReq) (*InfoResp, error)
|
||||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||||
@ -67,6 +71,18 @@ func (c *pressReleasesClient) List(ctx context.Context, in *ListReq, opts ...grp
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *pressReleasesClient) SortAndStatus(ctx context.Context, in *SortAndStatusReq, opts ...grpc_go.CallOption) (*SortAndStatusResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(SortAndStatusResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SortAndStatus", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *pressReleasesClient) Info(ctx context.Context, in *InfoReq, opts ...grpc_go.CallOption) (*InfoResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(InfoResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Info", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *pressReleasesClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) {
|
func (c *pressReleasesClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) {
|
||||||
out := new(DisplayResp)
|
out := new(DisplayResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -102,6 +118,8 @@ func (c *pressReleasesClient) Get(ctx context.Context, in *GetReq, opts ...grpc_
|
|||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
type PressReleasesServer interface {
|
type PressReleasesServer interface {
|
||||||
List(context.Context, *ListReq) (*ListResp, error)
|
List(context.Context, *ListReq) (*ListResp, error)
|
||||||
|
SortAndStatus(context.Context, *SortAndStatusReq) (*SortAndStatusResp, error)
|
||||||
|
Info(context.Context, *InfoReq) (*InfoResp, error)
|
||||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||||
Edit(context.Context, *EditReq) (*EditResp, error)
|
Edit(context.Context, *EditReq) (*EditResp, error)
|
||||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||||
@ -118,6 +136,12 @@ type UnimplementedPressReleasesServer struct {
|
|||||||
func (UnimplementedPressReleasesServer) List(context.Context, *ListReq) (*ListResp, error) {
|
func (UnimplementedPressReleasesServer) List(context.Context, *ListReq) (*ListResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedPressReleasesServer) SortAndStatus(context.Context, *SortAndStatusReq) (*SortAndStatusResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method SortAndStatus not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedPressReleasesServer) Info(context.Context, *InfoReq) (*InfoResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedPressReleasesServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) {
|
func (UnimplementedPressReleasesServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Display not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Display not implemented")
|
||||||
}
|
}
|
||||||
@ -190,6 +214,64 @@ func _PressReleases_List_Handler(srv interface{}, ctx context.Context, dec func(
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _PressReleases_SortAndStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SortAndStatusReq)
|
||||||
|
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("SortAndStatus", 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 _PressReleases_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(InfoReq)
|
||||||
|
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("Info", 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 _PressReleases_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _PressReleases_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(DisplayReq)
|
in := new(DisplayReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -346,6 +428,14 @@ var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "List",
|
MethodName: "List",
|
||||||
Handler: _PressReleases_List_Handler,
|
Handler: _PressReleases_List_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SortAndStatus",
|
||||||
|
Handler: _PressReleases_SortAndStatus_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Info",
|
||||||
|
Handler: _PressReleases_Info_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "Display",
|
MethodName: "Display",
|
||||||
Handler: _PressReleases_Display_Handler,
|
Handler: _PressReleases_Display_Handler,
|
||||||
@ -368,5 +458,5 @@ var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "press_releases.proto",
|
Metadata: "api/pressreleases/press_releases.proto",
|
||||||
}
|
}
|
||||||
|
|||||||
3439
api/reports/reports.pb.go
Normal file
3439
api/reports/reports.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
227
api/reports/reports.validator.pb.go
Normal file
227
api/reports/reports.validator.pb.go
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
// 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 *LangSetting) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AnnualReport) Validate() error {
|
||||||
|
for _, item := range this.LangSetting {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AnnualReportLang) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *QuarterlyReport) Validate() error {
|
||||||
|
for _, item := range this.LangSetting {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *QuarterlyReportLang) 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 *GetAnnualReportInfoReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetAnnualReportInfoResp) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddAnnualReportReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddAnnualReportResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusAnnualReportReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusAnnualReportResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *EditAnnualReportReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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 *GetQuarterlyReportInfoReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetQuarterlyReportInfoResp) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddQuarterlyReportReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddQuarterlyReportResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusQuarterlyReportReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *SortAndStatusQuarterlyReportResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *EditQuarterlyReportReq) Validate() error {
|
||||||
|
for _, item := range this.DataByLang {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
|
}
|
||||||
736
api/reports/reports_triple.pb.go
Normal file
736
api/reports/reports_triple.pb.go
Normal file
@ -0,0 +1,736 @@
|
|||||||
|
// 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)
|
||||||
|
GetAnnualReportInfo(ctx context.Context, in *GetAnnualReportInfoReq, opts ...grpc_go.CallOption) (*GetAnnualReportInfoResp, common.ErrorWithAttachment)
|
||||||
|
AddAnnualReport(ctx context.Context, in *AddAnnualReportReq, opts ...grpc_go.CallOption) (*AddAnnualReportResp, common.ErrorWithAttachment)
|
||||||
|
SortAndStatusAnnualReport(ctx context.Context, in *SortAndStatusAnnualReportReq, opts ...grpc_go.CallOption) (*SortAndStatusAnnualReportResp, 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)
|
||||||
|
GetQuarterlyReportInfo(ctx context.Context, in *GetQuarterlyReportInfoReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportInfoResp, common.ErrorWithAttachment)
|
||||||
|
AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment)
|
||||||
|
SortAndStatusQuarterlyReport(ctx context.Context, in *SortAndStatusQuarterlyReportReq, opts ...grpc_go.CallOption) (*SortAndStatusQuarterlyReportResp, 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)
|
||||||
|
GetAnnualReportInfo func(ctx context.Context, in *GetAnnualReportInfoReq) (*GetAnnualReportInfoResp, error)
|
||||||
|
AddAnnualReport func(ctx context.Context, in *AddAnnualReportReq) (*AddAnnualReportResp, error)
|
||||||
|
SortAndStatusAnnualReport func(ctx context.Context, in *SortAndStatusAnnualReportReq) (*SortAndStatusAnnualReportResp, 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)
|
||||||
|
GetQuarterlyReportInfo func(ctx context.Context, in *GetQuarterlyReportInfoReq) (*GetQuarterlyReportInfoResp, error)
|
||||||
|
AddQuarterlyReport func(ctx context.Context, in *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
|
||||||
|
SortAndStatusQuarterlyReport func(ctx context.Context, in *SortAndStatusQuarterlyReportReq) (*SortAndStatusQuarterlyReportResp, 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) GetAnnualReportInfo(ctx context.Context, in *GetAnnualReportInfoReq, opts ...grpc_go.CallOption) (*GetAnnualReportInfoResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetAnnualReportInfoResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetAnnualReportInfo", 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) SortAndStatusAnnualReport(ctx context.Context, in *SortAndStatusAnnualReportReq, opts ...grpc_go.CallOption) (*SortAndStatusAnnualReportResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(SortAndStatusAnnualReportResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SortAndStatusAnnualReport", 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) GetQuarterlyReportInfo(ctx context.Context, in *GetQuarterlyReportInfoReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportInfoResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetQuarterlyReportInfoResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetQuarterlyReportInfo", 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) SortAndStatusQuarterlyReport(ctx context.Context, in *SortAndStatusQuarterlyReportReq, opts ...grpc_go.CallOption) (*SortAndStatusQuarterlyReportResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(SortAndStatusQuarterlyReportResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SortAndStatusQuarterlyReport", 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)
|
||||||
|
GetAnnualReportInfo(context.Context, *GetAnnualReportInfoReq) (*GetAnnualReportInfoResp, error)
|
||||||
|
AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error)
|
||||||
|
SortAndStatusAnnualReport(context.Context, *SortAndStatusAnnualReportReq) (*SortAndStatusAnnualReportResp, 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)
|
||||||
|
GetQuarterlyReportInfo(context.Context, *GetQuarterlyReportInfoReq) (*GetQuarterlyReportInfoResp, error)
|
||||||
|
AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
|
||||||
|
SortAndStatusQuarterlyReport(context.Context, *SortAndStatusQuarterlyReportReq) (*SortAndStatusQuarterlyReportResp, 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) GetAnnualReportInfo(context.Context, *GetAnnualReportInfoReq) (*GetAnnualReportInfoResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetAnnualReportInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedReportsServer) AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method AddAnnualReport not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedReportsServer) SortAndStatusAnnualReport(context.Context, *SortAndStatusAnnualReportReq) (*SortAndStatusAnnualReportResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method SortAndStatusAnnualReport 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) GetQuarterlyReportInfo(context.Context, *GetQuarterlyReportInfoReq) (*GetQuarterlyReportInfoResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetQuarterlyReportInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedReportsServer) AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method AddQuarterlyReport not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedReportsServer) SortAndStatusQuarterlyReport(context.Context, *SortAndStatusQuarterlyReportReq) (*SortAndStatusQuarterlyReportResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method SortAndStatusQuarterlyReport 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_GetAnnualReportInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetAnnualReportInfoReq)
|
||||||
|
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("GetAnnualReportInfo", 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_SortAndStatusAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SortAndStatusAnnualReportReq)
|
||||||
|
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("SortAndStatusAnnualReport", 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_GetQuarterlyReportInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetQuarterlyReportInfoReq)
|
||||||
|
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("GetQuarterlyReportInfo", 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_SortAndStatusQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SortAndStatusQuarterlyReportReq)
|
||||||
|
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("SortAndStatusQuarterlyReport", 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: "GetAnnualReportInfo",
|
||||||
|
Handler: _Reports_GetAnnualReportInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "AddAnnualReport",
|
||||||
|
Handler: _Reports_AddAnnualReport_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SortAndStatusAnnualReport",
|
||||||
|
Handler: _Reports_SortAndStatusAnnualReport_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: "GetQuarterlyReportInfo",
|
||||||
|
Handler: _Reports_GetQuarterlyReportInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "AddQuarterlyReport",
|
||||||
|
Handler: _Reports_AddQuarterlyReport_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SortAndStatusQuarterlyReport",
|
||||||
|
Handler: _Reports_SortAndStatusQuarterlyReport_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",
|
||||||
|
}
|
||||||
2245
api/supplier/supplier.pb.go
Normal file
2245
api/supplier/supplier.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
212
api/supplier/supplier.proto
Normal file
212
api/supplier/supplier.proto
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
package supplier;
|
||||||
|
|
||||||
|
option go_package = "./;supplier";
|
||||||
|
|
||||||
|
// FiEE供应商微服务
|
||||||
|
service Supplier {
|
||||||
|
//供应商curd
|
||||||
|
rpc GetSupplier(GetSupplierRequest) returns (UpdateSupplierRequest) {}
|
||||||
|
rpc CreateSupplier(CreateSupplierRequest) returns (CreateSupplierResponse) {}
|
||||||
|
rpc UpdateSupplier(UpdateSupplierRequest) returns (CreateSupplierResponse) {}
|
||||||
|
rpc GetSupplierList(GetSupplierListRequest) returns (GetSupplierListResponse) {}
|
||||||
|
//组织字典
|
||||||
|
rpc CreateOrganizeDictionary(CreateOrganizeDictionaryRequest) returns (CreateOrganizeDictionaryResponse) {}
|
||||||
|
rpc GetOrganizeDictionaryList(GetOrganizeDictionaryListRequest) returns (GetOrganizeDictionaryListResponse) {}
|
||||||
|
rpc GetOrganizeDictionaryInfo(CreateOrganizeDictionaryRequest) returns (OrganizeDictionary) {}
|
||||||
|
//国家组织
|
||||||
|
rpc GetCountryRegionList(GetCountryRegionListRequest) returns (GetCountryRegionListResponse) {}
|
||||||
|
rpc GetCountryRegionInfo(GetCountryRegionInfoRequest) returns (CountryRegion) {}
|
||||||
|
//导入
|
||||||
|
rpc CreateImportRecord(CreateImportRecordRequest) returns (CreateImportRecordResponse) {}
|
||||||
|
rpc GetImportRecordInfo(GetImportRecordRequest) returns (GetImportRecordResponse) {}
|
||||||
|
}
|
||||||
|
message GetImportRecordRequest{
|
||||||
|
string uuid = 1;
|
||||||
|
}
|
||||||
|
message GetImportRecordResponse{
|
||||||
|
uint64 successNum = 1;
|
||||||
|
uint64 failNum = 2;
|
||||||
|
string deriveUrl = 3;
|
||||||
|
}
|
||||||
|
message CreateImportRecordRequest{
|
||||||
|
repeated string supplierCodes = 1;
|
||||||
|
uint64 status = 2;
|
||||||
|
uint64 userId = 3;
|
||||||
|
string toLeadUrl = 4;
|
||||||
|
string deriveUrl = 5;
|
||||||
|
string uuid = 6;
|
||||||
|
uint64 successNum = 7;
|
||||||
|
uint64 failNum = 8;
|
||||||
|
}
|
||||||
|
message CreateImportRecordResponse{
|
||||||
|
uint64 id = 1;
|
||||||
|
}
|
||||||
|
message GetCountryRegionListResponse{
|
||||||
|
repeated CountryRegion data = 1;
|
||||||
|
uint64 page = 2;
|
||||||
|
uint64 pageSize = 3;
|
||||||
|
uint64 total = 4;
|
||||||
|
}
|
||||||
|
message CountryRegion{
|
||||||
|
uint64 id = 1;
|
||||||
|
string nameEN = 2;
|
||||||
|
string nameCN = 3;
|
||||||
|
string code = 4;
|
||||||
|
}
|
||||||
|
message GetCountryRegionInfoRequest{
|
||||||
|
string zhAndCode = 1;
|
||||||
|
}
|
||||||
|
message GetCountryRegionListRequest{
|
||||||
|
uint64 page = 1;
|
||||||
|
uint64 pageSize = 2;
|
||||||
|
string nameEN = 3;
|
||||||
|
string nameCN = 4;
|
||||||
|
string code = 5;
|
||||||
|
}
|
||||||
|
message OrganizeDictionary{
|
||||||
|
uint64 id = 1;
|
||||||
|
string name = 2;
|
||||||
|
}
|
||||||
|
message GetOrganizeDictionaryListResponse{
|
||||||
|
repeated OrganizeDictionary data = 1;
|
||||||
|
uint64 page = 2;
|
||||||
|
uint64 pageSize = 3;
|
||||||
|
uint64 total = 4;
|
||||||
|
}
|
||||||
|
message CreateOrganizeDictionaryRequest{
|
||||||
|
string name = 1;
|
||||||
|
}
|
||||||
|
message CreateOrganizeDictionaryResponse{
|
||||||
|
uint64 id = 1;
|
||||||
|
}
|
||||||
|
message GetOrganizeDictionaryListRequest{
|
||||||
|
uint64 page = 1;
|
||||||
|
uint64 pageSize = 2;
|
||||||
|
string name = 3;
|
||||||
|
}
|
||||||
|
message GetSupplierListRequest{
|
||||||
|
uint64 page = 1;
|
||||||
|
uint64 pageSize = 2;
|
||||||
|
uint64 owningEntityId = 3;
|
||||||
|
string supplierUniqueCode = 4;
|
||||||
|
string legalName =5;
|
||||||
|
string localName = 6;
|
||||||
|
string abbreviationName =7;
|
||||||
|
uint64 countryOrRegionId = 8;
|
||||||
|
string companyRegistrationNumber =9;
|
||||||
|
string supplierType =10;
|
||||||
|
string approvalStatus = 11;
|
||||||
|
string approvalDateStart = 12;
|
||||||
|
string approvalDateEnd = 13;
|
||||||
|
string lastReviewDateStart = 14;
|
||||||
|
string lastReviewDateEnd = 15;
|
||||||
|
string legalEntityType = 16;
|
||||||
|
string sanctionsCountryScreeningResult = 17;
|
||||||
|
string keyFinancial = 18;
|
||||||
|
string companyAddress = 19;
|
||||||
|
string primaryContact = 20;
|
||||||
|
string dataOwnerDepartment = 21;
|
||||||
|
string basicCompanyInformation = 22;
|
||||||
|
uint64 status = 23;
|
||||||
|
string updateStart = 24;
|
||||||
|
string updateEnd = 25;
|
||||||
|
string connectedParty = 26;
|
||||||
|
}
|
||||||
|
message GetSupplierListResponse{
|
||||||
|
uint64 total = 1;
|
||||||
|
repeated SupplierInfo data = 2;
|
||||||
|
uint64 page = 3;
|
||||||
|
uint64 pageSize = 4;
|
||||||
|
}
|
||||||
|
message SupplierInfo{
|
||||||
|
uint64 id = 1;
|
||||||
|
uint64 owningEntityId = 2;
|
||||||
|
string legalName = 3;
|
||||||
|
string localName = 4;
|
||||||
|
string abbreviationName = 5;
|
||||||
|
uint64 countryOrRegionId = 6;
|
||||||
|
string companyRegistrationNumber = 7;
|
||||||
|
string supplierType = 8;
|
||||||
|
string approvalStatus = 9;
|
||||||
|
string approvalDate = 10;
|
||||||
|
string lastReviewDate = 11;
|
||||||
|
string legalEntityType = 12;
|
||||||
|
string sanctionsCountryScreeningResult = 13;
|
||||||
|
string keyFinancial = 14;
|
||||||
|
string companyAddress = 15;
|
||||||
|
string primaryContact = 16;
|
||||||
|
string dataOwnerDepartment = 17;
|
||||||
|
string basicCompanyInformation = 18;
|
||||||
|
string linkAddress = 19;
|
||||||
|
string supplementaryText = 20;
|
||||||
|
repeated attachment attachments = 21;
|
||||||
|
uint64 status = 22;
|
||||||
|
string createdAt = 23;
|
||||||
|
string updatedAt = 24;
|
||||||
|
string supplierUniqueCode = 25;
|
||||||
|
string owningEntityName = 26;
|
||||||
|
string countryOrRegionCode = 27;
|
||||||
|
string connectedParty = 28;
|
||||||
|
}
|
||||||
|
message UpdateSupplierRequest{
|
||||||
|
uint64 id = 1;
|
||||||
|
uint64 owningEntityId = 2;
|
||||||
|
string legalName = 3;
|
||||||
|
string localName = 4;
|
||||||
|
string abbreviationName = 5;
|
||||||
|
uint64 countryOrRegionId = 6;
|
||||||
|
string companyRegistrationNumber = 7;
|
||||||
|
string supplierType = 8;
|
||||||
|
string approvalStatus = 9;
|
||||||
|
string approvalDate = 10;
|
||||||
|
string lastReviewDate = 11;
|
||||||
|
string legalEntityType = 12;
|
||||||
|
string sanctionsCountryScreeningResult = 13;
|
||||||
|
string keyFinancial = 14;
|
||||||
|
string companyAddress = 15;
|
||||||
|
string primaryContact = 16;
|
||||||
|
string dataOwnerDepartment = 17;
|
||||||
|
string basicCompanyInformation = 18;
|
||||||
|
string linkAddress = 19;
|
||||||
|
string supplementaryText = 20;
|
||||||
|
repeated attachment attachments = 21;
|
||||||
|
uint64 status = 22;
|
||||||
|
string connectedParty = 23;
|
||||||
|
}
|
||||||
|
message CreateSupplierRequest{
|
||||||
|
uint64 owningEntityId = 1;
|
||||||
|
string legalName = 2;
|
||||||
|
string localName = 3;
|
||||||
|
string abbreviationName = 4;
|
||||||
|
uint64 countryOrRegionId = 5;
|
||||||
|
string companyRegistrationNumber = 6;
|
||||||
|
string supplierType = 7;
|
||||||
|
string approvalStatus = 8;
|
||||||
|
string approvalDate = 9;
|
||||||
|
string lastReviewDate = 10;
|
||||||
|
string legalEntityType = 11;
|
||||||
|
string sanctionsCountryScreeningResult = 12;
|
||||||
|
string keyFinancial = 13;
|
||||||
|
string companyAddress = 14;
|
||||||
|
string primaryContact = 15;
|
||||||
|
string dataOwnerDepartment = 16;
|
||||||
|
string basicCompanyInformation = 17;
|
||||||
|
string linkAddress = 18;
|
||||||
|
string supplementaryText = 19;
|
||||||
|
repeated attachment attachments = 20;
|
||||||
|
uint64 status = 21;
|
||||||
|
string connectedParty = 22;
|
||||||
|
}
|
||||||
|
message attachment{
|
||||||
|
string url = 1;
|
||||||
|
string type = 2;
|
||||||
|
string name = 3;
|
||||||
|
}
|
||||||
|
message CreateSupplierResponse{
|
||||||
|
uint64 id = 1;
|
||||||
|
string supplierCode = 2;
|
||||||
|
}
|
||||||
|
message GetSupplierRequest{
|
||||||
|
uint64 id = 1;
|
||||||
|
}
|
||||||
122
api/supplier/supplier.validator.pb.go
Normal file
122
api/supplier/supplier.validator.pb.go
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
|
// source: api/supplier/supplier.proto
|
||||||
|
|
||||||
|
package supplier
|
||||||
|
|
||||||
|
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 *GetImportRecordRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetImportRecordResponse) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CreateImportRecordRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CreateImportRecordResponse) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetCountryRegionListResponse) 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 *CountryRegion) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetCountryRegionInfoRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetCountryRegionListRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrganizeDictionary) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetOrganizeDictionaryListResponse) 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 *CreateOrganizeDictionaryRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CreateOrganizeDictionaryResponse) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetOrganizeDictionaryListRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetSupplierListRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetSupplierListResponse) 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 *SupplierInfo) Validate() error {
|
||||||
|
for _, item := range this.Attachments {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Attachments", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *UpdateSupplierRequest) Validate() error {
|
||||||
|
for _, item := range this.Attachments {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Attachments", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CreateSupplierRequest) Validate() error {
|
||||||
|
for _, item := range this.Attachments {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Attachments", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *Attachment) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *CreateSupplierResponse) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetSupplierRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
605
api/supplier/supplier_triple.pb.go
Normal file
605
api/supplier/supplier_triple.pb.go
Normal file
@ -0,0 +1,605 @@
|
|||||||
|
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-triple v1.0.5
|
||||||
|
// - protoc v6.32.0
|
||||||
|
// source: api/supplier/supplier.proto
|
||||||
|
|
||||||
|
package supplier
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
// SupplierClient is the client API for Supplier 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 SupplierClient interface {
|
||||||
|
// 供应商curd
|
||||||
|
GetSupplier(ctx context.Context, in *GetSupplierRequest, opts ...grpc_go.CallOption) (*UpdateSupplierRequest, common.ErrorWithAttachment)
|
||||||
|
CreateSupplier(ctx context.Context, in *CreateSupplierRequest, opts ...grpc_go.CallOption) (*CreateSupplierResponse, common.ErrorWithAttachment)
|
||||||
|
UpdateSupplier(ctx context.Context, in *UpdateSupplierRequest, opts ...grpc_go.CallOption) (*CreateSupplierResponse, common.ErrorWithAttachment)
|
||||||
|
GetSupplierList(ctx context.Context, in *GetSupplierListRequest, opts ...grpc_go.CallOption) (*GetSupplierListResponse, common.ErrorWithAttachment)
|
||||||
|
// 组织字典
|
||||||
|
CreateOrganizeDictionary(ctx context.Context, in *CreateOrganizeDictionaryRequest, opts ...grpc_go.CallOption) (*CreateOrganizeDictionaryResponse, common.ErrorWithAttachment)
|
||||||
|
GetOrganizeDictionaryList(ctx context.Context, in *GetOrganizeDictionaryListRequest, opts ...grpc_go.CallOption) (*GetOrganizeDictionaryListResponse, common.ErrorWithAttachment)
|
||||||
|
GetOrganizeDictionaryInfo(ctx context.Context, in *CreateOrganizeDictionaryRequest, opts ...grpc_go.CallOption) (*OrganizeDictionary, common.ErrorWithAttachment)
|
||||||
|
// 国家组织
|
||||||
|
GetCountryRegionList(ctx context.Context, in *GetCountryRegionListRequest, opts ...grpc_go.CallOption) (*GetCountryRegionListResponse, common.ErrorWithAttachment)
|
||||||
|
GetCountryRegionInfo(ctx context.Context, in *GetCountryRegionInfoRequest, opts ...grpc_go.CallOption) (*CountryRegion, common.ErrorWithAttachment)
|
||||||
|
// 导入
|
||||||
|
CreateImportRecord(ctx context.Context, in *CreateImportRecordRequest, opts ...grpc_go.CallOption) (*CreateImportRecordResponse, common.ErrorWithAttachment)
|
||||||
|
GetImportRecordInfo(ctx context.Context, in *GetImportRecordRequest, opts ...grpc_go.CallOption) (*GetImportRecordResponse, common.ErrorWithAttachment)
|
||||||
|
}
|
||||||
|
|
||||||
|
type supplierClient struct {
|
||||||
|
cc *triple.TripleConn
|
||||||
|
}
|
||||||
|
|
||||||
|
type SupplierClientImpl struct {
|
||||||
|
GetSupplier func(ctx context.Context, in *GetSupplierRequest) (*UpdateSupplierRequest, error)
|
||||||
|
CreateSupplier func(ctx context.Context, in *CreateSupplierRequest) (*CreateSupplierResponse, error)
|
||||||
|
UpdateSupplier func(ctx context.Context, in *UpdateSupplierRequest) (*CreateSupplierResponse, error)
|
||||||
|
GetSupplierList func(ctx context.Context, in *GetSupplierListRequest) (*GetSupplierListResponse, error)
|
||||||
|
CreateOrganizeDictionary func(ctx context.Context, in *CreateOrganizeDictionaryRequest) (*CreateOrganizeDictionaryResponse, error)
|
||||||
|
GetOrganizeDictionaryList func(ctx context.Context, in *GetOrganizeDictionaryListRequest) (*GetOrganizeDictionaryListResponse, error)
|
||||||
|
GetOrganizeDictionaryInfo func(ctx context.Context, in *CreateOrganizeDictionaryRequest) (*OrganizeDictionary, error)
|
||||||
|
GetCountryRegionList func(ctx context.Context, in *GetCountryRegionListRequest) (*GetCountryRegionListResponse, error)
|
||||||
|
GetCountryRegionInfo func(ctx context.Context, in *GetCountryRegionInfoRequest) (*CountryRegion, error)
|
||||||
|
CreateImportRecord func(ctx context.Context, in *CreateImportRecordRequest) (*CreateImportRecordResponse, error)
|
||||||
|
GetImportRecordInfo func(ctx context.Context, in *GetImportRecordRequest) (*GetImportRecordResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *SupplierClientImpl) GetDubboStub(cc *triple.TripleConn) SupplierClient {
|
||||||
|
return NewSupplierClient(cc)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *SupplierClientImpl) XXX_InterfaceName() string {
|
||||||
|
return "supplier.Supplier"
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewSupplierClient(cc *triple.TripleConn) SupplierClient {
|
||||||
|
return &supplierClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) GetSupplier(ctx context.Context, in *GetSupplierRequest, opts ...grpc_go.CallOption) (*UpdateSupplierRequest, common.ErrorWithAttachment) {
|
||||||
|
out := new(UpdateSupplierRequest)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetSupplier", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) CreateSupplier(ctx context.Context, in *CreateSupplierRequest, opts ...grpc_go.CallOption) (*CreateSupplierResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CreateSupplierResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateSupplier", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) UpdateSupplier(ctx context.Context, in *UpdateSupplierRequest, opts ...grpc_go.CallOption) (*CreateSupplierResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CreateSupplierResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateSupplier", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) GetSupplierList(ctx context.Context, in *GetSupplierListRequest, opts ...grpc_go.CallOption) (*GetSupplierListResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetSupplierListResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetSupplierList", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) CreateOrganizeDictionary(ctx context.Context, in *CreateOrganizeDictionaryRequest, opts ...grpc_go.CallOption) (*CreateOrganizeDictionaryResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CreateOrganizeDictionaryResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateOrganizeDictionary", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) GetOrganizeDictionaryList(ctx context.Context, in *GetOrganizeDictionaryListRequest, opts ...grpc_go.CallOption) (*GetOrganizeDictionaryListResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetOrganizeDictionaryListResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetOrganizeDictionaryList", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) GetOrganizeDictionaryInfo(ctx context.Context, in *CreateOrganizeDictionaryRequest, opts ...grpc_go.CallOption) (*OrganizeDictionary, common.ErrorWithAttachment) {
|
||||||
|
out := new(OrganizeDictionary)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetOrganizeDictionaryInfo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) GetCountryRegionList(ctx context.Context, in *GetCountryRegionListRequest, opts ...grpc_go.CallOption) (*GetCountryRegionListResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetCountryRegionListResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetCountryRegionList", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) GetCountryRegionInfo(ctx context.Context, in *GetCountryRegionInfoRequest, opts ...grpc_go.CallOption) (*CountryRegion, common.ErrorWithAttachment) {
|
||||||
|
out := new(CountryRegion)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetCountryRegionInfo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) CreateImportRecord(ctx context.Context, in *CreateImportRecordRequest, opts ...grpc_go.CallOption) (*CreateImportRecordResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CreateImportRecordResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateImportRecord", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *supplierClient) GetImportRecordInfo(ctx context.Context, in *GetImportRecordRequest, opts ...grpc_go.CallOption) (*GetImportRecordResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetImportRecordResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetImportRecordInfo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SupplierServer is the server API for Supplier service.
|
||||||
|
// All implementations must embed UnimplementedSupplierServer
|
||||||
|
// for forward compatibility
|
||||||
|
type SupplierServer interface {
|
||||||
|
// 供应商curd
|
||||||
|
GetSupplier(context.Context, *GetSupplierRequest) (*UpdateSupplierRequest, error)
|
||||||
|
CreateSupplier(context.Context, *CreateSupplierRequest) (*CreateSupplierResponse, error)
|
||||||
|
UpdateSupplier(context.Context, *UpdateSupplierRequest) (*CreateSupplierResponse, error)
|
||||||
|
GetSupplierList(context.Context, *GetSupplierListRequest) (*GetSupplierListResponse, error)
|
||||||
|
// 组织字典
|
||||||
|
CreateOrganizeDictionary(context.Context, *CreateOrganizeDictionaryRequest) (*CreateOrganizeDictionaryResponse, error)
|
||||||
|
GetOrganizeDictionaryList(context.Context, *GetOrganizeDictionaryListRequest) (*GetOrganizeDictionaryListResponse, error)
|
||||||
|
GetOrganizeDictionaryInfo(context.Context, *CreateOrganizeDictionaryRequest) (*OrganizeDictionary, error)
|
||||||
|
// 国家组织
|
||||||
|
GetCountryRegionList(context.Context, *GetCountryRegionListRequest) (*GetCountryRegionListResponse, error)
|
||||||
|
GetCountryRegionInfo(context.Context, *GetCountryRegionInfoRequest) (*CountryRegion, error)
|
||||||
|
// 导入
|
||||||
|
CreateImportRecord(context.Context, *CreateImportRecordRequest) (*CreateImportRecordResponse, error)
|
||||||
|
GetImportRecordInfo(context.Context, *GetImportRecordRequest) (*GetImportRecordResponse, error)
|
||||||
|
mustEmbedUnimplementedSupplierServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedSupplierServer must be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedSupplierServer struct {
|
||||||
|
proxyImpl protocol.Invoker
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedSupplierServer) GetSupplier(context.Context, *GetSupplierRequest) (*UpdateSupplierRequest, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetSupplier not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) CreateSupplier(context.Context, *CreateSupplierRequest) (*CreateSupplierResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CreateSupplier not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) UpdateSupplier(context.Context, *UpdateSupplierRequest) (*CreateSupplierResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateSupplier not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) GetSupplierList(context.Context, *GetSupplierListRequest) (*GetSupplierListResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetSupplierList not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) CreateOrganizeDictionary(context.Context, *CreateOrganizeDictionaryRequest) (*CreateOrganizeDictionaryResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CreateOrganizeDictionary not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) GetOrganizeDictionaryList(context.Context, *GetOrganizeDictionaryListRequest) (*GetOrganizeDictionaryListResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetOrganizeDictionaryList not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) GetOrganizeDictionaryInfo(context.Context, *CreateOrganizeDictionaryRequest) (*OrganizeDictionary, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetOrganizeDictionaryInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) GetCountryRegionList(context.Context, *GetCountryRegionListRequest) (*GetCountryRegionListResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetCountryRegionList not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) GetCountryRegionInfo(context.Context, *GetCountryRegionInfoRequest) (*CountryRegion, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetCountryRegionInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) CreateImportRecord(context.Context, *CreateImportRecordRequest) (*CreateImportRecordResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CreateImportRecord not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedSupplierServer) GetImportRecordInfo(context.Context, *GetImportRecordRequest) (*GetImportRecordResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetImportRecordInfo not implemented")
|
||||||
|
}
|
||||||
|
func (s *UnimplementedSupplierServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||||
|
s.proxyImpl = impl
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *UnimplementedSupplierServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||||
|
return s.proxyImpl
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *UnimplementedSupplierServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||||
|
return &Supplier_ServiceDesc
|
||||||
|
}
|
||||||
|
func (s *UnimplementedSupplierServer) XXX_InterfaceName() string {
|
||||||
|
return "supplier.Supplier"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedSupplierServer) mustEmbedUnimplementedSupplierServer() {}
|
||||||
|
|
||||||
|
// UnsafeSupplierServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to SupplierServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeSupplierServer interface {
|
||||||
|
mustEmbedUnimplementedSupplierServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterSupplierServer(s grpc_go.ServiceRegistrar, srv SupplierServer) {
|
||||||
|
s.RegisterService(&Supplier_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Supplier_GetSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetSupplierRequest)
|
||||||
|
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("GetSupplier", 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 _Supplier_CreateSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CreateSupplierRequest)
|
||||||
|
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("CreateSupplier", 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 _Supplier_UpdateSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateSupplierRequest)
|
||||||
|
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("UpdateSupplier", 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 _Supplier_GetSupplierList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetSupplierListRequest)
|
||||||
|
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("GetSupplierList", 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 _Supplier_CreateOrganizeDictionary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CreateOrganizeDictionaryRequest)
|
||||||
|
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("CreateOrganizeDictionary", 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 _Supplier_GetOrganizeDictionaryList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetOrganizeDictionaryListRequest)
|
||||||
|
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("GetOrganizeDictionaryList", 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 _Supplier_GetOrganizeDictionaryInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CreateOrganizeDictionaryRequest)
|
||||||
|
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("GetOrganizeDictionaryInfo", 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 _Supplier_GetCountryRegionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetCountryRegionListRequest)
|
||||||
|
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("GetCountryRegionList", 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 _Supplier_GetCountryRegionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetCountryRegionInfoRequest)
|
||||||
|
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("GetCountryRegionInfo", 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 _Supplier_CreateImportRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CreateImportRecordRequest)
|
||||||
|
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("CreateImportRecord", 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 _Supplier_GetImportRecordInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetImportRecordRequest)
|
||||||
|
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("GetImportRecordInfo", 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Supplier_ServiceDesc is the grpc_go.ServiceDesc for Supplier service.
|
||||||
|
// It's only intended for direct use with grpc_go.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Supplier_ServiceDesc = grpc_go.ServiceDesc{
|
||||||
|
ServiceName: "supplier.Supplier",
|
||||||
|
HandlerType: (*SupplierServer)(nil),
|
||||||
|
Methods: []grpc_go.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "GetSupplier",
|
||||||
|
Handler: _Supplier_GetSupplier_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CreateSupplier",
|
||||||
|
Handler: _Supplier_CreateSupplier_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateSupplier",
|
||||||
|
Handler: _Supplier_UpdateSupplier_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetSupplierList",
|
||||||
|
Handler: _Supplier_GetSupplierList_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CreateOrganizeDictionary",
|
||||||
|
Handler: _Supplier_CreateOrganizeDictionary_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetOrganizeDictionaryList",
|
||||||
|
Handler: _Supplier_GetOrganizeDictionaryList_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetOrganizeDictionaryInfo",
|
||||||
|
Handler: _Supplier_GetOrganizeDictionaryInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetCountryRegionList",
|
||||||
|
Handler: _Supplier_GetCountryRegionList_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetCountryRegionInfo",
|
||||||
|
Handler: _Supplier_GetCountryRegionInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CreateImportRecord",
|
||||||
|
Handler: _Supplier_CreateImportRecord_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetImportRecordInfo",
|
||||||
|
Handler: _Supplier_GetImportRecordInfo_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc_go.StreamDesc{},
|
||||||
|
Metadata: "api/supplier/supplier.proto",
|
||||||
|
}
|
||||||
@ -54,6 +54,9 @@ dubbo:
|
|||||||
FieeCronClientImpl:
|
FieeCronClientImpl:
|
||||||
protocol: tri
|
protocol: tri
|
||||||
interface: com.fontree.microservices.fiee.cron
|
interface: com.fontree.microservices.fiee.cron
|
||||||
|
SupplierClientImpl:
|
||||||
|
protocol: tri
|
||||||
|
interface: com.fontree.microservices.common.supplier
|
||||||
logger:
|
logger:
|
||||||
zap-config:
|
zap-config:
|
||||||
level: error # 日志级别
|
level: error # 日志级别
|
||||||
|
|||||||
BIN
data/话题标签导入模板.xlsx
Normal file
BIN
data/话题标签导入模板.xlsx
Normal file
Binary file not shown.
@ -61,6 +61,9 @@ dubbo:
|
|||||||
methods:
|
methods:
|
||||||
- name: SecurityScan
|
- name: SecurityScan
|
||||||
timeout: 120000
|
timeout: 120000
|
||||||
|
SupplierClientImpl:
|
||||||
|
protocol: tri
|
||||||
|
interface: com.fontree.microservices.common.supplier
|
||||||
logger:
|
logger:
|
||||||
zap-config:
|
zap-config:
|
||||||
level: error # 日志级别
|
level: error # 日志级别
|
||||||
|
|||||||
@ -63,6 +63,9 @@ dubbo:
|
|||||||
methods:
|
methods:
|
||||||
- name: SecurityScan
|
- name: SecurityScan
|
||||||
timeout: 120000
|
timeout: 120000
|
||||||
|
SupplierClientImpl:
|
||||||
|
protocol: tri
|
||||||
|
interface: com.fontree.microservices.common.supplier
|
||||||
logger:
|
logger:
|
||||||
zap-config:
|
zap-config:
|
||||||
level: error # 日志级别
|
level: error # 日志级别
|
||||||
|
|||||||
@ -61,6 +61,9 @@ dubbo:
|
|||||||
methods:
|
methods:
|
||||||
- name: SecurityScan
|
- name: SecurityScan
|
||||||
timeout: 120000
|
timeout: 120000
|
||||||
|
SupplierClientImpl:
|
||||||
|
protocol: tri
|
||||||
|
interface: com.fontree.microservices.common.supplier
|
||||||
logger:
|
logger:
|
||||||
zap-config:
|
zap-config:
|
||||||
level: error # 日志级别
|
level: error # 日志级别
|
||||||
|
|||||||
@ -182,6 +182,30 @@ var EnMessages = map[string]string{
|
|||||||
"未知增值服务": "Unknown value-added service",
|
"未知增值服务": "Unknown value-added service",
|
||||||
"套餐未绑定增值服务": "Bundle not bound to value-added service",
|
"套餐未绑定增值服务": "Bundle not bound to value-added service",
|
||||||
"网络错误": "Network error",
|
"网络错误": "Network error",
|
||||||
|
|
||||||
|
// Website report related messages
|
||||||
|
"创建官网报告失败": "Failed to create website report",
|
||||||
|
"删除官网报告失败": "Failed to delete website report",
|
||||||
|
"官网报告列表查询失败": "Failed to query website report list",
|
||||||
|
"编辑官网报告失败": "Failed to edit website report",
|
||||||
|
"显示官网报告失败": "Failed to display website report",
|
||||||
|
|
||||||
|
// Website member management related messages
|
||||||
|
"创建官网成员失败": "Failed to create website member",
|
||||||
|
"删除官网成员失败": "Failed to delete website member",
|
||||||
|
"官网成员列表查询失败": "Failed to query website member list",
|
||||||
|
"编辑官网成员失败": "Failed to edit website member",
|
||||||
|
"显示官网成员失败": "Failed to display website member",
|
||||||
|
"编辑董事会成员失败": "Failed to edit board of directors member",
|
||||||
|
"编辑委员会成员失败": "Failed to edit committee member",
|
||||||
|
"显示委员会成员失败": "Failed to display committee member",
|
||||||
|
"编辑管理员失败": "Failed to edit administrator",
|
||||||
|
"显示管理员失败": "Failed to display administrator",
|
||||||
|
"显示董事会成员失败": "Failed to display board of directors member",
|
||||||
|
|
||||||
|
// Website email alert related messages
|
||||||
|
"提交邮箱通知失败": "Failed to submit email alert",
|
||||||
|
"获取邮箱通知列表失败": "Failed to get email information list",
|
||||||
}
|
}
|
||||||
|
|
||||||
var DeDEMessages = map[string]string{
|
var DeDEMessages = map[string]string{
|
||||||
@ -358,6 +382,30 @@ var DeDEMessages = map[string]string{
|
|||||||
"未知增值服务": "Unbekannter Mehrwertdienst",
|
"未知增值服务": "Unbekannter Mehrwertdienst",
|
||||||
"套餐未绑定增值服务": "Bundle nicht an Mehrwertdienst gebunden",
|
"套餐未绑定增值服务": "Bundle nicht an Mehrwertdienst gebunden",
|
||||||
"网络错误": "Netzwerkfehler",
|
"网络错误": "Netzwerkfehler",
|
||||||
|
|
||||||
|
// Website report related messages
|
||||||
|
"创建官网报告失败": "Fehler beim Erstellen des Website-Berichts",
|
||||||
|
"删除官网报告失败": "Fehler beim Löschen des Website-Berichts",
|
||||||
|
"官网报告列表查询失败": "Fehler beim Abfragen der Website-Berichtsliste",
|
||||||
|
"编辑官网报告失败": "Fehler beim Bearbeiten des Website-Berichts",
|
||||||
|
"显示官网报告失败": "Fehler beim Anzeigen des Website-Berichts",
|
||||||
|
|
||||||
|
// Website member management related messages
|
||||||
|
"创建官网成员失败": "Fehler beim Erstellen des Website-Mitglieds",
|
||||||
|
"删除官网成员失败": "Fehler beim Löschen des Website-Mitglieds",
|
||||||
|
"官网成员列表查询失败": "Fehler beim Abfragen der Website-Mitgliederliste",
|
||||||
|
"编辑官网成员失败": "Fehler beim Bearbeiten des Website-Mitglieds",
|
||||||
|
"显示官网成员失败": "Fehler beim Anzeigen des Website-Mitglieds",
|
||||||
|
"编辑董事会成员失败": "Fehler beim Bearbeiten des Vorstandsmitglieds",
|
||||||
|
"编辑委员会成员失败": "Fehler beim Bearbeiten des Ausschussmitglieds",
|
||||||
|
"显示委员会成员失败": "Fehler beim Anzeigen des Ausschussmitglieds",
|
||||||
|
"编辑管理员失败": "Fehler beim Bearbeiten des Administrators",
|
||||||
|
"显示管理员失败": "Fehler beim Anzeigen des Administrators",
|
||||||
|
"显示董事会成员失败": "Fehler beim Anzeigen des Vorstandsmitglieds",
|
||||||
|
|
||||||
|
// Website email alert related messages
|
||||||
|
"提交邮箱通知失败": "Fehler beim Senden der E-Mail-Benachrichtigung",
|
||||||
|
"获取邮箱通知列表失败": "Fehler beim Abrufen der E-Mail-Informationsliste",
|
||||||
}
|
}
|
||||||
|
|
||||||
var JaJPMessages = map[string]string{
|
var JaJPMessages = map[string]string{
|
||||||
@ -535,6 +583,30 @@ var JaJPMessages = map[string]string{
|
|||||||
"未知增值服务": "未知の付加価値サービス",
|
"未知增值服务": "未知の付加価値サービス",
|
||||||
"套餐未绑定增值服务": "バンドルが付加価値サービスにバインドされていません",
|
"套餐未绑定增值服务": "バンドルが付加価値サービスにバインドされていません",
|
||||||
"网络错误": "ネットワークエラー",
|
"网络错误": "ネットワークエラー",
|
||||||
|
|
||||||
|
// Website report related messages
|
||||||
|
"创建官网报告失败": "ウェブサイトレポートの作成に失敗しました",
|
||||||
|
"删除官网报告失败": "ウェブサイトレポートの削除に失敗しました",
|
||||||
|
"官网报告列表查询失败": "ウェブサイトレポートリストの検索に失敗しました",
|
||||||
|
"编辑官网报告失败": "ウェブサイトレポートの編集に失敗しました",
|
||||||
|
"显示官网报告失败": "ウェブサイトレポートの表示に失敗しました",
|
||||||
|
|
||||||
|
// Website member management related messages
|
||||||
|
"创建官网成员失败": "ウェブサイトメンバーの作成に失敗しました",
|
||||||
|
"删除官网成员失败": "ウェブサイトメンバーの削除に失敗しました",
|
||||||
|
"官网成员列表查询失败": "ウェブサイトメンバーリストの検索に失敗しました",
|
||||||
|
"编辑官网成员失败": "ウェブサイトメンバーの編集に失敗しました",
|
||||||
|
"显示官网成员失败": "ウェブサイトメンバーの表示に失敗しました",
|
||||||
|
"编辑董事会成员失败": "取締役会メンバーの編集に失敗しました",
|
||||||
|
"编辑委员会成员失败": "委員会メンバーの編集に失敗しました",
|
||||||
|
"显示委员会成员失败": "委員会メンバーの表示に失敗しました",
|
||||||
|
"编辑管理员失败": "管理者の編集に失敗しました",
|
||||||
|
"显示管理员失败": "管理者の表示に失敗しました",
|
||||||
|
"显示董事会成员失败": "取締役会メンバーの表示に失敗しました",
|
||||||
|
|
||||||
|
// Website email alert related messages
|
||||||
|
"提交邮箱通知失败": "メール通知の送信に失敗しました",
|
||||||
|
"获取邮箱通知列表失败": "メール情報リストの取得に失敗しました",
|
||||||
}
|
}
|
||||||
|
|
||||||
var ZhTWMessages = map[string]string{
|
var ZhTWMessages = map[string]string{
|
||||||
@ -722,4 +794,28 @@ var ZhTWMessages = map[string]string{
|
|||||||
"未知增值服务": "未知增值服務",
|
"未知增值服务": "未知增值服務",
|
||||||
"套餐未绑定增值服务": "套餐未綁定增值服務",
|
"套餐未绑定增值服务": "套餐未綁定增值服務",
|
||||||
"网络错误": "網絡錯誤",
|
"网络错误": "網絡錯誤",
|
||||||
|
|
||||||
|
// Website report related messages
|
||||||
|
"创建官网报告失败": "創建官網報告失敗",
|
||||||
|
"删除官网报告失败": "刪除官網報告失敗",
|
||||||
|
"官网报告列表查询失败": "官網報告列表查詢失敗",
|
||||||
|
"编辑官网报告失败": "編輯官網報告失敗",
|
||||||
|
"显示官网报告失败": "顯示官網報告失敗",
|
||||||
|
|
||||||
|
// Website member management related messages
|
||||||
|
"创建官网成员失败": "創建官網成員失敗",
|
||||||
|
"删除官网成员失败": "刪除官網成員失敗",
|
||||||
|
"官网成员列表查询失败": "官網成員列表查詢失敗",
|
||||||
|
"编辑官网成员失败": "編輯官網成員失敗",
|
||||||
|
"显示官网成员失败": "顯示官網成員失敗",
|
||||||
|
"编辑董事会成员失败": "編輯董事會成員失敗",
|
||||||
|
"编辑委员会成员失败": "編輯委員會成員失敗",
|
||||||
|
"显示委员会成员失败": "顯示委員會成員失敗",
|
||||||
|
"编辑管理员失败": "編輯管理員失敗",
|
||||||
|
"显示管理员失败": "顯示管理員失敗",
|
||||||
|
"显示董事会成员失败": "顯示董事會成員失敗",
|
||||||
|
|
||||||
|
// Website email alert related messages
|
||||||
|
"提交邮箱通知失败": "提交郵箱通知失敗",
|
||||||
|
"获取邮箱通知列表失败": "獲取郵箱通知列表失敗",
|
||||||
}
|
}
|
||||||
|
|||||||
246
pkg/cron/task.go
246
pkg/cron/task.go
@ -5,6 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"fonchain-fiee/api/aryshare"
|
||||||
"fonchain-fiee/api/bundle"
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
"fonchain-fiee/pkg/cache"
|
"fonchain-fiee/pkg/cache"
|
||||||
@ -16,6 +17,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/go-redis/redis"
|
"github.com/go-redis/redis"
|
||||||
@ -27,8 +29,8 @@ func InitTasks() error {
|
|||||||
cm := GetCronManager()
|
cm := GetCronManager()
|
||||||
err := cm.AddTask("refreshWorkApprovalStatus", "0 */1 * * * *", RefreshWorkApprovalStatusTask)
|
err := cm.AddTask("refreshWorkApprovalStatus", "0 */1 * * * *", RefreshWorkApprovalStatusTask)
|
||||||
err = cm.AddTask("artistAutoConfirm", "0 */1 * * * *", ArtistAutoConfirmTask)
|
err = cm.AddTask("artistAutoConfirm", "0 */1 * * * *", ArtistAutoConfirmTask)
|
||||||
err = cm.AddTask("refreshPublishStatus", "0 */1 * * * *", RefreshPublishStatusTask)
|
err = cm.AddTask("refreshPublishStatus", "0 */1 * * * *", PublishTask)
|
||||||
err = cm.AddTask("scheduledPublish", "0 */1 * * * *", ScheduledPublishTask)
|
err = cm.AddTask("scheduledPublish", "0 */10 * * * *", ScheduledPublishTask)
|
||||||
|
|
||||||
err = cm.AddTask("artistAutoConfirmAnalysis", "0 */1 * * * *", ArtistAutoConfirmAnalysisTask)
|
err = cm.AddTask("artistAutoConfirmAnalysis", "0 */1 * * * *", ArtistAutoConfirmAnalysisTask)
|
||||||
err = cm.AddTask("refreshWorkAnalysisApprovalStatus", "0 */1 * * * *", RefreshWorkAnalysisApprovalStatusTask)
|
err = cm.AddTask("refreshWorkAnalysisApprovalStatus", "0 */1 * * * *", RefreshWorkAnalysisApprovalStatusTask)
|
||||||
@ -40,6 +42,9 @@ func InitTasks() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("添加定时任务失败: %v", err)
|
log.Printf("添加定时任务失败: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 每2分钟执行一次标签观看次数更新任务
|
||||||
|
// err = cm.AddTask("updateCastTagWatchCount", "0 */1 * * * *", UpdateCastTagWatchCountTask)
|
||||||
cm.Start()
|
cm.Start()
|
||||||
|
|
||||||
// 启动队列消费者
|
// 启动队列消费者
|
||||||
@ -272,11 +277,15 @@ func RefreshPublishStatusTask() {
|
|||||||
//zap.L().Info("刷新发布状态成功")
|
//zap.L().Info("刷新发布状态成功")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScheduledPublishTask 定时发布任务,从Redis Sorted Set中获取所有workUuid并根据score判断处理
|
// PublishTask 定时发布任务,从Redis Sorted Set中获取所有workUuid并根据score判断处理
|
||||||
|
func PublishTask() {
|
||||||
|
go RefreshPublishStatusTask() // 刷新发布状态
|
||||||
|
go TaskStatus() // 异步任务状态
|
||||||
|
}
|
||||||
func ScheduledPublishTask() {
|
func ScheduledPublishTask() {
|
||||||
// 加上锁
|
// 加上锁
|
||||||
lockKey := "scheduled_publish:lock"
|
lockKey := "scheduled_publish:lock"
|
||||||
reply := cache.RedisClient.SetNX(lockKey, time.Now().Format("2006-01-02 15:04:05"), 1*time.Hour)
|
reply := cache.RedisClient.SetNX(lockKey, time.Now().Format("2006-01-02 15:04:05"), 2*time.Hour)
|
||||||
if !reply.Val() {
|
if !reply.Val() {
|
||||||
zap.L().Warn("定时发布任务正在被其他实例处理")
|
zap.L().Warn("定时发布任务正在被其他实例处理")
|
||||||
return
|
return
|
||||||
@ -303,12 +312,15 @@ func ScheduledPublishTask() {
|
|||||||
|
|
||||||
publishCount := 0
|
publishCount := 0
|
||||||
expiredCount := 0
|
expiredCount := 0
|
||||||
const batchSize = 10 // 每批发布10个
|
const batchSize = 8 // 每批发布8个,与PublishWork的workerCount保持一致
|
||||||
|
|
||||||
zap.L().Info("发现定时发布任务", zap.Int("total_count", len(workList)))
|
zap.L().Info("发现定时发布任务", zap.Int("total_count", len(workList)))
|
||||||
|
zap.L().Info("发现定时发布任务 列表", zap.Any("workList", workList))
|
||||||
|
|
||||||
now := float64(time.Now().Unix())
|
now := float64(time.Now().Unix())
|
||||||
publishBatch := make([]string, 0, batchSize)
|
publishBatch := make([]string, 0, batchSize)
|
||||||
|
// 使用 map 进行去重,防止同一个 work_uuid 被多次添加
|
||||||
|
publishedUuids := make(map[string]bool)
|
||||||
|
|
||||||
// 遍历所有数据,根据score判断处理
|
// 遍历所有数据,根据score判断处理
|
||||||
for _, item := range workList {
|
for _, item := range workList {
|
||||||
@ -331,11 +343,32 @@ func ScheduledPublishTask() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 先从 Redis 中删除,采用"先删后处理"的策略,防止重复处理
|
||||||
|
removed, delErr := cache.RedisClient.ZRem(modelCast.ScheduledPublishQueueKey, workUuid).Result()
|
||||||
|
if delErr != nil {
|
||||||
|
zap.L().Error("删除定时发布任务失败", zap.Error(delErr), zap.String("work_uuid", workUuid))
|
||||||
|
continue // 删除失败则跳过,避免重复处理
|
||||||
|
}
|
||||||
|
if removed == 0 {
|
||||||
|
zap.L().Warn("定时发布任务已被删除,跳过",
|
||||||
|
zap.String("work_uuid", workUuid))
|
||||||
|
continue // 已被其他实例删除,跳过
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否已经在当前批次中(去重)
|
||||||
|
if publishedUuids[workUuid] {
|
||||||
|
zap.L().Warn("发现重复的定时发布任务,跳过",
|
||||||
|
zap.String("work_uuid", workUuid))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// score大于等于当前时间,添加到待发布批次
|
// score大于等于当前时间,添加到待发布批次
|
||||||
zap.L().Info("添加到发布批次",
|
zap.L().Info("添加到发布批次",
|
||||||
zap.String("work_uuid", workUuid),
|
zap.String("work_uuid", workUuid),
|
||||||
zap.Float64("score", score))
|
zap.Float64("score", score))
|
||||||
publishBatch = append(publishBatch, workUuid)
|
publishBatch = append(publishBatch, workUuid)
|
||||||
|
publishedUuids[workUuid] = true
|
||||||
|
publishCount++
|
||||||
|
|
||||||
// 当批次达到指定大小时,批量发布
|
// 当批次达到指定大小时,批量发布
|
||||||
if len(publishBatch) >= batchSize {
|
if len(publishBatch) >= batchSize {
|
||||||
@ -343,15 +376,6 @@ func ScheduledPublishTask() {
|
|||||||
_ = serverCast.PublishWork(context.Background(), &cast.PublishReq{
|
_ = serverCast.PublishWork(context.Background(), &cast.PublishReq{
|
||||||
WorkUuids: publishBatch,
|
WorkUuids: publishBatch,
|
||||||
})
|
})
|
||||||
// 批量删除已发布的任务
|
|
||||||
for _, uuid := range publishBatch {
|
|
||||||
removed, delErr := cache.RedisClient.ZRem(modelCast.ScheduledPublishQueueKey, uuid).Result()
|
|
||||||
if delErr != nil {
|
|
||||||
zap.L().Error("删除定时发布任务失败", zap.Error(delErr), zap.String("work_uuid", uuid))
|
|
||||||
} else if removed > 0 {
|
|
||||||
publishCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
zap.L().Info("批次发布完成", zap.Int("published", len(publishBatch)))
|
zap.L().Info("批次发布完成", zap.Int("published", len(publishBatch)))
|
||||||
// 清空批次,准备下一批
|
// 清空批次,准备下一批
|
||||||
publishBatch = make([]string, 0, batchSize)
|
publishBatch = make([]string, 0, batchSize)
|
||||||
@ -364,15 +388,6 @@ func ScheduledPublishTask() {
|
|||||||
_ = serverCast.PublishWork(context.Background(), &cast.PublishReq{
|
_ = serverCast.PublishWork(context.Background(), &cast.PublishReq{
|
||||||
WorkUuids: publishBatch,
|
WorkUuids: publishBatch,
|
||||||
})
|
})
|
||||||
// 批量删除已发布的任务
|
|
||||||
for _, uuid := range publishBatch {
|
|
||||||
removed, delErr := cache.RedisClient.ZRem(modelCast.ScheduledPublishQueueKey, uuid).Result()
|
|
||||||
if delErr != nil {
|
|
||||||
zap.L().Error("删除定时发布任务失败", zap.Error(delErr), zap.String("work_uuid", uuid))
|
|
||||||
} else if removed > 0 {
|
|
||||||
publishCount++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
zap.L().Info("剩余批次发布完成", zap.Int("published", len(publishBatch)))
|
zap.L().Info("剩余批次发布完成", zap.Int("published", len(publishBatch)))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,6 +397,61 @@ func ScheduledPublishTask() {
|
|||||||
zap.Int("total_count", len(workList)))
|
zap.Int("total_count", len(workList)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TaskStatus() {
|
||||||
|
var actions []string = []string{"publishBatch1", "publishBatch2"}
|
||||||
|
for _, action := range actions {
|
||||||
|
resp, err := service.CastProvider.ListTaskList(context.Background(), &cast.ListTaskListReq{
|
||||||
|
Action: action,
|
||||||
|
Status: 1,
|
||||||
|
Page: 1,
|
||||||
|
PageSize: 100,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("获取任务列表失败", zap.Error(err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
for _, v := range resp.Data {
|
||||||
|
var extraData modelCast.PublishTaskDto
|
||||||
|
if v.ExtraData == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
_ = json.Unmarshal([]byte(v.ExtraData), &extraData)
|
||||||
|
var allDone = true
|
||||||
|
for _, workUuid := range extraData.WorkUuids {
|
||||||
|
infoResp, _err := service.CastProvider.WorkInfo(context.Background(), &cast.WorkInfoReq{WorkUuid: workUuid})
|
||||||
|
if _err != nil {
|
||||||
|
zap.L().Error("获取作品信息失败", zap.Error(_err))
|
||||||
|
allDone = false
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if infoResp.PublishStatus != cast.PublishStatusENUM_PublishMediaStatus_DONE {
|
||||||
|
allDone = false
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var excelUrl string
|
||||||
|
if allDone {
|
||||||
|
excelUrl, err = serverCast.PublishTaskExcel(extraData.WorkUuids, true, v.Action)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("生成发布任务Excel失败", zap.Error(err))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
_, err = service.CastProvider.UpsertTaskList(context.Background(), &cast.UpsertTaskListReq{
|
||||||
|
Uuid: v.Uuid,
|
||||||
|
Action: v.Action,
|
||||||
|
Url: excelUrl,
|
||||||
|
Status: 3,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("更新任务状态失败", zap.Error(err))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
zap.L().Info("任务已完成,更新状态为完成", zap.String("task_uuid", v.Uuid), zap.String("excel_url", excelUrl))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// WorkPublishQueueConsumer 监听work:publish:queue队列的消费者
|
// WorkPublishQueueConsumer 监听work:publish:queue队列的消费者
|
||||||
func WorkPublishQueueConsumer() {
|
func WorkPublishQueueConsumer() {
|
||||||
zap.L().Info("开始监听work:publish:queue队列(批量处理模式)")
|
zap.L().Info("开始监听work:publish:queue队列(批量处理模式)")
|
||||||
@ -506,5 +576,133 @@ func AyrshareMetricsCollectorTask() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RefreshArtistOrderTask() {
|
func RefreshArtistOrderTask() {
|
||||||
service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: "refreshArtistOrder"})
|
_, _ = service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: "artistOrderInfo"})
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateCastTagWatchCountTask 更新标签观看次数的定时任务(每5分钟执行一次)
|
||||||
|
func UpdateCastTagWatchCountTask() {
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
// 计算两天前的00:00:00
|
||||||
|
now := time.Now()
|
||||||
|
twoDaysAgo := now.AddDate(0, 0, -2)
|
||||||
|
createdAtStart := time.Date(twoDaysAgo.Year(), twoDaysAgo.Month(), twoDaysAgo.Day(), 0, 0, 0, 0, twoDaysAgo.Location())
|
||||||
|
createdAtEnd := now
|
||||||
|
|
||||||
|
// 格式化时间字符串:2026-01-01 00:00:00
|
||||||
|
createdAtStartStr := createdAtStart.Format("2006-01-02 15:04:05")
|
||||||
|
createdAtEndStr := createdAtEnd.Format("2006-01-02 15:04:05")
|
||||||
|
|
||||||
|
// 调用 ListCastTags 接口,筛选 IsWatchCountCalled = 2 的数据
|
||||||
|
listReq := &cast.ListCastTagsReq{
|
||||||
|
CreatedAtStart: createdAtStartStr,
|
||||||
|
CreatedAtEnd: createdAtEndStr,
|
||||||
|
IsWatchCountCalled: 2, // 2表示未调用
|
||||||
|
Page: 1,
|
||||||
|
PageSize: 10,
|
||||||
|
}
|
||||||
|
|
||||||
|
listResp, err := service.CastProvider.ListCastTags(ctx, listReq)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("获取标签列表失败", zap.Error(err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if listResp.Data == nil || len(listResp.Data) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
zap.L().Info("获取到需要更新的标签", zap.Int("count", len(listResp.Data)))
|
||||||
|
|
||||||
|
// 获取有效的 profileKey
|
||||||
|
profileKey, err := serverCast.GetValidProfileKey(ctx, []uint32{1})
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("获取有效profileKey失败", zap.Error(err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 准备批量更新的数据
|
||||||
|
updateData := make([]*cast.CastTagInfo, 0, len(listResp.Data))
|
||||||
|
|
||||||
|
// 遍历每个标签,调用 RecommendHashtags 接口
|
||||||
|
for _, tag := range listResp.Data {
|
||||||
|
if tag.HashTag == "" {
|
||||||
|
zap.L().Warn("标签HashTag为空,跳过", zap.String("uuid", tag.Uuid))
|
||||||
|
// 即使HashTag为空,也要更新IsWatchCountCalled为1
|
||||||
|
updateData = append(updateData, &cast.CastTagInfo{
|
||||||
|
Uuid: tag.Uuid,
|
||||||
|
WatchCount: 1,
|
||||||
|
IsWatchCountCalled: 1,
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用 RecommendHashtags 接口
|
||||||
|
recommendReq := &aryshare.RecommendHashtagsRequest{
|
||||||
|
Keyword: tag.HashTag,
|
||||||
|
ProfileKey: profileKey,
|
||||||
|
}
|
||||||
|
|
||||||
|
recommendResp, err := service.AyrshareProvider.RecommendHashtags(ctx, recommendReq)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("调用RecommendHashtags接口失败",
|
||||||
|
zap.String("hashTag", tag.HashTag),
|
||||||
|
zap.String("uuid", tag.Uuid),
|
||||||
|
zap.Error(err))
|
||||||
|
// 调用失败时,将WatchCount更新为1,IsWatchCountCalled更新为1
|
||||||
|
updateData = append(updateData, &cast.CastTagInfo{
|
||||||
|
Uuid: tag.Uuid,
|
||||||
|
WatchCount: 1,
|
||||||
|
IsWatchCountCalled: 1,
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// 对比返回结果,查找完全一致的标签
|
||||||
|
var matchedViewCount int64 = 0
|
||||||
|
if recommendResp.Recommendations != nil {
|
||||||
|
for _, recommendation := range recommendResp.Recommendations {
|
||||||
|
// 完全一致匹配(不区分大小写)
|
||||||
|
if strings.EqualFold(recommendation.Name, tag.HashTag) {
|
||||||
|
matchedViewCount = recommendation.ViewCount
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据匹配结果更新WatchCount
|
||||||
|
var watchCount int32 = 1
|
||||||
|
if matchedViewCount > 0 {
|
||||||
|
watchCount = int32(matchedViewCount)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加到更新列表
|
||||||
|
updateData = append(updateData, &cast.CastTagInfo{
|
||||||
|
Uuid: tag.Uuid,
|
||||||
|
WatchCount: watchCount,
|
||||||
|
IsWatchCountCalled: 1,
|
||||||
|
})
|
||||||
|
|
||||||
|
zap.L().Debug("处理标签完成",
|
||||||
|
zap.String("hashTag", tag.HashTag),
|
||||||
|
zap.String("uuid", tag.Uuid),
|
||||||
|
zap.Int64("matchedViewCount", matchedViewCount),
|
||||||
|
zap.Int32("watchCount", watchCount))
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果没有需要更新的数据,直接返回
|
||||||
|
if len(updateData) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量更新标签
|
||||||
|
batchUpdateReq := &cast.BatchUpdateCastTagsReq{
|
||||||
|
Data: updateData,
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = service.CastProvider.BatchUpdateCastTags(ctx, batchUpdateReq)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("批量更新标签失败", zap.Error(err), zap.Int("count", len(updateData)))
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,7 +79,7 @@ func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.Fi
|
|||||||
info.Remark,
|
info.Remark,
|
||||||
mediaAccountNames,
|
mediaAccountNames,
|
||||||
managerNames,
|
managerNames,
|
||||||
info.Status1Time,
|
info.SubmitTime,
|
||||||
info.Status4Time,
|
info.Status4Time,
|
||||||
info.Status9Time,
|
info.Status9Time,
|
||||||
info.Status6Time,
|
info.Status6Time,
|
||||||
|
|||||||
182
pkg/logic/supplier.go
Normal file
182
pkg/logic/supplier.go
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
package logic
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/sha256"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/tealeg/xlsx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SupplierLogic struct {
|
||||||
|
OwningEntityName string `json:"owningEntityName"`
|
||||||
|
LegalName string `json:"legalName"`
|
||||||
|
LocalName string `json:"localName"`
|
||||||
|
AbbreviationName string `json:"abbreviationName"`
|
||||||
|
CountryOrRegionName string `json:"countryOrRegionName"`
|
||||||
|
CompanyRegistrationNumber string `json:"companyRegistrationNumber"`
|
||||||
|
SupplierType string `json:"supplierType"`
|
||||||
|
ApprovalStatus string `json:"approvalStatus"`
|
||||||
|
ApprovalDate string `json:"approvalDate"`
|
||||||
|
LastReviewDate string `json:"lastReviewDate"`
|
||||||
|
LegalEntityType string `json:"legalEntityType"`
|
||||||
|
SanctionsCountryScreeningResult string `json:"sanctionsCountryScreeningResult"`
|
||||||
|
KeyFinancial string `json:"keyFinancial"`
|
||||||
|
CompanyAddress string `json:"companyAddress"`
|
||||||
|
PrimaryContact string `json:"primaryContact"`
|
||||||
|
DataOwnerDepartment string `json:"dataOwnerDepartment"`
|
||||||
|
BasicCompanyInformation string `json:"basicCompanyInformation"`
|
||||||
|
SupplementaryText string `json:"supplementaryText"`
|
||||||
|
ConnectedParty string `json:"connectedParty"`
|
||||||
|
}
|
||||||
|
type ErrSupplierRes struct {
|
||||||
|
ID int `json:"id"`
|
||||||
|
LegalName string `json:"legalName"`
|
||||||
|
Remark string `json:"remark"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func ImportSupplier(filePath string) ([]*SupplierLogic, error) {
|
||||||
|
xlFile, err := xlsx.OpenFile(filePath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
//开辟除表头外的行数的数组内存
|
||||||
|
//遍历sheet
|
||||||
|
for sheetIndex, sheet := range xlFile.Sheets {
|
||||||
|
var resourceArr []map[int]string
|
||||||
|
//遍历每一行
|
||||||
|
//for rowIndex, row := range sheet.Rows {
|
||||||
|
for _, row := range sheet.Rows {
|
||||||
|
//开辟除表头外的行数的数组内存
|
||||||
|
objMap := make(map[int]string)
|
||||||
|
|
||||||
|
//if len(row.Cells) <= 0 || row.Cells[0].String() == "" {
|
||||||
|
// continue
|
||||||
|
//}
|
||||||
|
for cellIndex, cell := range row.Cells {
|
||||||
|
text := cell.String()
|
||||||
|
//如果是每一行的第一个单元格
|
||||||
|
objMap[cellIndex] = text
|
||||||
|
}
|
||||||
|
resourceArr = append(resourceArr, objMap)
|
||||||
|
}
|
||||||
|
if len(resourceArr) >= 2 {
|
||||||
|
suppliers, err := getListFromRaw(resourceArr)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.New(fmt.Sprintf("页码:%d,文件读取错误信息%s", sheetIndex+1, err.Error()))
|
||||||
|
}
|
||||||
|
if len(suppliers) > 0 {
|
||||||
|
return suppliers, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
func getListFromRaw(list []map[int]string) ([]*SupplierLogic, error) {
|
||||||
|
var entrusts []*SupplierLogic
|
||||||
|
kkMap := map[string]string{
|
||||||
|
"*使用组织/Owning Entity": "owningEntityName",
|
||||||
|
"*供应商法定全称/Legal Name": "legalName",
|
||||||
|
"供应商本地名称(如有)/Local Name (if applicable)": "localName",
|
||||||
|
"供应商简称(如有)/Abbreviation/Trade Name (if applicable)": "abbreviationName",
|
||||||
|
"*所在国家或地区/Country or Region": "countryOrRegionName",
|
||||||
|
"*公司注册编号/Company Registration Number": "companyRegistrationNumber",
|
||||||
|
"*供应商类型/Supplier Type": "supplierType",
|
||||||
|
"*准入状态/Approval Status": "approvalStatus",
|
||||||
|
"准入日期/Approval Date": "approvalDate",
|
||||||
|
"法律实体形式/Legal Entity Type": "legalEntityType",
|
||||||
|
"制裁与高风险国家筛查结果/Sanctions & High-Risk Country Screening Result": "sanctionsCountryScreeningResult",
|
||||||
|
"关键财务与付款信息/Key Financial & Payment Information": "keyFinancial",
|
||||||
|
"公司地址/Company Address": "companyAddress",
|
||||||
|
"主要联系人、职位及联系方式/Primary Contact, Position&Details": "primaryContact",
|
||||||
|
"数据维护部门&人员/Data Owner Department/Personnel": "dataOwnerDepartment",
|
||||||
|
"公司信息概要/Summary of Basic Company Information": "basicCompanyInformation",
|
||||||
|
"其他补充信息/Other Supplementary Information": "supplementaryText",
|
||||||
|
"*是否关联方/Connected party": "connectedParty",
|
||||||
|
}
|
||||||
|
keyMap := list[0]
|
||||||
|
for index, tt := range list {
|
||||||
|
if index == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
temp := &SupplierLogic{}
|
||||||
|
for i, r := range tt {
|
||||||
|
t := strings.TrimSpace(r)
|
||||||
|
if _, ok := keyMap[i]; !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
keyString := strings.TrimSpace(keyMap[i])
|
||||||
|
if _, ok := kkMap[keyString]; !ok {
|
||||||
|
fmt.Println(fmt.Sprintf("行数:%d字段信息(%s)没有匹配,请以模版为准", i, keyString))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
switch kkMap[keyString] {
|
||||||
|
case "owningEntityName":
|
||||||
|
temp.OwningEntityName = t
|
||||||
|
case "legalName":
|
||||||
|
temp.LegalName = t
|
||||||
|
case "localName":
|
||||||
|
temp.LocalName = t
|
||||||
|
case "abbreviationName":
|
||||||
|
temp.AbbreviationName = t
|
||||||
|
case "countryOrRegionName":
|
||||||
|
temp.CountryOrRegionName = t
|
||||||
|
case "companyRegistrationNumber":
|
||||||
|
temp.CompanyRegistrationNumber = t
|
||||||
|
case "supplierType":
|
||||||
|
temp.SupplierType = t
|
||||||
|
case "approvalStatus":
|
||||||
|
temp.ApprovalStatus = t
|
||||||
|
case "approvalDate":
|
||||||
|
temp.ApprovalDate = ParseExcelDate(t)
|
||||||
|
//temp.ApprovalDate = t
|
||||||
|
case "legalEntityType":
|
||||||
|
temp.LegalEntityType = t
|
||||||
|
case "sanctionsCountryScreeningResult":
|
||||||
|
temp.SanctionsCountryScreeningResult = t
|
||||||
|
case "keyFinancial":
|
||||||
|
temp.KeyFinancial = t
|
||||||
|
case "companyAddress":
|
||||||
|
temp.CompanyAddress = t
|
||||||
|
case "primaryContact":
|
||||||
|
temp.PrimaryContact = t
|
||||||
|
case "dataOwnerDepartment":
|
||||||
|
temp.DataOwnerDepartment = t
|
||||||
|
case "basicCompanyInformation":
|
||||||
|
temp.BasicCompanyInformation = t
|
||||||
|
case "supplementaryText":
|
||||||
|
temp.SupplementaryText = t
|
||||||
|
case "connectedParty":
|
||||||
|
temp.ConnectedParty = t
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
entrusts = append(entrusts, temp)
|
||||||
|
}
|
||||||
|
sha256.New()
|
||||||
|
return entrusts, nil
|
||||||
|
}
|
||||||
|
func ParseExcelDate(v string) string {
|
||||||
|
if v == "" {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// 非数字,直接认为是 yyyy-mm-dd
|
||||||
|
if _, err := strconv.ParseFloat(v, 64); err != nil {
|
||||||
|
t, err := time.Parse("2006-01-02", v)
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return t.Format("2006-01-02")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Excel 序列号
|
||||||
|
f, _ := strconv.ParseFloat(v, 64)
|
||||||
|
base := time.Date(1899, 12, 30, 0, 0, 0, 0, time.Local)
|
||||||
|
return base.AddDate(0, 0, int(f)).Format("2006-01-02")
|
||||||
|
}
|
||||||
13
pkg/model/cast/task.go
Normal file
13
pkg/model/cast/task.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
type PublishTaskDto struct {
|
||||||
|
WorkUuids []string
|
||||||
|
MediaAccountUuids []string
|
||||||
|
PlatformIds []string
|
||||||
|
}
|
||||||
|
|
||||||
|
var TaskActionName = map[string]string{
|
||||||
|
"importWorkBatch": "批量导入图文",
|
||||||
|
"publishBatch1": "批量发布",
|
||||||
|
"publishBatch2": "多账号同步",
|
||||||
|
}
|
||||||
@ -63,6 +63,7 @@ func MediaRouter(r *gin.RouterGroup) {
|
|||||||
{
|
{
|
||||||
task.POST("list", serviceCast.TaskList)
|
task.POST("list", serviceCast.TaskList)
|
||||||
task.POST("delete", serviceCast.DeleteTasK)
|
task.POST("delete", serviceCast.DeleteTasK)
|
||||||
|
task.POST("download", serviceCast.DownloadTaskFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
layout := auth.Group("layout")
|
layout := auth.Group("layout")
|
||||||
@ -80,6 +81,18 @@ func MediaRouter(r *gin.RouterGroup) {
|
|||||||
prompt.POST("delete", serviceCast.DeletePrompt)
|
prompt.POST("delete", serviceCast.DeletePrompt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tag := auth.Group("tag")
|
||||||
|
{
|
||||||
|
tag.POST("update", serviceCast.UpdateCastTag)
|
||||||
|
tag.POST("list", serviceCast.ListCastTags)
|
||||||
|
tag.POST("import-batch", serviceCast.ImportTagBatch)
|
||||||
|
tag.POST("recalculate-quote-count", serviceCast.RecalculateCastTagQuoteCount)
|
||||||
|
// tag.POST("auto-hashtags", serviceCast.AutoHashtags)
|
||||||
|
// 这两个接口需要关闭ins,通过facebook授权
|
||||||
|
// tag.POST("recommend-hashtags", serviceCast.RecommendHashtags)
|
||||||
|
// tag.POST("search-hashtags", serviceCast.SearchHashtags)
|
||||||
|
}
|
||||||
|
|
||||||
//AI 生图
|
//AI 生图
|
||||||
aiNoAuth := noAuth.Group("ai")
|
aiNoAuth := noAuth.Group("ai")
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,13 +8,16 @@ import (
|
|||||||
"fonchain-fiee/pkg/service/asChat"
|
"fonchain-fiee/pkg/service/asChat"
|
||||||
"fonchain-fiee/pkg/service/auth"
|
"fonchain-fiee/pkg/service/auth"
|
||||||
"fonchain-fiee/pkg/service/bundle"
|
"fonchain-fiee/pkg/service/bundle"
|
||||||
|
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"
|
||||||
@ -58,6 +61,7 @@ func NewRouter() *gin.Engine {
|
|||||||
SecFilingRouter(privateGroup)
|
SecFilingRouter(privateGroup)
|
||||||
app.MediaAppRouter(privateGroup)
|
app.MediaAppRouter(privateGroup)
|
||||||
cronRouter(privateGroup)
|
cronRouter(privateGroup)
|
||||||
|
SupplierRouter(privateGroup)
|
||||||
{
|
{
|
||||||
v1.POST("version", version.Version) //版本号公共
|
v1.POST("version", version.Version) //版本号公共
|
||||||
}
|
}
|
||||||
@ -78,6 +82,7 @@ func NewRouter() *gin.Engine {
|
|||||||
acRoute.POST("info", account.UserInfo) //用户详情
|
acRoute.POST("info", account.UserInfo) //用户详情
|
||||||
acRoute.POST("update", account.UserUpdate) //用户更新
|
acRoute.POST("update", account.UserUpdate) //用户更新
|
||||||
acRoute.POST("ocr", account.CheckIdOcr) //
|
acRoute.POST("ocr", account.CheckIdOcr) //
|
||||||
|
acRoute.POST("write/off", account.WriteOff) //
|
||||||
}
|
}
|
||||||
webAcRouter := privateGroup.Group("/user")
|
webAcRouter := privateGroup.Group("/user")
|
||||||
//webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider))
|
//webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||||
@ -180,11 +185,13 @@ func NewRouter() *gin.Engine {
|
|||||||
governanceRoute := v1.Group("/governance")
|
governanceRoute := v1.Group("/governance")
|
||||||
governanceRouteLogin := governanceRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
governanceRouteLogin := governanceRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||||
|
|
||||||
governanceRoute.GET("/display", middleware.Cors(), governance.Display)
|
governanceRoute.POST("/display", middleware.Cors(), governance.Display)
|
||||||
governanceRouteLogin.POST("/list", governance.List)
|
governanceRouteLogin.POST("/list", governance.List)
|
||||||
governanceRouteLogin.POST("", governance.Create)
|
governanceRouteLogin.POST("", governance.Create)
|
||||||
governanceRouteLogin.POST("/edit", governance.Edit)
|
governanceRouteLogin.POST("/edit", governance.Edit)
|
||||||
governanceRouteLogin.POST("/delete", governance.Delete)
|
governanceRouteLogin.POST("/delete", governance.Delete)
|
||||||
|
governanceRouteLogin.POST("/updataStatus", governance.UpdataStatus)
|
||||||
|
governanceRouteLogin.POST("/getGovernanceInfo", governance.GetGovernanceInfo)
|
||||||
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -194,12 +201,72 @@ func NewRouter() *gin.Engine {
|
|||||||
|
|
||||||
pressreleasesRoute.POST("/display", middleware.Cors(), pressreleases.Display)
|
pressreleasesRoute.POST("/display", middleware.Cors(), pressreleases.Display)
|
||||||
pressreleasesRoute.GET("", middleware.Cors(), pressreleases.Get)
|
pressreleasesRoute.GET("", middleware.Cors(), pressreleases.Get)
|
||||||
|
pressreleasesRouteLogin.POST("/sortAndStatus", pressreleases.SortAndStatus)
|
||||||
|
pressreleasesRouteLogin.POST("/info", pressreleases.Info)
|
||||||
pressreleasesRouteLogin.POST("/list", pressreleases.List)
|
pressreleasesRouteLogin.POST("/list", pressreleases.List)
|
||||||
pressreleasesRouteLogin.POST("", pressreleases.Create)
|
pressreleasesRouteLogin.POST("", pressreleases.Create)
|
||||||
pressreleasesRouteLogin.POST("/edit", pressreleases.Edit)
|
pressreleasesRouteLogin.POST("/edit", pressreleases.Edit)
|
||||||
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/sortAndStatus", reports.AnnualReportSortAndStatus)
|
||||||
|
reportsRouteLogin.POST("/annual/info", reports.AnnualReportInfo)
|
||||||
|
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/sortAndStatus", reports.QuarterlyReportSortAndStatus)
|
||||||
|
reportsRouteLogin.POST("/quarterly/info", reports.QuarterlyReportInfo)
|
||||||
|
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("/management/add", members.AddManagement)
|
||||||
|
membersRouteLogin.POST("/management/list", members.GetManagementList)
|
||||||
|
membersRouteLogin.POST("/management/info", members.GetManagementInfo)
|
||||||
|
membersRouteLogin.POST("/management/delete", members.DeleteManagement)
|
||||||
|
membersRouteLogin.POST("/management/updata", members.UpdataManagement)
|
||||||
|
membersRouteLogin.POST("/management/edit", members.EditManagement)
|
||||||
|
membersRoute.POST("/management/display", middleware.Cors(), members.DisplayManagement)
|
||||||
|
// 董事会信息管理
|
||||||
|
membersRouteLogin.POST("/boardofdirectors/add", members.AddBoardOfDirectors)
|
||||||
|
membersRouteLogin.POST("/boardofdirectors/list", members.GetBoardOfDirectorsList)
|
||||||
|
membersRouteLogin.POST("/boardofdirectors/info", members.GetBoardOfDirectorsInfo)
|
||||||
|
membersRouteLogin.POST("/boardofdirectors/delete", members.DeleteBoardOfDirectors)
|
||||||
|
membersRouteLogin.POST("/boardofdirectors/updata", members.UpdataBoardOfDirectors)
|
||||||
|
membersRouteLogin.POST("/boardofdirectors/edit", members.EditBoardOfDirectors)
|
||||||
|
membersRoute.POST("/boardofdirectors/display", middleware.Cors(), members.DisplayBoardOfDirectors)
|
||||||
|
// 委员会任命管理
|
||||||
|
membersRouteLogin.POST("/committeeappointments/add", members.AddCommitteeAppointments)
|
||||||
|
membersRouteLogin.POST("/committeeappointments/list", members.GetCommitteeAppointmentsList)
|
||||||
|
membersRouteLogin.POST("/committeeappointments/info", members.GetCommitteeAppointmentsInfo)
|
||||||
|
membersRouteLogin.POST("/committeeappointments/delete", members.DeleteCommitteeAppointments)
|
||||||
|
membersRouteLogin.POST("/committeeappointments/updata", members.UpdataCommitteeAppointments)
|
||||||
|
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))
|
||||||
|
|||||||
35
pkg/router/supplier.go
Normal file
35
pkg/router/supplier.go
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
package router
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fonchain-fiee/pkg/middleware"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
"fonchain-fiee/pkg/service/supplier"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SupplierRouter(r *gin.RouterGroup) {
|
||||||
|
|
||||||
|
supplierRoute := r.Group("supplier/web")
|
||||||
|
|
||||||
|
supplierRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||||
|
{
|
||||||
|
supplierRoute.POST("info", supplier.GetSupplier)
|
||||||
|
supplierRoute.POST("create", supplier.CreateSupplier)
|
||||||
|
supplierRoute.POST("update", supplier.UpdateSupplier)
|
||||||
|
supplierRoute.POST("list", supplier.GetSupplierList)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
supplierRoute.POST("dictionary/create", supplier.CreateOrganizeDictionary)
|
||||||
|
supplierRoute.POST("dictionary/list", supplier.GetOrganizeDictionaryList)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
supplierRoute.POST("country-region/list", supplier.GetCountryRegionList)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
supplierRoute.POST("import/record", supplier.CreateImportRecord)
|
||||||
|
supplierRoute.POST("import/info", supplier.GetImportRecordInfo)
|
||||||
|
supplierRoute.POST("export/list", supplier.GetExportList)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -188,6 +188,26 @@ func CheckIdOcr(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func WriteOff(c *gin.Context) {
|
||||||
|
|
||||||
|
var req account.WriteOffRequest
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
user := login.GetUserInfoFromC(c)
|
||||||
|
|
||||||
|
res, err := service.AccountFieeProvider.WriteOff(c, &account.WriteOffRequest{
|
||||||
|
Id: user.ID,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取身份证OCR识别结果
|
* 获取身份证OCR识别结果
|
||||||
* @param realIDImgA string - 身份证图片的URL地址
|
* @param realIDImgA string - 身份证图片的URL地址
|
||||||
@ -272,6 +292,11 @@ func SendMsg(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
req.Project = "fiee"
|
req.Project = "fiee"
|
||||||
req.TelNum = req.Zone + req.TelNum
|
req.TelNum = req.Zone + req.TelNum
|
||||||
|
//todo 审核使用账号
|
||||||
|
if req.TelNum == "8618888888888" {
|
||||||
|
service.Success1(c, "发送成功", &account.SendMsgStatusResponse{})
|
||||||
|
return
|
||||||
|
}
|
||||||
if req.Zone != e.ZoneCn && req.Zone != "" {
|
if req.Zone != e.ZoneCn && req.Zone != "" {
|
||||||
// ============================== redis检查ip开始
|
// ============================== redis检查ip开始
|
||||||
ip := c.ClientIP()
|
ip := c.ClientIP()
|
||||||
@ -316,7 +341,6 @@ func SendMsg(c *gin.Context) {
|
|||||||
//cache.RedisClient.Incr(daykey)
|
//cache.RedisClient.Incr(daykey)
|
||||||
//cache.RedisClient.Incr(minutekey)
|
//cache.RedisClient.Incr(minutekey)
|
||||||
// ============================== redis检查ip结束
|
// ============================== redis检查ip结束
|
||||||
|
|
||||||
tempReq := &account.SendNationMsgRequest{
|
tempReq := &account.SendNationMsgRequest{
|
||||||
Domain: req.Domain,
|
Domain: req.Domain,
|
||||||
TelNum: req.TelNum,
|
TelNum: req.TelNum,
|
||||||
@ -509,6 +533,10 @@ func UserRegister(c *gin.Context) {
|
|||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if tokenInfo.AccountInfo.WriteOff == true {
|
||||||
|
service.Error(c, errors.New("此账号已注销,无法登录"))
|
||||||
|
return
|
||||||
|
}
|
||||||
res.Token = tokenInfo.Token
|
res.Token = tokenInfo.Token
|
||||||
service.Success(c, res)
|
service.Success(c, res)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -452,6 +452,7 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
|
|||||||
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间",
|
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间",
|
||||||
"套餐金额", "增值服务金额", "支付金额", "币种", "手续费",
|
"套餐金额", "增值服务金额", "支付金额", "币种", "手续费",
|
||||||
"套餐视频总数", "增值服务视频总数", "套餐视频单价", "增值视频单价",
|
"套餐视频总数", "增值服务视频总数", "套餐视频单价", "增值视频单价",
|
||||||
|
"当月消耗套餐金额($)", "当月消耗增值金额($)",
|
||||||
"套餐账号总数", "增值账号总数", "套餐账号使用数", "增值账号使用数",
|
"套餐账号总数", "增值账号总数", "套餐账号使用数", "增值账号使用数",
|
||||||
"当前可用套餐视频数", "当前可用增值视频数", "当前已用套餐视频数", "当前已用增值视频数", "当前作废套餐视频数", "当前作废增值视频数", "当月新增可用套餐视频数", "当月新增可用增值视频数", "当月使用套餐视频数", "当月使用增值视频数", "当月作废套餐视频数", "当月作废增值视频数",
|
"当前可用套餐视频数", "当前可用增值视频数", "当前已用套餐视频数", "当前已用增值视频数", "当前作废套餐视频数", "当前作废增值视频数", "当月新增可用套餐视频数", "当月新增可用增值视频数", "当月使用套餐视频数", "当月使用增值视频数", "当月作废套餐视频数", "当月作废增值视频数",
|
||||||
"当前可用套餐图文数", "当前可用增值图文数", "当前已用套餐图文数", "当前已用增值图文数", "当前作废套餐图文数", "当前作废增值图文数", "当月新增可用套餐图文数", "当月新增可用增值图文数", "当月使用套餐图文数", "当月使用增值图文数", "当月作废套餐图文数", "当月作废增值图文数",
|
"当前可用套餐图文数", "当前可用增值图文数", "当前已用套餐图文数", "当前已用增值图文数", "当前作废套餐图文数", "当前作废增值图文数", "当月新增可用套餐图文数", "当月新增可用增值图文数", "当月使用套餐图文数", "当月使用增值图文数", "当月作废套餐图文数", "当月作废增值图文数",
|
||||||
@ -494,64 +495,76 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
|
|||||||
_ = write(13, fmt.Sprintf("%.2f", it.BundleVideoUnitPrice))
|
_ = write(13, fmt.Sprintf("%.2f", it.BundleVideoUnitPrice))
|
||||||
_ = write(14, fmt.Sprintf("%.2f", it.IncreaseVideoUnitPrice))
|
_ = write(14, fmt.Sprintf("%.2f", it.IncreaseVideoUnitPrice))
|
||||||
|
|
||||||
|
// 当月视频消耗金额($)
|
||||||
|
monthlyBundleVideoConsumptionPrice, err := strconv.ParseFloat(it.MonthlyBundleVideoConsumptionPrice, 64)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
monthlyIncreaseVideoConsumptionPrice, err := strconv.ParseFloat(it.MonthlyIncreaseVideoConsumptionPrice, 64)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
_ = write(15, fmt.Sprintf("%.2f", monthlyBundleVideoConsumptionPrice))
|
||||||
|
_ = write(16, fmt.Sprintf("%.2f", monthlyIncreaseVideoConsumptionPrice))
|
||||||
|
|
||||||
// 账号类
|
// 账号类
|
||||||
_ = write(15, int(it.BundleAccountNumber))
|
_ = write(17, int(it.BundleAccountNumber))
|
||||||
_ = write(16, int(it.IncreaseAccountNumber))
|
_ = write(18, int(it.IncreaseAccountNumber))
|
||||||
_ = write(17, int(it.BundleAccountConsumptionNumber))
|
_ = write(19, int(it.BundleAccountConsumptionNumber))
|
||||||
_ = write(18, int(it.IncreaseAccountConsumptionNumber))
|
_ = write(20, int(it.IncreaseAccountConsumptionNumber))
|
||||||
|
|
||||||
// 视频类
|
// 视频类
|
||||||
_ = write(19, int(it.MonthlyBundleVideoNumber))
|
_ = write(21, int(it.MonthlyBundleVideoNumber))
|
||||||
_ = write(20, int(it.MonthlyIncreaseVideoNumber))
|
_ = write(22, int(it.MonthlyIncreaseVideoNumber))
|
||||||
_ = write(21, int(it.BundleVideoConsumptionNumber))
|
_ = write(23, int(it.BundleVideoConsumptionNumber))
|
||||||
_ = write(22, int(it.IncreaseVideoConsumptionNumber))
|
_ = write(24, int(it.IncreaseVideoConsumptionNumber))
|
||||||
_ = write(23, int(it.InvalidBundleVideoNumber))
|
_ = write(25, int(it.InvalidBundleVideoNumber))
|
||||||
_ = write(24, int(it.InvalidIncreaseVideoNumber))
|
_ = write(26, int(it.InvalidIncreaseVideoNumber))
|
||||||
_ = write(25, int(it.MonthlyNewBundleVideoNumber))
|
_ = write(27, int(it.MonthlyNewBundleVideoNumber))
|
||||||
_ = write(26, int(it.MonthlyNewIncreaseVideoNumber))
|
_ = write(28, int(it.MonthlyNewIncreaseVideoNumber))
|
||||||
_ = write(27, int(it.MonthlyBundleVideoConsumptionNumber))
|
_ = write(29, int(it.MonthlyBundleVideoConsumptionNumber))
|
||||||
_ = write(28, int(it.MonthlyIncreaseVideoConsumptionNumber))
|
_ = write(30, int(it.MonthlyIncreaseVideoConsumptionNumber))
|
||||||
_ = write(29, int(it.MonthlyInvalidBundleVideoNumber))
|
_ = write(31, int(it.MonthlyInvalidBundleVideoNumber))
|
||||||
_ = write(30, int(it.MonthlyInvalidIncreaseVideoNumber))
|
_ = write(32, int(it.MonthlyInvalidIncreaseVideoNumber))
|
||||||
|
|
||||||
// 图文类
|
// 图文类
|
||||||
_ = write(31, int(it.MonthlyBundleImageNumber))
|
_ = write(33, int(it.MonthlyBundleImageNumber))
|
||||||
_ = write(32, int(it.MonthlyIncreaseImageNumber))
|
_ = write(34, int(it.MonthlyIncreaseImageNumber))
|
||||||
_ = write(33, int(it.BundleImageConsumptionNumber))
|
_ = write(35, int(it.BundleImageConsumptionNumber))
|
||||||
_ = write(34, int(it.IncreaseImageConsumptionNumber))
|
_ = write(36, int(it.IncreaseImageConsumptionNumber))
|
||||||
_ = write(35, int(it.InvalidBundleImageNumber))
|
_ = write(37, int(it.InvalidBundleImageNumber))
|
||||||
_ = write(36, int(it.InvalidIncreaseImageNumber))
|
_ = write(38, int(it.InvalidIncreaseImageNumber))
|
||||||
_ = write(37, int(it.MonthlyNewBundleImageNumber))
|
_ = write(39, int(it.MonthlyNewBundleImageNumber))
|
||||||
_ = write(38, int(it.MonthlyNewIncreaseImageNumber))
|
_ = write(40, int(it.MonthlyNewIncreaseImageNumber))
|
||||||
_ = write(39, int(it.MonthlyBundleImageConsumptionNumber))
|
_ = write(41, int(it.MonthlyBundleImageConsumptionNumber))
|
||||||
_ = write(40, int(it.MonthlyIncreaseImageConsumptionNumber))
|
_ = write(42, int(it.MonthlyIncreaseImageConsumptionNumber))
|
||||||
_ = write(41, int(it.MonthlyInvalidBundleImageNumber))
|
_ = write(43, int(it.MonthlyInvalidBundleImageNumber))
|
||||||
_ = write(42, int(it.MonthlyInvalidIncreaseImageNumber))
|
_ = write(44, int(it.MonthlyInvalidIncreaseImageNumber))
|
||||||
|
|
||||||
// 数据分析类
|
// 数据分析类
|
||||||
_ = write(43, int(it.MonthlyBundleDataAnalysisNumber))
|
_ = write(45, int(it.MonthlyBundleDataAnalysisNumber))
|
||||||
_ = write(44, int(it.MonthlyIncreaseDataAnalysisNumber))
|
_ = write(46, int(it.MonthlyIncreaseDataAnalysisNumber))
|
||||||
_ = write(45, int(it.BundleDataAnalysisConsumptionNumber))
|
_ = write(47, int(it.BundleDataAnalysisConsumptionNumber))
|
||||||
_ = write(46, int(it.IncreaseDataAnalysisConsumptionNumber))
|
_ = write(48, int(it.IncreaseDataAnalysisConsumptionNumber))
|
||||||
_ = write(47, int(it.InvalidBundleDataAnalysisNumber))
|
_ = write(49, int(it.InvalidBundleDataAnalysisNumber))
|
||||||
_ = write(48, int(it.InvalidIncreaseDataAnalysisNumber))
|
_ = write(50, int(it.InvalidIncreaseDataAnalysisNumber))
|
||||||
_ = write(49, int(it.MonthlyNewBundleDataAnalysisNumber))
|
_ = write(51, int(it.MonthlyNewBundleDataAnalysisNumber))
|
||||||
_ = write(50, int(it.MonthlyNewIncreaseDataAnalysisNumber))
|
_ = write(52, int(it.MonthlyNewIncreaseDataAnalysisNumber))
|
||||||
_ = write(51, int(it.MonthlyBundleDataAnalysisConsumptionNumber))
|
_ = write(53, int(it.MonthlyBundleDataAnalysisConsumptionNumber))
|
||||||
_ = write(52, int(it.MonthlyIncreaseDataAnalysisConsumptionNumber))
|
_ = write(54, int(it.MonthlyIncreaseDataAnalysisConsumptionNumber))
|
||||||
_ = write(53, int(it.MonthlyInvalidBundleDataAnalysisNumber))
|
_ = write(55, int(it.MonthlyInvalidBundleDataAnalysisNumber))
|
||||||
_ = write(54, int(it.MonthlyInvalidIncreaseDataAnalysisNumber))
|
_ = write(56, int(it.MonthlyInvalidIncreaseDataAnalysisNumber))
|
||||||
|
|
||||||
// 手动扩展类
|
// 手动扩展类
|
||||||
_ = write(55, int(it.MonthlyNewManualAccountNumber))
|
_ = write(57, int(it.MonthlyNewManualAccountNumber))
|
||||||
_ = write(56, int(it.MonthlyNewManualVideoNumber))
|
_ = write(58, int(it.MonthlyNewManualVideoNumber))
|
||||||
_ = write(57, int(it.MonthlyNewManualImageNumber))
|
_ = write(59, int(it.MonthlyNewManualImageNumber))
|
||||||
_ = write(58, int(it.MonthlyNewManualDataAnalysisNumber))
|
_ = write(60, int(it.MonthlyNewManualDataAnalysisNumber))
|
||||||
_ = write(59, int(it.MonthlyNewDurationNumber))
|
_ = write(61, int(it.MonthlyNewDurationNumber))
|
||||||
_ = write(60, int(it.MonthlyManualAccountConsumptionNumber))
|
_ = write(62, int(it.MonthlyManualAccountConsumptionNumber))
|
||||||
_ = write(61, int(it.MonthlyManualVideoConsumptionNumber))
|
_ = write(63, int(it.MonthlyManualVideoConsumptionNumber))
|
||||||
_ = write(62, int(it.MonthlyManualImageConsumptionNumber))
|
_ = write(64, int(it.MonthlyManualImageConsumptionNumber))
|
||||||
_ = write(63, int(it.MonthlyManualDataAnalysisConsumptionNumber))
|
_ = write(65, int(it.MonthlyManualDataAnalysisConsumptionNumber))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,7 +584,7 @@ func GetAccountBundleBalance(c *gin.Context) {
|
|||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
req.Month = time.Now().Format("2006-01")
|
req.Month = []string{time.Now().Format("2006-01")}
|
||||||
res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req)
|
res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(c, errors.New(common.GetBundleBalanceListFailed))
|
service.Error(c, errors.New(common.GetBundleBalanceListFailed))
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/duke-git/lancet/v2/datetime"
|
|
||||||
"github.com/shopspring/decimal"
|
"github.com/shopspring/decimal"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@ -257,11 +256,9 @@ func MetricsVideoSubmitExport(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
newCtx := serviceCast.NewCtxWithUserInfo(ctx)
|
newCtx := serviceCast.NewCtxWithUserInfo(ctx)
|
||||||
t, err := time.Parse("2006-01", req.Month)
|
if len(req.Month) > 0 {
|
||||||
if err == nil {
|
|
||||||
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
||||||
SubmitStartTime: datetime.BeginOfMonth(t).Format(time.DateTime),
|
SubmitTimeMonths: req.Month,
|
||||||
SubmitEndTime: datetime.EndOfMonth(t).Format(time.DateTime),
|
|
||||||
Page: 1,
|
Page: 1,
|
||||||
PageSize: 99999,
|
PageSize: 99999,
|
||||||
})
|
})
|
||||||
|
|||||||
40
pkg/service/cast/images.go
Normal file
40
pkg/service/cast/images.go
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fonchain-fiee/api/cast"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
)
|
||||||
|
|
||||||
|
func CheckImage(workUuid string) error {
|
||||||
|
detailResp, err := service.CastProvider.WorkDetail(context.Background(), &cast.WorkDetailReq{WorkUuid: workUuid})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if detailResp.CoverUrl == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if detailResp.WorkCategory == 1 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
resourceResp, err := service.CastProvider.WorkResource(context.Background(), &cast.WorkResourceReq{WorkUuid: workUuid})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if detailResp.CoverUrl == resourceResp.OldCoverUrl {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
mediaUrls, err := ProcessImg([]string{detailResp.CoverUrl})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if len(mediaUrls) > 0 {
|
||||||
|
_, _ = service.CastProvider.UpdateWorkResource(context.Background(), &cast.UpdateWorkResourceReq{
|
||||||
|
Uuid: "",
|
||||||
|
WorkUuid: detailResp.WorkUuid,
|
||||||
|
OldCoverUrl: detailResp.CoverUrl,
|
||||||
|
NewCoverUrl: mediaUrls[0],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@ -169,7 +169,7 @@ func UpdateMediaAccount(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
if userResp != nil && len(userResp.Data) > 0 {
|
if userResp != nil && len(userResp.Data) > 0 {
|
||||||
for _, v := range userResp.Data {
|
for _, v := range userResp.Data {
|
||||||
if v.PlatformID == uint32(req.PlatformID) {
|
if v.PlatformID == uint32(req.PlatformID) && v.Expired == 1 {
|
||||||
service.Error(ctx, errors.New("账号已存在"))
|
service.Error(ctx, errors.New("账号已存在"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -258,6 +258,10 @@ func OAuthAccount(ctx *gin.Context) {
|
|||||||
service.Error(ctx, errors.New("未找到该账号"))
|
service.Error(ctx, errors.New("未找到该账号"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if mediaResp.Data[0].Expired != 1 {
|
||||||
|
service.Error(ctx, errors.New("账号已过期"))
|
||||||
|
return
|
||||||
|
}
|
||||||
if err = SyncAsAuth(mediaResp.Data[0].ArtistUuid); err != nil {
|
if err = SyncAsAuth(mediaResp.Data[0].ArtistUuid); err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
|
|||||||
440
pkg/service/cast/tag.go
Normal file
440
pkg/service/cast/tag.go
Normal file
@ -0,0 +1,440 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"fonchain-fiee/api/aryshare"
|
||||||
|
"fonchain-fiee/api/cast"
|
||||||
|
"fonchain-fiee/cmd/config"
|
||||||
|
"fonchain-fiee/pkg/model/login"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
"fonchain-fiee/pkg/utils"
|
||||||
|
"math/rand"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/xuri/excelize/v2"
|
||||||
|
"go.uber.org/zap"
|
||||||
|
"google.golang.org/protobuf/types/known/emptypb"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateCastTag 更新话题标签
|
||||||
|
func UpdateCastTag(ctx *gin.Context) {
|
||||||
|
var req *cast.UpdateCastTagReq
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err := service.CastProvider.UpdateCastTag(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListCastTags 获取话题标签列表
|
||||||
|
func ListCastTags(ctx *gin.Context) {
|
||||||
|
var req *cast.ListCastTagsReq
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err := service.CastProvider.ListCastTags(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// ImportTagBatch 批量导入话题标签
|
||||||
|
func ImportTagBatch(ctx *gin.Context) {
|
||||||
|
// 接收form表单的Excel保存到本地进行解析
|
||||||
|
excelFile, err := ctx.FormFile("file")
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
tempDir := "./runtime/tag"
|
||||||
|
_, err = utils.CheckDirPath(tempDir, true)
|
||||||
|
fileName := time.Now().Format("20060102150405") + "_in_tag.xlsx"
|
||||||
|
excelPath := filepath.Join(tempDir, fileName)
|
||||||
|
if err = ctx.SaveUploadedFile(excelFile, excelPath); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 读取Excel中的数据
|
||||||
|
excelData, err := excelize.OpenFile(excelPath)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer excelData.Close()
|
||||||
|
// 解析Excel中的数据
|
||||||
|
rows, err := excelData.GetRows("Sheet1")
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
req := cast.UpdateCastTagBatchReq{
|
||||||
|
Data: make([]*cast.CastTagInfo, 0),
|
||||||
|
}
|
||||||
|
userInfo := login.GetUserInfoFromC(ctx)
|
||||||
|
for line, row := range rows {
|
||||||
|
if line == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
temp := cast.CastTagInfo{
|
||||||
|
CreatorUuid: fmt.Sprint(userInfo.ID),
|
||||||
|
CreatorName: userInfo.Name,
|
||||||
|
Source: 1, // 固定来源:人工导入
|
||||||
|
Status: 1, // 固定状态:有效
|
||||||
|
}
|
||||||
|
// 解析Excel列:A-话题标签,B-备注
|
||||||
|
if len(row) > 0 {
|
||||||
|
temp.HashTag = strings.TrimSpace(row[0])
|
||||||
|
}
|
||||||
|
if len(row) > 1 {
|
||||||
|
temp.Remark = strings.TrimSpace(row[1])
|
||||||
|
}
|
||||||
|
zap.L().Info("ImportTagBatch row", zap.Int("line", line), zap.Strings("row", row))
|
||||||
|
// 验证必填字段:话题标签不能为空
|
||||||
|
if utils.CleanString(temp.HashTag) == "" {
|
||||||
|
temp.Remark = "必填项未填"
|
||||||
|
req.Data = append(req.Data, &temp)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
req.Data = append(req.Data, &temp)
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, _err := service.CastProvider.UpdateCastTagBatch(newCtx, &req)
|
||||||
|
if _err != nil {
|
||||||
|
service.Error(ctx, _err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 打开模板 写入resp 返回的数据
|
||||||
|
templatePath := "./data/话题标签导入模板.xlsx"
|
||||||
|
template, err := excelize.OpenFile(templatePath)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer template.Close()
|
||||||
|
var urlResult string
|
||||||
|
if resp.FailCount != 0 {
|
||||||
|
rowIndex := 2 // 从第2行开始写入(第1行是表头)
|
||||||
|
for _, v := range resp.Data {
|
||||||
|
if v.Success {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// 写入失败的数据到Excel模板(只写入话题标签和备注两列)
|
||||||
|
template.SetCellValue("Sheet1", fmt.Sprintf("A%d", rowIndex), v.HashTag)
|
||||||
|
template.SetCellValue("Sheet1", fmt.Sprintf("B%d", rowIndex), v.Remark)
|
||||||
|
rowIndex++
|
||||||
|
}
|
||||||
|
resultFilename := strings.Replace(fileName, "_in_tag.xlsx", "_out_tag.xlsx", -1)
|
||||||
|
resultPath := fmt.Sprintf("./runtime/tag/%s", resultFilename)
|
||||||
|
if err = template.SaveAs(resultPath); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
urlHost := config.AppConfig.System.FieeHost
|
||||||
|
urlResult = fmt.Sprintf("%s/api/fiee/static/tag/%s", urlHost, resultFilename)
|
||||||
|
}
|
||||||
|
|
||||||
|
service.Success(ctx, map[string]interface{}{
|
||||||
|
"successCount": resp.SuccessCount,
|
||||||
|
"failCount": resp.FailCount,
|
||||||
|
"resultUrl": urlResult,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// RecalculateCastTagQuoteCount 重新计算话题标签引用数量
|
||||||
|
func RecalculateCastTagQuoteCount(ctx *gin.Context) {
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
// 创建空的请求对象
|
||||||
|
req := &emptypb.Empty{}
|
||||||
|
resp, err := service.CastProvider.RecalculateCastTagQuoteCount(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// findNewTags 对比两次标签,找出新增的标签
|
||||||
|
func findNewTags(beforeTags, afterTags []string) []string {
|
||||||
|
// 将 beforeTags 转换为 map,方便查找
|
||||||
|
beforeMap := make(map[string]bool)
|
||||||
|
for _, tag := range beforeTags {
|
||||||
|
cleanTag := strings.TrimSpace(tag)
|
||||||
|
if cleanTag != "" {
|
||||||
|
beforeMap[cleanTag] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 找出 afterTags 中不在 beforeTags 中的标签
|
||||||
|
newTags := make([]string, 0)
|
||||||
|
for _, tag := range afterTags {
|
||||||
|
cleanTag := strings.TrimSpace(tag)
|
||||||
|
if cleanTag != "" && !beforeMap[cleanTag] {
|
||||||
|
newTags = append(newTags, cleanTag)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return newTags
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetValidProfileKey(ctx context.Context, platformIDs []uint32) (string, error) {
|
||||||
|
if len(platformIDs) == 0 {
|
||||||
|
platformIDs = []uint32{1, 2, 3, 5}
|
||||||
|
}
|
||||||
|
profileKeys, err := service.CastProvider.GetArtistAyrShareInfoByPlatformIDs(ctx, &cast.GetArtistAyrShareInfoByPlatformIDsReq{
|
||||||
|
PlatformIDs: platformIDs,
|
||||||
|
Page: 1,
|
||||||
|
PageSize: 20,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("GetArtistAyrShareInfoByPlatformIDs failed", zap.Error(err))
|
||||||
|
return "", errors.New("获取有效profileKey失败")
|
||||||
|
}
|
||||||
|
if len(profileKeys.Data) == 0 {
|
||||||
|
return "", errors.New("当前没有有效的profileKey")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 过滤出所有非空的 profileKey
|
||||||
|
validProfileKeys := make([]string, 0)
|
||||||
|
for _, item := range profileKeys.Data {
|
||||||
|
if item.ProfileKey != "" {
|
||||||
|
validProfileKeys = append(validProfileKeys, item.ProfileKey)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(validProfileKeys) == 0 {
|
||||||
|
return "", errors.New("profileKey为空")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从有效的 profileKey 中随机选择一个
|
||||||
|
randIndex := rand.Intn(len(validProfileKeys))
|
||||||
|
return validProfileKeys[randIndex], nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SaveTagsToDatabase 将标签保存到数据库
|
||||||
|
func SaveTagsToDatabase(ctx *gin.Context, tags []string, source uint32) error {
|
||||||
|
if len(tags) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取用户信息
|
||||||
|
userInfo := login.GetUserInfoFromC(ctx)
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
|
||||||
|
// 构建批量导入请求
|
||||||
|
req := cast.UpdateCastTagBatchReq{
|
||||||
|
Data: make([]*cast.CastTagInfo, 0, len(tags)),
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tag := range tags {
|
||||||
|
tagInfo := &cast.CastTagInfo{
|
||||||
|
HashTag: tag,
|
||||||
|
CreatorUuid: fmt.Sprint(userInfo.ID),
|
||||||
|
CreatorName: userInfo.Name,
|
||||||
|
Source: source, // 4: 自动标签(从内容中自动提取)
|
||||||
|
Status: 1, // 1: 有效
|
||||||
|
}
|
||||||
|
req.Data = append(req.Data, tagInfo)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用批量导入接口
|
||||||
|
_, err := service.CastProvider.UpdateCastTagBatch(newCtx, &req)
|
||||||
|
if err != nil {
|
||||||
|
err = errors.New("标签保存到数据库失败")
|
||||||
|
zap.L().Error("SaveTagsToDatabase UpdateCastTagBatch failed", zap.Error(err))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
zap.L().Info("SaveTagsToDatabase success", zap.Int("tagCount", len(tags)), zap.Strings("tags", tags), zap.Uint32("source", source))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func GenerateAutoHashtags(ctx context.Context, post string, max int32, position, language string) (*aryshare.AutoHashtagsResponse, []string, bool, error) {
|
||||||
|
// 验证帖子内容
|
||||||
|
if post == "" {
|
||||||
|
return nil, nil, false, errors.New("帖子内容不能为空")
|
||||||
|
}
|
||||||
|
// post 的长度不能超过1000个字符
|
||||||
|
if len(post) > 1000 {
|
||||||
|
return nil, nil, false, errors.New("自动生成标签的帖子内容不能超过1000个字符")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取生成前的标签
|
||||||
|
beforeTags := utils.ExtractTags(post)
|
||||||
|
zap.L().Info("GenerateAutoHashtags beforeTags", zap.Strings("beforeTags", beforeTags))
|
||||||
|
|
||||||
|
// 如果标签数量已经达到或超过5个,不需要生成
|
||||||
|
if len(beforeTags) >= 5 {
|
||||||
|
return nil, nil, false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置默认值
|
||||||
|
if position == "" {
|
||||||
|
position = "end"
|
||||||
|
}
|
||||||
|
if language == "" {
|
||||||
|
language = "zh"
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果 max 为0,则根据现有标签数自动计算,确保总数为5
|
||||||
|
if max == 0 {
|
||||||
|
max = int32(5 - len(beforeTags))
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果此时 max 小于等于0,则直接返回
|
||||||
|
if max <= 0 {
|
||||||
|
return nil, nil, false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
profileKey, err := GetValidProfileKey(ctx, []uint32{1, 2, 3, 5})
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建请求
|
||||||
|
req := &aryshare.AutoHashtagsRequest{
|
||||||
|
Post: post,
|
||||||
|
Max: max,
|
||||||
|
Position: position,
|
||||||
|
Language: language,
|
||||||
|
ProfileKey: profileKey,
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用 Ayrshare 的 AutoHashtags 接口
|
||||||
|
resp, err := service.AyrshareProvider.AutoHashtags(ctx, req)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("AutoHashtags failed", zap.Error(err))
|
||||||
|
return nil, nil, false, errors.New("自动生成标签失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
if resp.Post == "" {
|
||||||
|
return nil, nil, false, errors.New("自动生成标签返回的帖子内容为空")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 去掉自动标签返回的帖子内容多余的引号
|
||||||
|
resp.Post = utils.CleanAutoHashtagsQuote(resp.Post)
|
||||||
|
|
||||||
|
// 提取生成后的标签
|
||||||
|
afterTags := utils.ExtractTags(resp.Post)
|
||||||
|
zap.L().Info("GenerateAutoHashtags afterTags", zap.Strings("afterTags", afterTags))
|
||||||
|
|
||||||
|
// 对比两次标签,找出新增的标签
|
||||||
|
newTags := findNewTags(beforeTags, afterTags)
|
||||||
|
|
||||||
|
return resp, newTags, true, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// AutoHashtags 自动生成标签
|
||||||
|
func AutoHashtags(ctx *gin.Context) {
|
||||||
|
var req *aryshare.AutoHashtagsRequest
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用核心逻辑生成标签
|
||||||
|
resp, newTags, needMore, err := GenerateAutoHashtags(
|
||||||
|
context.Background(),
|
||||||
|
req.Post,
|
||||||
|
req.Max,
|
||||||
|
req.Position,
|
||||||
|
req.Language,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果标签已满5个,直接返回
|
||||||
|
if !needMore {
|
||||||
|
service.Success(ctx, map[string]interface{}{
|
||||||
|
"message": "当前帖子的标签已经有5个了",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存新增的标签到数据库,Source 设置为 4(自动标签)
|
||||||
|
if len(newTags) > 0 {
|
||||||
|
if err = SaveTagsToDatabase(ctx, newTags, 4); err != nil {
|
||||||
|
zap.L().Error("SaveTagsToDatabase failed", zap.Error(err), zap.Strings("newTags", newTags))
|
||||||
|
err = errors.New("标签保存到数据库失败")
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// RecommendHashtags 推荐标签
|
||||||
|
func RecommendHashtags(ctx *gin.Context) {
|
||||||
|
var req *aryshare.RecommendHashtagsRequest
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
profileKey, err := GetValidProfileKey(context.Background(), []uint32{1})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
req.ProfileKey = profileKey
|
||||||
|
resp, err := service.AyrshareProvider.RecommendHashtags(context.Background(), req)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("err", err)
|
||||||
|
zap.L().Error("RecommendHashtags failed", zap.Error(err))
|
||||||
|
err = errors.New("推荐标签失败")
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// SearchHashtags 搜索标签
|
||||||
|
func SearchHashtags(ctx *gin.Context) {
|
||||||
|
var req *aryshare.SearchHashtagsRequest
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
profileKey, err := GetValidProfileKey(context.Background(), []uint32{3})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
req.ProfileKey = profileKey
|
||||||
|
resp, err := service.AyrshareProvider.SearchHashtags(context.Background(), req)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("err", err)
|
||||||
|
err = errors.New("获取热门话题标签失败")
|
||||||
|
zap.L().Error("SearchHashtags failed", zap.Error(err))
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
@ -2,12 +2,23 @@ package cast
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"fonchain-fiee/cmd/config"
|
||||||
|
"fonchain-fiee/pkg/service/upload"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
|
modelCast "fonchain-fiee/pkg/model/cast"
|
||||||
"fonchain-fiee/pkg/model/login"
|
"fonchain-fiee/pkg/model/login"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/xuri/excelize/v2"
|
||||||
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TaskList(ctx *gin.Context) {
|
func TaskList(ctx *gin.Context) {
|
||||||
@ -42,5 +53,148 @@ func DeleteTasK(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
service.Success(ctx, resp)
|
service.Success(ctx, resp)
|
||||||
return
|
}
|
||||||
|
|
||||||
|
func DownloadTaskFile(ctx *gin.Context) {
|
||||||
|
var req *cast.GetTaskListReq
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.CastProvider.GetTaskList(context.Background(), req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp == nil || resp.Data == nil {
|
||||||
|
service.Error(ctx, errors.New("没有此任务"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var taskInfo modelCast.PublishTaskDto
|
||||||
|
if resp.Data.ExtraData != "" {
|
||||||
|
_ = json.Unmarshal([]byte(resp.Data.ExtraData), &taskInfo)
|
||||||
|
}
|
||||||
|
exportUrl, err := PublishTaskExcel(taskInfo.WorkUuids, false, resp.Data.Action)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, gin.H{
|
||||||
|
"url": exportUrl,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func PublishTaskExcel(workUuids []string, uploadOss bool, action string) (string, error) {
|
||||||
|
// 创建Excel文件
|
||||||
|
f := excelize.NewFile()
|
||||||
|
sheetName := "Sheet1"
|
||||||
|
f.SetSheetName("Sheet1", sheetName)
|
||||||
|
// 设置表头
|
||||||
|
headers := []interface{}{
|
||||||
|
"艺人编号", "艺人姓名", "内容类型", "内容标题",
|
||||||
|
"执行结果", "TIKTOK", "YOUTUBE", "INS", "DM", "BULESKY",
|
||||||
|
}
|
||||||
|
sw, err := f.NewStreamWriter(sheetName)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
if err = sw.SetRow("A1", headers); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
// 遍历所有作品,收集数据
|
||||||
|
rowIndex := 2
|
||||||
|
for _, workUuid := range workUuids {
|
||||||
|
var workResp *cast.WorkDetailResp
|
||||||
|
workResp, err = service.CastProvider.WorkDetail(context.Background(), &cast.WorkDetailReq{WorkUuid: workUuid})
|
||||||
|
if err != nil {
|
||||||
|
continue // 如果某个作品获取失败,跳过继续处理其他作品
|
||||||
|
}
|
||||||
|
// 内容类型
|
||||||
|
contentType := ""
|
||||||
|
if workResp.WorkCategory == 1 {
|
||||||
|
contentType = "图文"
|
||||||
|
} else if workResp.WorkCategory == 2 {
|
||||||
|
contentType = "视频"
|
||||||
|
}
|
||||||
|
// 执行结果
|
||||||
|
executionResult := modelCast.WorkStatusMM[int(workResp.WorkStatus)]
|
||||||
|
tiktokStatus := ""
|
||||||
|
youtubeStatus := ""
|
||||||
|
insStatus := ""
|
||||||
|
dmStatus := ""
|
||||||
|
blueskyStatus := ""
|
||||||
|
|
||||||
|
// 获取平台信息和艺人姓名
|
||||||
|
artistName := ""
|
||||||
|
var infoResp *cast.WorkInfoResp
|
||||||
|
infoResp, err = service.CastProvider.WorkInfo(context.Background(), &cast.WorkInfoReq{WorkUuid: workUuid})
|
||||||
|
if err == nil && infoResp != nil {
|
||||||
|
artistName = infoResp.ArtistName
|
||||||
|
if infoResp.PlatformInfoData != nil {
|
||||||
|
for _, platform := range infoResp.PlatformInfoData {
|
||||||
|
statusText := modelCast.PlatformPublishStatusMM[platform.PublishMediaStatus]
|
||||||
|
switch cast.PlatformIDENUM(platform.PlatformID) {
|
||||||
|
case cast.PlatformIDENUM_TIKTOK:
|
||||||
|
tiktokStatus = statusText
|
||||||
|
case cast.PlatformIDENUM_YOUTUBE:
|
||||||
|
youtubeStatus = statusText
|
||||||
|
case cast.PlatformIDENUM_INS:
|
||||||
|
insStatus = statusText
|
||||||
|
case cast.PlatformIDENUM_DM:
|
||||||
|
dmStatus = statusText
|
||||||
|
case cast.PlatformIDENUM_BULESKY:
|
||||||
|
blueskyStatus = statusText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
row := []interface{}{
|
||||||
|
workResp.ArtistSubNum,
|
||||||
|
artistName,
|
||||||
|
contentType,
|
||||||
|
workResp.Title,
|
||||||
|
executionResult,
|
||||||
|
tiktokStatus,
|
||||||
|
youtubeStatus,
|
||||||
|
insStatus,
|
||||||
|
dmStatus,
|
||||||
|
blueskyStatus,
|
||||||
|
}
|
||||||
|
cell, _ := excelize.CoordinatesToCellName(1, rowIndex)
|
||||||
|
if err = sw.SetRow(cell, row); err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
rowIndex++
|
||||||
|
}
|
||||||
|
if err = sw.Flush(); err != nil {
|
||||||
|
zap.L().Error("PublishTaskExcel Flush err", zap.Error(err))
|
||||||
|
return "", errors.New("生成Excel文件失败")
|
||||||
|
}
|
||||||
|
tempDir := "./runtime/task"
|
||||||
|
if _, err = os.Stat(tempDir); os.IsNotExist(err) {
|
||||||
|
if err = os.MkdirAll(tempDir, 0755); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TaskActionName, ok := modelCast.TaskActionName[action]
|
||||||
|
if !ok {
|
||||||
|
TaskActionName = "未知任务"
|
||||||
|
}
|
||||||
|
filename := fmt.Sprintf("%s_%s.xlsx", TaskActionName, time.Now().Format("20060102150405"))
|
||||||
|
filePath := tempDir + "/" + filename
|
||||||
|
var exportUrl string = fmt.Sprintf("%s/api/fiee/static/%s", config.AppConfig.System.FieeHost, strings.Replace(filePath, "./runtime/", "", 1))
|
||||||
|
if err = f.SaveAs(filePath); err != nil {
|
||||||
|
zap.L().Error("PublishTaskExcel SaveAs err", zap.Error(err))
|
||||||
|
return "", errors.New("保存Excel文件失败")
|
||||||
|
}
|
||||||
|
if uploadOss {
|
||||||
|
// 上传到阿里云
|
||||||
|
exportUrl, err = upload.PutBos(filePath, "excel", true)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return exportUrl, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,17 @@ import (
|
|||||||
|
|
||||||
func Test(ctx *gin.Context) {
|
func Test(ctx *gin.Context) {
|
||||||
action := ctx.PostForm("action")
|
action := ctx.PostForm("action")
|
||||||
|
if action == "" {
|
||||||
|
workUuid := ctx.PostForm("workUuid")
|
||||||
|
err := CheckImage(workUuid)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if action == "getPost" {
|
if action == "getPost" {
|
||||||
id := ctx.PostForm("id")
|
id := ctx.PostForm("id")
|
||||||
profileKey := ctx.PostForm("profileKey")
|
profileKey := ctx.PostForm("profileKey")
|
||||||
@ -70,19 +81,6 @@ func Test(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if action == "" {
|
|
||||||
profileKey := ctx.PostForm("profileKey")
|
|
||||||
resp, err := service.AyrshareProvider.GetUser(context.Background(), &aryshare.GetUserRequest{
|
|
||||||
ProfileKey: profileKey,
|
|
||||||
InstagramDetails: true,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
service.Error(ctx, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(ctx, resp)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if action == "getProfile" {
|
if action == "getProfile" {
|
||||||
//profileKey := ctx.PostForm("profileKey")
|
//profileKey := ctx.PostForm("profileKey")
|
||||||
resp, err := service.AyrshareProvider.GetProfiles(context.Background(), &aryshare.GetProfilesRequest{
|
resp, err := service.AyrshareProvider.GetProfiles(context.Background(), &aryshare.GetProfilesRequest{
|
||||||
@ -166,6 +164,16 @@ func Test(ctx *gin.Context) {
|
|||||||
service.Success(ctx, "ok")
|
service.Success(ctx, "ok")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if action == "RefreshWorkList" {
|
||||||
|
resp, err := service.CastProvider.RefreshWorkList(context.Background(), &cast.RefreshWorkListReq{PublishStatus: 1})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
service.Success(ctx, "unknow")
|
service.Success(ctx, "unknow")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import (
|
|||||||
"fonchain-fiee/pkg/service/check"
|
"fonchain-fiee/pkg/service/check"
|
||||||
"fonchain-fiee/pkg/service/upload"
|
"fonchain-fiee/pkg/service/upload"
|
||||||
"fonchain-fiee/pkg/utils"
|
"fonchain-fiee/pkg/utils"
|
||||||
|
utilsImg "fonchain-fiee/pkg/utils/img"
|
||||||
"fonchain-fiee/pkg/utils/stime"
|
"fonchain-fiee/pkg/utils/stime"
|
||||||
"image"
|
"image"
|
||||||
"image/jpeg"
|
"image/jpeg"
|
||||||
@ -109,11 +110,10 @@ func UpdateWorkImageCore(ctx *gin.Context, req *cast.UpdateWorkImageReq) (*cast.
|
|||||||
ID: artistId,
|
ID: artistId,
|
||||||
Domain: "app",
|
Domain: "app",
|
||||||
})
|
})
|
||||||
zap.L().Info("UpdateWorkImage infoResp", zap.Any("infoResp", infoResp))
|
zap.L().Info("UpdateWorkImage infoResp1", zap.Any("infoResp", infoResp))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
req.ArtistName = infoResp.Name
|
req.ArtistName = infoResp.Name
|
||||||
req.ArtistPhone = infoResp.TelNum
|
req.ArtistPhone = infoResp.TelNum
|
||||||
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
|
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
|
||||||
@ -122,11 +122,20 @@ func UpdateWorkImageCore(ctx *gin.Context, req *cast.UpdateWorkImageReq) (*cast.
|
|||||||
//if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil {
|
//if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil {
|
||||||
// return nil, err
|
// return nil, err
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
// 处理内容中的标签:提取、验证并批量导入,以及自动生成标签
|
||||||
|
content, err := processContentAndAutoTags(ctx, req.Content)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
// 将自动生成标签后的内容更新到请求中
|
||||||
|
req.Content = content
|
||||||
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))
|
zap.L().Info("UpdateWorkImage resp", zap.Any("resp", resp))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
zap.L().Error("UpdateWorkImage err", zap.Error(err))
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return resp, nil
|
return resp, nil
|
||||||
@ -170,6 +179,100 @@ func UpdateWorkImage(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func processContentTags(ctx *gin.Context, content string) error {
|
||||||
|
// 如果内容为空,直接返回
|
||||||
|
if content == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取标签
|
||||||
|
tags := utils.ExtractTags(content)
|
||||||
|
if len(tags) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第一步:检查标签格式(验证标签不为空且有效)
|
||||||
|
validTags := make([]string, 0, len(tags))
|
||||||
|
for _, tag := range tags {
|
||||||
|
// 去除空白字符后检查
|
||||||
|
cleanTag := strings.TrimSpace(tag)
|
||||||
|
if cleanTag != "" {
|
||||||
|
validTags = append(validTags, cleanTag)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果没有有效标签,直接返回
|
||||||
|
if len(validTags) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第二步:检查是否有重复的标签
|
||||||
|
tagMap := make(map[string]bool)
|
||||||
|
for _, tag := range validTags {
|
||||||
|
tagLower := strings.ToLower(tag)
|
||||||
|
if tagMap[tagLower] {
|
||||||
|
return errors.New("帖子标签不能重复")
|
||||||
|
}
|
||||||
|
tagMap[tagLower] = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第三步:检查标签数量是否超过5个
|
||||||
|
if len(validTags) > 5 {
|
||||||
|
return errors.New("帖子标签数量不能超过5个")
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("validTags", validTags)
|
||||||
|
|
||||||
|
// 第四步:调用 SaveTagsToDatabase 函数批量导入标签,Source 设置为 3(推荐标签)
|
||||||
|
if err := SaveTagsToDatabase(ctx, validTags, 3); err != nil {
|
||||||
|
zap.L().Error("processContentTags SaveTagsToDatabase failed", zap.Error(err))
|
||||||
|
return errors.New("批量导入标签失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
zap.L().Info("processContentTags success", zap.Int("tagCount", len(validTags)), zap.Strings("tags", validTags))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// processContentAndAutoTags 处理内容标签并自动生成标签
|
||||||
|
func processContentAndAutoTags(ctx *gin.Context, content string) (string, error) {
|
||||||
|
// 如果内容为空,直接返回
|
||||||
|
if content == "" {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
// 处理内容中的标签:提取、验证并批量导入
|
||||||
|
if err := processContentTags(ctx, content); err != nil {
|
||||||
|
return content, err
|
||||||
|
}
|
||||||
|
// 处理完内容标签后,自动生成标签并存入数据库
|
||||||
|
resp, newTags, needMore, err := GenerateAutoHashtags(
|
||||||
|
context.Background(),
|
||||||
|
content,
|
||||||
|
0, // max 为0时自动计算
|
||||||
|
"", // position 使用默认值
|
||||||
|
"", // language 使用默认值
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return content, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if resp == nil {
|
||||||
|
return content, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存新生成的标签到数据库
|
||||||
|
if needMore && len(newTags) > 0 {
|
||||||
|
if saveErr := SaveTagsToDatabase(ctx, newTags, 4); saveErr != nil {
|
||||||
|
zap.L().Error("processContentAndAutoTags SaveTagsToDatabase failed", zap.Error(saveErr))
|
||||||
|
return content, errors.New("自动生成标签保存到数据库失败")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 检查一下 resp.Post 是否为空
|
||||||
|
if resp.Post == "" {
|
||||||
|
return content, nil
|
||||||
|
}
|
||||||
|
return resp.Post, nil
|
||||||
|
}
|
||||||
|
|
||||||
// UpdateWorkVideoCore 更新作品视频的核心逻辑,可以被其他函数复用
|
// UpdateWorkVideoCore 更新作品视频的核心逻辑,可以被其他函数复用
|
||||||
func UpdateWorkVideoCore(ctx *gin.Context, req *cast.UpdateWorkVideoReq) (*cast.UpdateWorkVideoResp, error) {
|
func UpdateWorkVideoCore(ctx *gin.Context, req *cast.UpdateWorkVideoReq) (*cast.UpdateWorkVideoResp, error) {
|
||||||
var infoResp *accountFiee.UserInfoResponse
|
var infoResp *accountFiee.UserInfoResponse
|
||||||
@ -249,6 +352,15 @@ func UpdateWorkVideoCore(ctx *gin.Context, req *cast.UpdateWorkVideoReq) (*cast.
|
|||||||
req.ArtistPhone = infoResp.TelNum
|
req.ArtistPhone = infoResp.TelNum
|
||||||
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
|
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
|
||||||
req.ArtistSubNum = infoResp.SubNum
|
req.ArtistSubNum = infoResp.SubNum
|
||||||
|
|
||||||
|
// 处理内容中的标签:提取、验证并批量导入,以及自动生成标签
|
||||||
|
fmt.Println("UpdateWorkVideoCore: req.Content=", req.Content, "req.Title=", req.Title)
|
||||||
|
content, err := processContentAndAutoTags(ctx, req.Content)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
// 将自动生成标签后的内容更新到请求中
|
||||||
|
req.Content = content
|
||||||
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)
|
||||||
@ -434,10 +546,26 @@ func Publish(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
newCtx := NewCtxWithUserInfo(ctx)
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
loginInfo := login.GetUserInfoFromC(ctx)
|
||||||
|
var extraBytes []byte
|
||||||
|
extraBytes, _ = json.Marshal(req)
|
||||||
|
_, err = service.CastProvider.UpsertTaskList(newCtx, &cast.UpsertTaskListReq{
|
||||||
|
Action: "publishBatch1",
|
||||||
|
Url: "",
|
||||||
|
Status: 1,
|
||||||
|
OperatorID: fmt.Sprint(loginInfo.ID),
|
||||||
|
OperatorName: loginInfo.Name,
|
||||||
|
ExtraData: string(extraBytes),
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
if err = PublishWork(newCtx, req); err != nil {
|
if err = PublishWork(newCtx, req); err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
service.Success(ctx, req)
|
service.Success(ctx, req)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -445,7 +573,6 @@ func Publish(ctx *gin.Context) {
|
|||||||
// PublishWork 统一发布
|
// PublishWork 统一发布
|
||||||
func PublishWork(ctx context.Context, req *cast.PublishReq) error {
|
func PublishWork(ctx context.Context, req *cast.PublishReq) error {
|
||||||
var (
|
var (
|
||||||
wg sync.WaitGroup
|
|
||||||
errsMu sync.Mutex
|
errsMu sync.Mutex
|
||||||
errs []error
|
errs []error
|
||||||
)
|
)
|
||||||
@ -453,20 +580,45 @@ func PublishWork(ctx context.Context, req *cast.PublishReq) error {
|
|||||||
if len(req.WorkUuids) == 0 {
|
if len(req.WorkUuids) == 0 {
|
||||||
return errors.New("请选择作品")
|
return errors.New("请选择作品")
|
||||||
}
|
}
|
||||||
jobs := make(chan string, len(req.WorkUuids))
|
|
||||||
// 添加日志
|
// 添加日志
|
||||||
zap.L().Info("开始发布作品", zap.Int("总数", len(req.WorkUuids)))
|
zap.L().Info("开始发布作品", zap.Int("总数", len(req.WorkUuids)))
|
||||||
startTime := time.Now().Unix()
|
startTime := time.Now().Unix()
|
||||||
workerCount := 10
|
|
||||||
if len(req.WorkUuids) < workerCount {
|
// 每批次协程数量设为8
|
||||||
workerCount = len(req.WorkUuids) // 避免创建多余的协程
|
workerCount := 8
|
||||||
|
batchSize := workerCount // 每批处理8个任务
|
||||||
|
|
||||||
|
// 分批处理
|
||||||
|
for batchStart := 0; batchStart < len(req.WorkUuids); batchStart += batchSize {
|
||||||
|
batchEnd := batchStart + batchSize
|
||||||
|
if batchEnd > len(req.WorkUuids) {
|
||||||
|
batchEnd = len(req.WorkUuids)
|
||||||
}
|
}
|
||||||
for i := 0; i < workerCount; i++ {
|
|
||||||
|
currentBatch := req.WorkUuids[batchStart:batchEnd]
|
||||||
|
batchNum := batchStart/batchSize + 1
|
||||||
|
totalBatches := (len(req.WorkUuids) + batchSize - 1) / batchSize
|
||||||
|
|
||||||
|
zap.L().Info("开始处理批次",
|
||||||
|
zap.Int("批次", batchNum),
|
||||||
|
zap.Int("总批次", totalBatches),
|
||||||
|
zap.Int("本批数量", len(currentBatch)))
|
||||||
|
|
||||||
|
// 处理当前批次
|
||||||
|
var wg sync.WaitGroup
|
||||||
|
jobs := make(chan string, len(currentBatch))
|
||||||
|
|
||||||
|
currentWorkerCount := workerCount
|
||||||
|
if len(currentBatch) < workerCount {
|
||||||
|
currentWorkerCount = len(currentBatch) // 避免创建多余的协程
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < currentWorkerCount; i++ {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
for workUuid := range jobs {
|
for workUuid := range jobs {
|
||||||
if err := PostAS(workUuid); err != nil {
|
if err := PostAS(ctx, workUuid); err != nil {
|
||||||
errsMu.Lock()
|
errsMu.Lock()
|
||||||
errs = append(errs, err)
|
errs = append(errs, err)
|
||||||
errsMu.Unlock()
|
errsMu.Unlock()
|
||||||
@ -474,11 +626,23 @@ func PublishWork(ctx context.Context, req *cast.PublishReq) error {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
for _, workUuid := range req.WorkUuids {
|
|
||||||
|
for _, workUuid := range currentBatch {
|
||||||
jobs <- workUuid
|
jobs <- workUuid
|
||||||
}
|
}
|
||||||
close(jobs)
|
close(jobs)
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
|
zap.L().Info("批次处理完成", zap.Int("批次", batchNum))
|
||||||
|
|
||||||
|
// 如果不是最后一批,等待10-15秒再进行下一批
|
||||||
|
if batchEnd < len(req.WorkUuids) {
|
||||||
|
waitTime := 10 + time.Duration(time.Now().UnixNano()%6) // 随机10-15秒
|
||||||
|
zap.L().Info("等待后再处理下一批", zap.Int64("等待秒数", int64(waitTime)))
|
||||||
|
time.Sleep(waitTime * time.Second)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 统计结果
|
// 统计结果
|
||||||
successCount := len(req.WorkUuids) - len(errs)
|
successCount := len(req.WorkUuids) - len(errs)
|
||||||
zap.L().Info("发布完成",
|
zap.L().Info("发布完成",
|
||||||
@ -493,9 +657,11 @@ func PublishWork(ctx context.Context, req *cast.PublishReq) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func PostAS(workUuid string) error {
|
func PostAS(ctx context.Context, workUuid string) error {
|
||||||
var err error
|
var err error
|
||||||
_, err = service.CastProvider.Publish(context.Background(), &cast.PublishReq{WorkUuids: []string{workUuid}})
|
//检查封面
|
||||||
|
_ = CheckImage(workUuid)
|
||||||
|
_, err = service.CastProvider.Publish(ctx, &cast.PublishReq{WorkUuids: []string{workUuid}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
zap.L().Error("Publish err", zap.String("workUuid", workUuid), zap.Error(err))
|
zap.L().Error("Publish err", zap.String("workUuid", workUuid), zap.Error(err))
|
||||||
return err
|
return err
|
||||||
@ -528,7 +694,12 @@ func PostAS(workUuid string) error {
|
|||||||
if workDetail.WorkCategory == 1 {
|
if workDetail.WorkCategory == 1 {
|
||||||
isVideo = false
|
isVideo = false
|
||||||
// 先用服务器上的文件,不上传到第三方
|
// 先用服务器上的文件,不上传到第三方
|
||||||
|
//mediaUrls = workDetail.Images
|
||||||
|
mediaUrls, err = ProcessImg(workDetail.Images)
|
||||||
|
if err != nil {
|
||||||
mediaUrls = workDetail.Images
|
mediaUrls = workDetail.Images
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
/* for _, imageUrl := range workDetail.Images {
|
/* for _, imageUrl := range workDetail.Images {
|
||||||
urlResp, err = UploadMediaByURL(context.Background(), imageUrl, "", "")
|
urlResp, err = UploadMediaByURL(context.Background(), imageUrl, "", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -544,6 +715,10 @@ func PostAS(workUuid string) error {
|
|||||||
isVideo = true
|
isVideo = true
|
||||||
mediaUrls = []string{workDetail.VideoUrl}
|
mediaUrls = []string{workDetail.VideoUrl}
|
||||||
coverUrl = workDetail.CoverUrl
|
coverUrl = workDetail.CoverUrl
|
||||||
|
coverUrls, _ := ProcessImg([]string{workDetail.CoverUrl})
|
||||||
|
if len(coverUrls) > 0 {
|
||||||
|
coverUrl = coverUrls[0]
|
||||||
|
}
|
||||||
// 先用服务器上的文件,不上传到第三方
|
// 先用服务器上的文件,不上传到第三方
|
||||||
/*urlResp, err = UploadMediaByURL(context.Background(), workDetail.VideoUrl, "", "")
|
/*urlResp, err = UploadMediaByURL(context.Background(), workDetail.VideoUrl, "", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -601,7 +776,7 @@ func PostAS(workUuid string) error {
|
|||||||
LocationId: "",
|
LocationId: "",
|
||||||
UserTags: nil,
|
UserTags: nil,
|
||||||
Collaborators: nil,
|
Collaborators: nil,
|
||||||
AutoResize: true,
|
AutoResize: false,
|
||||||
DisableComments: false,
|
DisableComments: false,
|
||||||
}
|
}
|
||||||
case cast.PlatformIDENUM_TIKTOK:
|
case cast.PlatformIDENUM_TIKTOK:
|
||||||
@ -686,7 +861,7 @@ func PostAS(workUuid string) error {
|
|||||||
PublishType: 2,
|
PublishType: 2,
|
||||||
PublishResp: _err.Error(),
|
PublishResp: _err.Error(),
|
||||||
PublishMediaId: "",
|
PublishMediaId: "",
|
||||||
PublishStatus: cast.PublishStatusENUM_PublishMediaStatus_EXCEPTION,
|
PublishMediaStatus: cast.PublishStatusENUM_PublishMediaStatus_EXCEPTION,
|
||||||
Remark: "",
|
Remark: "",
|
||||||
})
|
})
|
||||||
zap.L().Info("UpdateWorkPlatformInfo", zap.Any("infoReq", infoReq))
|
zap.L().Info("UpdateWorkPlatformInfo", zap.Any("infoReq", infoReq))
|
||||||
@ -747,7 +922,7 @@ func PostAS(workUuid string) error {
|
|||||||
PublishType: 2,
|
PublishType: 2,
|
||||||
PublishResp: string(postBytes),
|
PublishResp: string(postBytes),
|
||||||
PublishMediaId: postResp.Posts[0].Id,
|
PublishMediaId: postResp.Posts[0].Id,
|
||||||
PublishStatus: publishStatus,
|
PublishMediaStatus: publishStatus,
|
||||||
Remark: string(postData),
|
Remark: string(postData),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -806,7 +981,22 @@ func RePublish(ctx *gin.Context) {
|
|||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Println(resp)
|
loginInfo := login.GetUserInfoFromC(ctx)
|
||||||
|
var extraBytes []byte
|
||||||
|
extraBytes, _ = json.Marshal(req)
|
||||||
|
_, err = service.CastProvider.UpsertTaskList(newCtx, &cast.UpsertTaskListReq{
|
||||||
|
Action: "publishBatch2",
|
||||||
|
Url: "",
|
||||||
|
Status: 1,
|
||||||
|
OperatorID: fmt.Sprint(loginInfo.ID),
|
||||||
|
OperatorName: loginInfo.Name,
|
||||||
|
ExtraData: string(extraBytes),
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("RePublish UpsertTaskList failed", zap.Error(err))
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
if err = PublishWork(newCtx, &cast.PublishReq{WorkUuids: resp.WorkUuids}); err != nil {
|
if err = PublishWork(newCtx, &cast.PublishReq{WorkUuids: resp.WorkUuids}); err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -1336,6 +1526,15 @@ func ImportWorkBatch(ctx *gin.Context) {
|
|||||||
req.ImageWorks = append(req.ImageWorks, temp)
|
req.ImageWorks = append(req.ImageWorks, temp)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
// 处理内容中的标签:提取、验证并批量导入,以及自动生成标签
|
||||||
|
processedContent, err := processContentAndAutoTags(ctx, temp.Content)
|
||||||
|
if err != nil {
|
||||||
|
temp.Remark = fmt.Sprintf("%s", err.Error())
|
||||||
|
req.ImageWorks = append(req.ImageWorks, temp)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
// 将处理后的内容更新到 temp.Content
|
||||||
|
temp.Content = processedContent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i := 10; i <= 20; i++ {
|
for i := 10; i <= 20; i++ {
|
||||||
@ -1564,9 +1763,11 @@ func ImportWorkBatch(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
service.CastProvider.UpsertTaskList(context.Background(), &cast.UpsertTaskListReq{
|
urlResult, _ = upload.PutBos(excelPath, "excel", true)
|
||||||
|
_, _ = service.CastProvider.UpsertTaskList(context.Background(), &cast.UpsertTaskListReq{
|
||||||
Uuid: taskResp.Uuid,
|
Uuid: taskResp.Uuid,
|
||||||
Status: 3,
|
Status: 3,
|
||||||
|
Url: urlResult,
|
||||||
})
|
})
|
||||||
service.Success(ctx, map[string]interface{}{
|
service.Success(ctx, map[string]interface{}{
|
||||||
"successCount": resp.SuccessCount,
|
"successCount": resp.SuccessCount,
|
||||||
@ -1600,6 +1801,14 @@ func RefreshPublish() error {
|
|||||||
}
|
}
|
||||||
for _, platformInfo := range workInfo.PlatformInfoData {
|
for _, platformInfo := range workInfo.PlatformInfoData {
|
||||||
if platformInfo.PublishMediaID == "" {
|
if platformInfo.PublishMediaID == "" {
|
||||||
|
var infoReq = &cast.UpdateWorkPlatformInfoReq{
|
||||||
|
PlatformInfoData: make([]*cast.PlatformInfo, 0),
|
||||||
|
}
|
||||||
|
infoReq.PlatformInfoData = append(infoReq.PlatformInfoData, &cast.PlatformInfo{
|
||||||
|
WorkUuid: workInfo.WorkUuid,
|
||||||
|
PublishMediaStatus: cast.PublishStatusENUM_PublishMediaStatus_NO,
|
||||||
|
})
|
||||||
|
_, _ = service.CastProvider.UpdateWorkPlatformInfo(context.Background(), infoReq)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
var infoReq = &cast.UpdateWorkPlatformInfoReq{
|
var infoReq = &cast.UpdateWorkPlatformInfoReq{
|
||||||
@ -1618,7 +1827,7 @@ func RefreshPublish() error {
|
|||||||
PublishType: 2,
|
PublishType: 2,
|
||||||
PublishResp: err.Error(),
|
PublishResp: err.Error(),
|
||||||
PublishMediaId: platformInfo.PublishMediaID,
|
PublishMediaId: platformInfo.PublishMediaID,
|
||||||
PublishStatus: cast.PublishStatusENUM_PublishMediaStatus_EXCEPTION,
|
PublishMediaStatus: cast.PublishStatusENUM_PublishMediaStatus_EXCEPTION,
|
||||||
Remark: "",
|
Remark: "",
|
||||||
PlatformUuid: platformInfo.PlatformUuid,
|
PlatformUuid: platformInfo.PlatformUuid,
|
||||||
})
|
})
|
||||||
@ -1635,7 +1844,7 @@ func RefreshPublish() error {
|
|||||||
PublishType: 2,
|
PublishType: 2,
|
||||||
PublishResp: string(dmData),
|
PublishResp: string(dmData),
|
||||||
PublishMediaId: platformInfo.PublishMediaID,
|
PublishMediaId: platformInfo.PublishMediaID,
|
||||||
PublishStatus: cast.PublishStatusENUM_PublishMediaStatus_DONE,
|
PublishMediaStatus: cast.PublishStatusENUM_PublishMediaStatus_DONE,
|
||||||
Remark: "",
|
Remark: "",
|
||||||
PlatformUuid: platformInfo.PlatformUuid,
|
PlatformUuid: platformInfo.PlatformUuid,
|
||||||
})
|
})
|
||||||
@ -1688,7 +1897,7 @@ func RefreshPublish() error {
|
|||||||
PublishType: 2,
|
PublishType: 2,
|
||||||
PublishResp: _err.Error(),
|
PublishResp: _err.Error(),
|
||||||
PublishMediaId: platformInfo.PublishMediaID,
|
PublishMediaId: platformInfo.PublishMediaID,
|
||||||
PublishStatus: cast.PublishStatusENUM_PublishMediaStatus_EXCEPTION,
|
PublishMediaStatus: cast.PublishStatusENUM_PublishMediaStatus_EXCEPTION,
|
||||||
Remark: "",
|
Remark: "",
|
||||||
PlatformUuid: platformInfo.PlatformUuid,
|
PlatformUuid: platformInfo.PlatformUuid,
|
||||||
})
|
})
|
||||||
@ -1708,7 +1917,7 @@ func RefreshPublish() error {
|
|||||||
PublishType: 2,
|
PublishType: 2,
|
||||||
PublishResp: string(postBytes),
|
PublishResp: string(postBytes),
|
||||||
PublishMediaId: platformInfo.PublishMediaID,
|
PublishMediaId: platformInfo.PublishMediaID,
|
||||||
PublishStatus: cast.PublishStatusENUM_PublishMediaStatus_FAIL,
|
PublishMediaStatus: cast.PublishStatusENUM_PublishMediaStatus_FAIL,
|
||||||
Remark: "",
|
Remark: "",
|
||||||
PlatformUuid: platformInfo.PlatformUuid,
|
PlatformUuid: platformInfo.PlatformUuid,
|
||||||
})
|
})
|
||||||
@ -1738,7 +1947,7 @@ func RefreshPublish() error {
|
|||||||
PublishType: 2,
|
PublishType: 2,
|
||||||
PublishResp: string(postBytes),
|
PublishResp: string(postBytes),
|
||||||
PublishMediaId: platformInfo.PublishMediaID,
|
PublishMediaId: platformInfo.PublishMediaID,
|
||||||
PublishStatus: publishStatus,
|
PublishMediaStatus: publishStatus,
|
||||||
Remark: "",
|
Remark: "",
|
||||||
PlatformUuid: platformInfo.PlatformUuid,
|
PlatformUuid: platformInfo.PlatformUuid,
|
||||||
})
|
})
|
||||||
@ -1799,3 +2008,38 @@ func checkAndReuploadImage(imageUrl string, mediaType string) (string, error) {
|
|||||||
}
|
}
|
||||||
return compressUrl, nil
|
return compressUrl, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ProcessImg(imgs []string) ([]string, error) {
|
||||||
|
var newImgs []string
|
||||||
|
for _, img := range imgs {
|
||||||
|
newPath, err := utilsImg.ProcessFromURL(
|
||||||
|
img,
|
||||||
|
utilsImg.Options{
|
||||||
|
TargetWidth: 1024,
|
||||||
|
TargetHeight: 1024,
|
||||||
|
MaxSizeMB: 1, // 提高到 2MB,对于 1024x1024 更合理
|
||||||
|
Mode: utilsImg.ResizeModePad, // 等比缩放+留白
|
||||||
|
OutputDir: "./runtime/tmp/images/processed",
|
||||||
|
MinQuality: 20, // 最低质量阈值
|
||||||
|
MaxRetries: 15, // 最大尝试次数
|
||||||
|
AllowResolutionReduction: true, // 允许降低分辨率
|
||||||
|
ForceJPEG: true, // 强制转换为 JPEG 格式
|
||||||
|
},
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("processImg err", zap.Error(err), zap.Any("img", img))
|
||||||
|
newImgs = append(newImgs, img)
|
||||||
|
err = nil
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
exportUrl, err := upload.PutBos(newPath, "fieework", true)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("upload.PutBos err", zap.Error(err), zap.Any("img", img))
|
||||||
|
newImgs = append(newImgs, img)
|
||||||
|
err = nil
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
newImgs = append(newImgs, exportUrl)
|
||||||
|
}
|
||||||
|
return newImgs, nil
|
||||||
|
}
|
||||||
|
|||||||
@ -131,7 +131,7 @@ func ExportExcelExecutionResult(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
titleList := []string{
|
titleList := []string{
|
||||||
"任务标题", "艺人编号", "艺人姓名", "内容类型", "内容标题", "执行结果", "原因",
|
"任务标题", "艺人编号", "艺人姓名", "内容类型", "内容标题", "执行结果", "原因", "TIKTOK", "YOUTUBE", "INS", "DM", "BULESKY",
|
||||||
}
|
}
|
||||||
var dataList []interface{}
|
var dataList []interface{}
|
||||||
for _, task := range res.Data {
|
for _, task := range res.Data {
|
||||||
@ -143,6 +143,11 @@ func ExportExcelExecutionResult(c *gin.Context) {
|
|||||||
task.WorkTitle,
|
task.WorkTitle,
|
||||||
task.ResultDescription,
|
task.ResultDescription,
|
||||||
task.ResultDesc,
|
task.ResultDesc,
|
||||||
|
task.TIKTOKStatusDesc,
|
||||||
|
task.YOUTUBEStatusDesc,
|
||||||
|
task.INSStatusDesc,
|
||||||
|
task.DMStatusDesc,
|
||||||
|
task.BULESKYStatusDesc,
|
||||||
}
|
}
|
||||||
dataList = append(dataList, &data)
|
dataList = append(dataList, &data)
|
||||||
}
|
}
|
||||||
|
|||||||
38
pkg/service/emailAlerts/emailAlerts.go
Normal file
38
pkg/service/emailAlerts/emailAlerts.go
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
package emailalerts
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fonchain-fiee/api/emailAlerts"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
"fonchain-fiee/pkg/service/bundle/common"
|
||||||
|
|
||||||
|
"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, errors.New(common.ErrorEmailAlertSubmitFailed))
|
||||||
|
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, errors.New(common.ErrorGetEmailInformationListFailed))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
@ -47,7 +47,12 @@ func Delete(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Display(ctx *gin.Context) {
|
func Display(ctx *gin.Context) {
|
||||||
resp, err := service.GovernanceProvider.Display(ctx, &governance.DisplayReq{})
|
var req governance.DisplayReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.GovernanceProvider.Display(ctx, &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, errors.New(common.DisplayGovernanceFailed))
|
service.Error(ctx, errors.New(common.DisplayGovernanceFailed))
|
||||||
return
|
return
|
||||||
@ -85,3 +90,34 @@ func Edit(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
service.Success(ctx, resp)
|
service.Success(ctx, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UpdataStatus(ctx *gin.Context) {
|
||||||
|
var req governance.UpdataStatusReq
|
||||||
|
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.GovernanceProvider.UpdataStatus(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetGovernanceInfo(ctx *gin.Context) {
|
||||||
|
var req governance.GetGovernanceInfoReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.GovernanceProvider.GetGovernanceInfo(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package imports
|
package imports
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -8,6 +9,9 @@ import (
|
|||||||
apiCast "fonchain-fiee/api/cast"
|
apiCast "fonchain-fiee/api/cast"
|
||||||
"fonchain-fiee/pkg/config"
|
"fonchain-fiee/pkg/config"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
|
"image"
|
||||||
|
"image/draw"
|
||||||
|
"image/jpeg"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
@ -293,7 +297,7 @@ func (p *BatchProcessor) submitTask(req *excelData) error {
|
|||||||
if !tiktokFound {
|
if !tiktokFound {
|
||||||
return fmt.Errorf("未找到匹配的TikTok账号: %s", req.TikTok)
|
return fmt.Errorf("未找到匹配的TikTok账号: %s", req.TikTok)
|
||||||
}
|
}
|
||||||
|
if req.Instagram != "" {
|
||||||
// 获取 Instagram 自媒体账号
|
// 获取 Instagram 自媒体账号
|
||||||
accountListIns, err := service.CastProvider.MediaUserList(context.Background(), &apiCast.MediaUserListReq{
|
accountListIns, err := service.CastProvider.MediaUserList(context.Background(), &apiCast.MediaUserListReq{
|
||||||
ArtistVal: req.ArtistName,
|
ArtistVal: req.ArtistName,
|
||||||
@ -322,6 +326,7 @@ func (p *BatchProcessor) submitTask(req *excelData) error {
|
|||||||
return fmt.Errorf("未找到匹配的Instagram账号: %s", req.Instagram)
|
return fmt.Errorf("未找到匹配的Instagram账号: %s", req.Instagram)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
// 获取 Bluesky 自媒体账号
|
// 获取 Bluesky 自媒体账号
|
||||||
accountListBlueSky, err := service.CastProvider.MediaUserList(context.Background(), &apiCast.MediaUserListReq{
|
accountListBlueSky, err := service.CastProvider.MediaUserList(context.Background(), &apiCast.MediaUserListReq{
|
||||||
ArtistVal: req.ArtistName,
|
ArtistVal: req.ArtistName,
|
||||||
@ -571,21 +576,17 @@ func downloadAndUploadToBucket(imageURL string) (string, error) {
|
|||||||
return "", fmt.Errorf("创建临时目录失败: %v", err)
|
return "", fmt.Errorf("创建临时目录失败: %v", err)
|
||||||
}
|
}
|
||||||
defer os.RemoveAll(tempDir) // 程序结束时清理整个目录
|
defer os.RemoveAll(tempDir) // 程序结束时清理整个目录
|
||||||
|
|
||||||
|
// 生成唯一文件名
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
fileName := fmt.Sprintf("%d%04d.jpg", time.Now().Unix(), rand.Intn(10000))
|
timestamp := time.Now().Unix()
|
||||||
|
randomNum := rand.Intn(10000)
|
||||||
|
fileName := fmt.Sprintf("%d%04d.jpg", timestamp, randomNum)
|
||||||
|
|
||||||
// 构建文件路径
|
// 构建文件路径
|
||||||
imgPath := filepath.Join(tempDir, fileName)
|
imgPath := filepath.Join(tempDir, fileName)
|
||||||
|
|
||||||
// 创建文件
|
// 下载图片
|
||||||
file, err := os.Create(imgPath)
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("创建文件失败: %v", err)
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
log.Printf("文件创建在: %s", imgPath)
|
|
||||||
|
|
||||||
// 下载图片到文件
|
|
||||||
resp, err := http.Get(imageURL)
|
resp, err := http.Get(imageURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("下载图片失败: %v", err)
|
return "", fmt.Errorf("下载图片失败: %v", err)
|
||||||
@ -596,50 +597,62 @@ func downloadAndUploadToBucket(imageURL string) (string, error) {
|
|||||||
return "", fmt.Errorf("下载失败,状态码: %d", resp.StatusCode)
|
return "", fmt.Errorf("下载失败,状态码: %d", resp.StatusCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 复制到文件
|
// 读取图片数据
|
||||||
_, err = io.Copy(file, resp.Body)
|
imgData, err := io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("保存文件失败: %v", err)
|
return "", fmt.Errorf("读取图片数据失败: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
file.Sync()
|
// 检测图片格式并转换为JPG
|
||||||
|
jpgData, err := convertToJPG(imgData)
|
||||||
fileBytes, err := os.ReadFile(imgPath)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("读取本地文件失败: %v", err)
|
return "", fmt.Errorf("转换图片格式失败: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 保存转换后的JPG文件
|
||||||
|
if err := os.WriteFile(imgPath, jpgData, 0644); err != nil {
|
||||||
|
return "", fmt.Errorf("保存JPG文件失败: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上传到对象存储
|
||||||
BOSClient, err := objstorage.NewOSS(
|
BOSClient, err := objstorage.NewOSS(
|
||||||
os.Getenv(config.ConfigData.Oss.AccessKeyId),
|
os.Getenv(config.ConfigData.Oss.AccessKeyId),
|
||||||
os.Getenv(config.ConfigData.Oss.AccessKeySecret),
|
os.Getenv(config.ConfigData.Oss.AccessKeySecret),
|
||||||
os.Getenv(config.ConfigData.Oss.Endpoint),
|
os.Getenv(config.ConfigData.Oss.Endpoint),
|
||||||
)
|
)
|
||||||
if BOSClient == nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("上传文件失败: %v", err)
|
return "", fmt.Errorf("创建OSS客户端失败: %v", err)
|
||||||
}
|
}
|
||||||
_, err = BOSClient.PutObjectFromBytes(os.Getenv(config.ConfigData.Oss.BucketName), fileName, fileBytes)
|
if BOSClient == nil {
|
||||||
|
return "", fmt.Errorf("OSS客户端为空")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = BOSClient.PutObjectFromBytes(os.Getenv(config.ConfigData.Oss.BucketName), fileName, jpgData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("上传文件失败: %v", err)
|
return "", fmt.Errorf("上传文件失败: %v", err)
|
||||||
}
|
}
|
||||||
url := fmt.Sprintf("%s/%s", os.Getenv(config.ConfigData.Oss.CdnHost), fileName)
|
|
||||||
//上传到桶
|
|
||||||
//BOSClient, err := objstorage.NewOSS(
|
|
||||||
// config.ConfigData.Oss.AccessKeyId,
|
|
||||||
// config.ConfigData.Oss.AccessKeySecret,
|
|
||||||
// config.ConfigData.Oss.Endpoint,
|
|
||||||
//)
|
|
||||||
//if BOSClient == nil {
|
//if BOSClient == nil {
|
||||||
// return "", fmt.Errorf("上传文件失败: %v", err)
|
|
||||||
//}
|
|
||||||
//_, err = BOSClient.PutObjectFromBytes(config.ConfigData.Oss.BucketName, fileName, fileBytes)
|
|
||||||
//if err != nil {
|
|
||||||
// return "", fmt.Errorf("上传文件失败: %v", err)
|
|
||||||
//}
|
|
||||||
//url := fmt.Sprintf("%s/%s", config.ConfigData.Oss.CdnHost, fileName)
|
|
||||||
|
|
||||||
|
// 返回CDN URL
|
||||||
|
url := fmt.Sprintf("%s/%s", os.Getenv(config.ConfigData.Oss.CdnHost), fileName)
|
||||||
return url, nil
|
return url, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//上传到桶
|
||||||
|
//BOSClient, err := objstorage.NewOSS(
|
||||||
|
// config.ConfigData.Oss.AccessKeyId,
|
||||||
|
// config.ConfigData.Oss.AccessKeySecret,
|
||||||
|
// config.ConfigData.Oss.Endpoint,
|
||||||
|
//)
|
||||||
|
//if BOSClient == nil {
|
||||||
|
// return "", fmt.Errorf("上传文件失败: %v", err)
|
||||||
|
//}
|
||||||
|
//_, err = BOSClient.PutObjectFromBytes(config.ConfigData.Oss.BucketName, fileName, fileBytes)
|
||||||
|
//if err != nil {
|
||||||
|
// return "", fmt.Errorf("上传文件失败: %v", err)
|
||||||
|
//}
|
||||||
|
//url := fmt.Sprintf("%s/%s", config.ConfigData.Oss.CdnHost, fileName)
|
||||||
|
|
||||||
func (p *BatchProcessor) generateTitleAndContent(req *excelData) (string, string, error) {
|
func (p *BatchProcessor) generateTitleAndContent(req *excelData) (string, string, error) {
|
||||||
if req.PhotoUrl != "" {
|
if req.PhotoUrl != "" {
|
||||||
title, content, err := NewAiGenerator().GenerateTitleAndContentFromImage(
|
title, content, err := NewAiGenerator().GenerateTitleAndContentFromImage(
|
||||||
@ -679,7 +692,7 @@ func (p *BatchProcessor) generateImage(req *excelData) (string, error) {
|
|||||||
prompt += "\n要求不能出现:低质量、残缺、人物正脸、多余的手指、乱码字符和文字、比例不良,场景以国内场景为主"
|
prompt += "\n要求不能出现:低质量、残缺、人物正脸、多余的手指、乱码字符和文字、比例不良,场景以国内场景为主"
|
||||||
|
|
||||||
if req.PhotoDpi == "" {
|
if req.PhotoDpi == "" {
|
||||||
req.PhotoDpi = "720*1280"
|
req.PhotoDpi = "1024*1024"
|
||||||
|
|
||||||
}
|
}
|
||||||
result, err := NewAiGenerator().TextToImage(
|
result, err := NewAiGenerator().TextToImage(
|
||||||
@ -693,6 +706,33 @@ func (p *BatchProcessor) generateImage(req *excelData) (string, error) {
|
|||||||
return result.Output.TaskID, nil
|
return result.Output.TaskID, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// convertToJPG 将图片数据转换为JPG格式
|
||||||
|
func convertToJPG(imgData []byte) ([]byte, error) {
|
||||||
|
// 使用标准库解码
|
||||||
|
img, format, err := image.Decode(bytes.NewReader(imgData))
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("解码图片失败: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Printf("检测到图片格式: %s, 尺寸: %dx%d", format, img.Bounds().Dx(), img.Bounds().Dy())
|
||||||
|
|
||||||
|
// 创建新的RGBA图片
|
||||||
|
bounds := img.Bounds()
|
||||||
|
rgba := image.NewRGBA(bounds)
|
||||||
|
|
||||||
|
// 绘制到RGBA
|
||||||
|
draw.Draw(rgba, bounds, img, bounds.Min, draw.Src)
|
||||||
|
|
||||||
|
// 编码为JPG
|
||||||
|
var buf bytes.Buffer
|
||||||
|
opts := &jpeg.Options{Quality: 90} // 设置质量为90%
|
||||||
|
if err := jpeg.Encode(&buf, rgba, opts); err != nil {
|
||||||
|
return nil, fmt.Errorf("编码JPG失败: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return buf.Bytes(), nil
|
||||||
|
}
|
||||||
|
|
||||||
//func (p *BatchProcessor) StartPolling() {
|
//func (p *BatchProcessor) StartPolling() {
|
||||||
// go func() {
|
// go func() {
|
||||||
// ticker := time.NewTicker(p.pollInterval) // 1秒间隔
|
// ticker := time.NewTicker(p.pollInterval) // 1秒间隔
|
||||||
|
|||||||
@ -58,6 +58,7 @@ func publishImage(req publishImageReq) (err error) {
|
|||||||
|
|
||||||
//---------------------------------------------------发布
|
//---------------------------------------------------发布
|
||||||
_, err = service.CastProvider.UpdateWorkImage(context.Background(), &apiCast.UpdateWorkImageReq{
|
_, err = service.CastProvider.UpdateWorkImage(context.Background(), &apiCast.UpdateWorkImageReq{
|
||||||
|
ArtistSubNum: list.UserList[0].SubNum,
|
||||||
Title: req.Title,
|
Title: req.Title,
|
||||||
Content: req.Content,
|
Content: req.Content,
|
||||||
Images: req.GeneratePhotoUrl,
|
Images: req.GeneratePhotoUrl,
|
||||||
|
|||||||
@ -8,12 +8,16 @@ import (
|
|||||||
"fonchain-fiee/api/bundle"
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
"fonchain-fiee/api/cron"
|
"fonchain-fiee/api/cron"
|
||||||
|
"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"
|
||||||
|
"fonchain-fiee/api/supplier"
|
||||||
pkConfig "fonchain-fiee/pkg/config"
|
pkConfig "fonchain-fiee/pkg/config"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
@ -35,6 +39,10 @@ var PressReleasesProvider = new(pressreleases.PressReleasesClientImpl)
|
|||||||
var SecFilingProvider = new(secFilings.SecFilingsClientImpl)
|
var SecFilingProvider = new(secFilings.SecFilingsClientImpl)
|
||||||
var AyrshareProvider = new(aryshare.AyrshareClientImpl)
|
var AyrshareProvider = new(aryshare.AyrshareClientImpl)
|
||||||
var CronProvider = new(cron.CronClientImpl)
|
var CronProvider = new(cron.CronClientImpl)
|
||||||
|
var SupplierProvider = new(supplier.SupplierClientImpl)
|
||||||
|
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,6 +57,10 @@ func init() {
|
|||||||
config.SetConsumerService(SecFilingProvider)
|
config.SetConsumerService(SecFilingProvider)
|
||||||
config.SetConsumerService(AyrshareProvider)
|
config.SetConsumerService(AyrshareProvider)
|
||||||
config.SetConsumerService(CronProvider)
|
config.SetConsumerService(CronProvider)
|
||||||
|
config.SetConsumerService(SupplierProvider)
|
||||||
|
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)
|
||||||
|
|||||||
319
pkg/service/members/members.go
Normal file
319
pkg/service/members/members.go
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
package members
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fonchain-fiee/api/members"
|
||||||
|
"fonchain-fiee/pkg/model/login"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
// =======================成员管理==============================
|
||||||
|
func AddManagement(ctx *gin.Context) {
|
||||||
|
var req members.AddManagementReq
|
||||||
|
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.AddManagement(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
func GetManagementList(ctx *gin.Context) {
|
||||||
|
var req members.GetManagementListReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.MembersProvider.GetManagementList(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
func GetManagementInfo(ctx *gin.Context) {
|
||||||
|
var req members.GetManagementInfoReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.MembersProvider.GetManagementInfo(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
func DeleteManagement(ctx *gin.Context) {
|
||||||
|
var req members.DeleteManagementReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.MembersProvider.DeleteManagement(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
func UpdataManagement(ctx *gin.Context) {
|
||||||
|
var req members.SortAndStatusManagementReq
|
||||||
|
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.SortAndStatusManagement(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 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ======================董事会管理===========================
|
||||||
|
func AddBoardOfDirectors(ctx *gin.Context) {
|
||||||
|
var req members.AddBoardOfDirectorsReq
|
||||||
|
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.AddBoardOfDirectors(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetBoardOfDirectorsList(ctx *gin.Context) {
|
||||||
|
var req members.GetBoardOfDirectorsListReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.MembersProvider.GetBoardOfDirectorsList(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
func GetBoardOfDirectorsInfo(ctx *gin.Context) {
|
||||||
|
var req members.GetBoardOfDirectorsInfoReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.MembersProvider.GetBoardOfDirectorsInfo(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
func DeleteBoardOfDirectors(ctx *gin.Context) {
|
||||||
|
var req members.DeleteBoardOfDirectorsReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.MembersProvider.DeleteBoardOfDirectors(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
func UpdataBoardOfDirectors(ctx *gin.Context) {
|
||||||
|
var req members.SortAndStatusBoardOfDirectorsReq
|
||||||
|
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.SortAndStatusBoardOfDirectors(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 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 AddCommitteeAppointments(ctx *gin.Context) {
|
||||||
|
var req members.AddCommitteeAppointmentsReq
|
||||||
|
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.AddCommitteeAppointments(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
func GetCommitteeAppointmentsList(ctx *gin.Context) {
|
||||||
|
var req members.GetCommitteeAppointmentsListReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.MembersProvider.GetCommitteeAppointmentsList(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
func GetCommitteeAppointmentsInfo(ctx *gin.Context) {
|
||||||
|
var req members.GetCommitteeAppointmentsInfoReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.MembersProvider.GetCommitteeAppointmentsInfo(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
func DeleteCommitteeAppointments(ctx *gin.Context) {
|
||||||
|
var req members.DeleteCommitteeAppointmentsReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.MembersProvider.DeleteCommitteeAppointments(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
func UpdataCommitteeAppointments(ctx *gin.Context) {
|
||||||
|
var req members.SortAndStatusCommitteeAppointmentsReq
|
||||||
|
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.SortAndStatusCommitteeAppointments(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)
|
||||||
|
}
|
||||||
@ -2,7 +2,6 @@ package pressreleases
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
@ -49,6 +48,10 @@ func Display(ctx *gin.Context) {
|
|||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if req.LangType == "" {
|
||||||
|
service.Error(ctx, errors.New("语言类型为空"))
|
||||||
|
return
|
||||||
|
}
|
||||||
resp, err := service.PressReleasesProvider.Display(ctx, &req)
|
resp, err := service.PressReleasesProvider.Display(ctx, &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, errors.New(common.ListPressReleasesFailed))
|
service.Error(ctx, errors.New(common.ListPressReleasesFailed))
|
||||||
@ -57,6 +60,34 @@ func Display(ctx *gin.Context) {
|
|||||||
service.Success(ctx, resp)
|
service.Success(ctx, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SortAndStatus(ctx *gin.Context) {
|
||||||
|
var req pressreleases.SortAndStatusReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.PressReleasesProvider.SortAndStatus(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Info(ctx *gin.Context) {
|
||||||
|
var req pressreleases.InfoReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.PressReleasesProvider.Info(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
func List(ctx *gin.Context) {
|
func List(ctx *gin.Context) {
|
||||||
var req pressreleases.ListReq
|
var req pressreleases.ListReq
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
@ -89,14 +120,20 @@ func Edit(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Get(ctx *gin.Context) {
|
func Get(ctx *gin.Context) {
|
||||||
id, err := strconv.Atoi(ctx.Query("id"))
|
var req pressreleases.GetReq
|
||||||
if err != nil {
|
uuid := ctx.Query("uuid")
|
||||||
service.Error(ctx, err)
|
if uuid == "" {
|
||||||
|
service.Error(ctx, errors.New("uuid 参数不能为空"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp, err := service.PressReleasesProvider.Get(ctx, &pressreleases.GetReq{
|
langType := ctx.Query("langType")
|
||||||
Id: int64(id),
|
if langType == "" {
|
||||||
})
|
service.Error(ctx, errors.New("langType 参数不能为空"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
req.Uuid = uuid
|
||||||
|
req.LangType = langType
|
||||||
|
resp, err := service.PressReleasesProvider.Get(ctx, &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, errors.New(common.GetPressReleasesFailed))
|
service.Error(ctx, errors.New(common.GetPressReleasesFailed))
|
||||||
return
|
return
|
||||||
|
|||||||
132
pkg/service/reports/annualReports.go
Normal file
132
pkg/service/reports/annualReports.go
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
package reports
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fonchain-fiee/api/reports"
|
||||||
|
"fonchain-fiee/pkg/model/login"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
"fonchain-fiee/pkg/service/bundle/common"
|
||||||
|
|
||||||
|
"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, errors.New(common.ErrorCreateReportFailed))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改年度报告排序和状态
|
||||||
|
func AnnualReportSortAndStatus(ctx *gin.Context) {
|
||||||
|
var req reports.SortAndStatusAnnualReportReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.ReportsProvider.SortAndStatusAnnualReport(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取年度报告信息
|
||||||
|
func AnnualReportInfo(ctx *gin.Context) {
|
||||||
|
var req reports.GetAnnualReportInfoReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.ReportsProvider.GetAnnualReportInfo(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, errors.New(common.ErrorListReportFailed))
|
||||||
|
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, errors.New(common.ErrorDeleteReportFailed))
|
||||||
|
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, errors.New(common.ErrorEditReportFailed))
|
||||||
|
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, errors.New(common.ErrorDisplayReportFailed))
|
||||||
|
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, errors.New(common.ErrorDisplayReportFailed))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
103
pkg/service/reports/quarterlyReports.go
Normal file
103
pkg/service/reports/quarterlyReports.go
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
package reports
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fonchain-fiee/api/reports"
|
||||||
|
"fonchain-fiee/pkg/model/login"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
"fonchain-fiee/pkg/service/bundle/common"
|
||||||
|
|
||||||
|
"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, errors.New(common.ErrorCreateReportFailed))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改季度报告排序和状态
|
||||||
|
func QuarterlyReportSortAndStatus(ctx *gin.Context) {
|
||||||
|
var req reports.SortAndStatusQuarterlyReportReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.ReportsProvider.SortAndStatusQuarterlyReport(ctx, &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取季度报告信息
|
||||||
|
func QuarterlyReportInfo(ctx *gin.Context) {
|
||||||
|
var req reports.GetQuarterlyReportInfoReq
|
||||||
|
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.ReportsProvider.GetQuarterlyReportInfo(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, errors.New(common.ErrorListReportFailed))
|
||||||
|
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, errors.New(common.ErrorDeleteReportFailed))
|
||||||
|
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, errors.New(common.ErrorEditReportFailed))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
}
|
||||||
394
pkg/service/supplier/supplier.go
Normal file
394
pkg/service/supplier/supplier.go
Normal file
@ -0,0 +1,394 @@
|
|||||||
|
package supplier
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"fonchain-fiee/api/supplier"
|
||||||
|
"fonchain-fiee/pkg/logic"
|
||||||
|
"fonchain-fiee/pkg/model/login"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
"fonchain-fiee/pkg/service/upload"
|
||||||
|
"fonchain-fiee/pkg/utils"
|
||||||
|
"fonchain-fiee/pkg/utils/excel"
|
||||||
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/gin-gonic/gin/binding"
|
||||||
|
"github.com/google/uuid"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GetSupplier(c *gin.Context) {
|
||||||
|
req := &supplier.GetSupplierRequest{}
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
res, err := service.SupplierProvider.GetSupplier(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func CreateSupplier(c *gin.Context) {
|
||||||
|
req := &supplier.CreateSupplierRequest{}
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
res, err := service.SupplierProvider.CreateSupplier(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func UpdateSupplier(c *gin.Context) {
|
||||||
|
req := &supplier.UpdateSupplierRequest{}
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
info, err := service.SupplierProvider.GetSupplier(c, &supplier.GetSupplierRequest{Id: req.Id})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if info.Status == 3 {
|
||||||
|
service.Error(c, errors.New("审核中不可修改")) //todo 修改:审核中并且存在审核人 不可修改
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if req.Status != 1 && req.Status != 2 {
|
||||||
|
service.Error(c, errors.New("审批状态错误")) //todo 只允许前端暂存或提交审核申请
|
||||||
|
}
|
||||||
|
res, err := service.SupplierProvider.UpdateSupplier(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSupplierList(c *gin.Context) {
|
||||||
|
req := &supplier.GetSupplierListRequest{}
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
res, err := service.SupplierProvider.GetSupplierList(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateOrganizeDictionary(c *gin.Context) {
|
||||||
|
req := &supplier.CreateOrganizeDictionaryRequest{}
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
res, err := service.SupplierProvider.CreateOrganizeDictionary(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetOrganizeDictionaryList(c *gin.Context) {
|
||||||
|
req := &supplier.GetOrganizeDictionaryListRequest{}
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
res, err := service.SupplierProvider.GetOrganizeDictionaryList(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetCountryRegionList(c *gin.Context) {
|
||||||
|
req := &supplier.GetCountryRegionListRequest{}
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
res, err := service.SupplierProvider.GetCountryRegionList(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateImportRecord(c *gin.Context) {
|
||||||
|
file, err := c.FormFile("file")
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
}
|
||||||
|
safeFilename := fmt.Sprintf("%d", time.Now().Unix()) + "_" + file.Filename
|
||||||
|
userInfo := login.GetUserInfoFromC(c)
|
||||||
|
fileDir := fmt.Sprintf("/fiee/supplier/%s/%s_%s", time.Now().Format("2006-01-02"), userInfo.Name, safeFilename)
|
||||||
|
// 保存上传的文件到本地
|
||||||
|
if err = c.SaveUploadedFile(file, safeFilename); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
if err := os.Remove(safeFilename); err != nil {
|
||||||
|
// 处理删除文件失败的情况
|
||||||
|
fmt.Println("Failed to delete file:", err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
inputUrl, err := upload.PutBosWithName(safeFilename, false, fileDir)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
supplierList, err := logic.ImportSupplier(safeFilename)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if len(supplierList) == 0 {
|
||||||
|
service.Error(c, errors.New("导入数据为空"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uuid, _ := uuid.NewUUID()
|
||||||
|
var SuccessNum uint64
|
||||||
|
var SupplierCodes []string
|
||||||
|
var ErrSupplierRes []*logic.ErrSupplierRes
|
||||||
|
for idx, i := range supplierList {
|
||||||
|
rowNum := idx + 1
|
||||||
|
if i.OwningEntityName == "" || i.LegalName == "" || i.CountryOrRegionName == "" || i.CompanyRegistrationNumber == "" || i.SupplierType == "" || i.ApprovalStatus == "" || i.ConnectedParty == "" {
|
||||||
|
ErrSupplierRes = append(ErrSupplierRes, &logic.ErrSupplierRes{
|
||||||
|
ID: rowNum,
|
||||||
|
LegalName: i.LegalName,
|
||||||
|
Remark: "必填项存在空值",
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
OwningEntityRes, _ := service.SupplierProvider.GetOrganizeDictionaryInfo(c, &supplier.CreateOrganizeDictionaryRequest{Name: i.OwningEntityName})
|
||||||
|
if OwningEntityRes == nil || OwningEntityRes.Id == 0 {
|
||||||
|
ErrSupplierRes = append(ErrSupplierRes, &logic.ErrSupplierRes{
|
||||||
|
ID: rowNum,
|
||||||
|
LegalName: i.LegalName,
|
||||||
|
Remark: "所属组织不存在",
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
countryRegionRes, _ := service.SupplierProvider.GetCountryRegionInfo(c, &supplier.GetCountryRegionInfoRequest{ZhAndCode: i.CountryOrRegionName})
|
||||||
|
if countryRegionRes == nil || countryRegionRes.Id == 0 {
|
||||||
|
ErrSupplierRes = append(ErrSupplierRes, &logic.ErrSupplierRes{
|
||||||
|
ID: rowNum,
|
||||||
|
LegalName: i.LegalName,
|
||||||
|
Remark: "所属国家或地区不存在",
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
var LastReviewDate string
|
||||||
|
if i.ApprovalDate != "" {
|
||||||
|
t, err := time.Parse("2006-01-02", i.ApprovalDate)
|
||||||
|
if err != nil {
|
||||||
|
LastReviewDate = ""
|
||||||
|
i.ApprovalDate = ""
|
||||||
|
} else {
|
||||||
|
LastReviewDate = t.AddDate(1, 0, 0).Format("2006-01-02")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
createRes, err := service.SupplierProvider.CreateSupplier(c, &supplier.CreateSupplierRequest{
|
||||||
|
OwningEntityId: OwningEntityRes.Id,
|
||||||
|
LegalName: i.LegalName,
|
||||||
|
LocalName: i.LocalName,
|
||||||
|
AbbreviationName: i.AbbreviationName,
|
||||||
|
CountryOrRegionId: countryRegionRes.Id,
|
||||||
|
CompanyRegistrationNumber: i.CompanyRegistrationNumber,
|
||||||
|
SupplierType: i.SupplierType,
|
||||||
|
ApprovalStatus: i.ApprovalStatus,
|
||||||
|
ApprovalDate: i.ApprovalDate,
|
||||||
|
LastReviewDate: LastReviewDate,
|
||||||
|
LegalEntityType: i.LegalEntityType,
|
||||||
|
SanctionsCountryScreeningResult: i.SanctionsCountryScreeningResult,
|
||||||
|
KeyFinancial: i.KeyFinancial,
|
||||||
|
CompanyAddress: i.CompanyAddress,
|
||||||
|
PrimaryContact: i.PrimaryContact,
|
||||||
|
DataOwnerDepartment: i.DataOwnerDepartment,
|
||||||
|
BasicCompanyInformation: i.BasicCompanyInformation,
|
||||||
|
SupplementaryText: i.SupplementaryText,
|
||||||
|
Status: 1,
|
||||||
|
ConnectedParty: i.ConnectedParty,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ErrSupplierRes = append(ErrSupplierRes, &logic.ErrSupplierRes{
|
||||||
|
ID: rowNum,
|
||||||
|
LegalName: i.LegalName,
|
||||||
|
Remark: err.Error(),
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
} else {
|
||||||
|
SupplierCodes = append(SupplierCodes, createRes.SupplierCode)
|
||||||
|
SuccessNum++
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
status := 2
|
||||||
|
outUrl := ""
|
||||||
|
if len(ErrSupplierRes) == 0 {
|
||||||
|
status = 1
|
||||||
|
} else {
|
||||||
|
var sheet1Columns = []string{"行数", "供应商法定全称", "错误信息"}
|
||||||
|
var sheet1 = excel.NewSheet("Sheet1", ErrSupplierRes, sheet1Columns)
|
||||||
|
ex, err := excel.NewExcelCreatorFromTemplate("./mistake.xlsx", "./supplier/excel/", "", sheet1)
|
||||||
|
ex.UseOption(excel.OptionFileNameSuffixWithUnixTime)
|
||||||
|
path, _, err := ex.WriteToFile()
|
||||||
|
outUrl, err = upload.PutBos(path, "", false)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
os.RemoveAll("./supplier")
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
req := &supplier.CreateImportRecordRequest{
|
||||||
|
SupplierCodes: SupplierCodes,
|
||||||
|
Status: uint64(status),
|
||||||
|
UserId: userInfo.ID,
|
||||||
|
ToLeadUrl: inputUrl,
|
||||||
|
DeriveUrl: outUrl,
|
||||||
|
Uuid: uuid.String(),
|
||||||
|
SuccessNum: SuccessNum,
|
||||||
|
FailNum: uint64(len(ErrSupplierRes)),
|
||||||
|
}
|
||||||
|
_, err = service.SupplierProvider.CreateImportRecord(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, req)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetImportRecordInfo(c *gin.Context) {
|
||||||
|
req := &supplier.GetImportRecordRequest{}
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
res, err := service.SupplierProvider.GetImportRecordInfo(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetExportList(c *gin.Context) {
|
||||||
|
req := &supplier.GetSupplierListRequest{}
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
infoRes, err := service.SupplierProvider.GetSupplierList(c, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 定义标题列表
|
||||||
|
titleList := []string{
|
||||||
|
"状态/State", "使用组织/Owning Entity", "供应商唯一编码/SupplierUnique Code", "供应商法定全称(英文)/LegalName (English)", "供应商本地名称(如有)/LocalName (if applicable)",
|
||||||
|
"所在国家或地区/Country or Region", "公司注册编号/Company RegistrationNumber", "供应商类型/Supplier Type", "*是否关联方/Connected party", "准入状态/Approval Status", "准入日期/ApprovalDate",
|
||||||
|
"法律实体形式/Legal Entity Type", "制裁与高风险国家筛查结果/Sanctions & High-RiskCountry Screening Result", "关键财务与付款信息/Key Financial & Payment Information",
|
||||||
|
"公司地址/Company Address", "主要联系人、职位及联系方式/Primary Contact,Position&Details", "数据维护部门&人员/Data Owner Department/Personnel", "最后更新日期/Last Updated Date",
|
||||||
|
"公司信息概要/Summary of Basic Company Information",
|
||||||
|
}
|
||||||
|
// 定义数据结构
|
||||||
|
type DataInfo struct {
|
||||||
|
Status string
|
||||||
|
OwningEntity string
|
||||||
|
SupplierUniqueCode string
|
||||||
|
LegalName string
|
||||||
|
LocalName string
|
||||||
|
CountryOrRegion string
|
||||||
|
CompanyRegistrationNumber string
|
||||||
|
SupplierType string
|
||||||
|
ConnectedParty string
|
||||||
|
ApprovalStatus string
|
||||||
|
ApprovalDate string
|
||||||
|
LegalEntityType string
|
||||||
|
SanctionsCountryScreeningResult string
|
||||||
|
KeyFinancial string
|
||||||
|
CompanyAddress string
|
||||||
|
PrimaryContact string
|
||||||
|
DataOwnerDepartment string
|
||||||
|
UpdatedAt string
|
||||||
|
BasicCompanyInformation string
|
||||||
|
}
|
||||||
|
// 创建员工ID到DataInfo的映射
|
||||||
|
dataMap := make(map[string]*DataInfo)
|
||||||
|
statusMap := map[uint64]string{
|
||||||
|
1: "草稿",
|
||||||
|
2: "审核中",
|
||||||
|
3: "已驳回",
|
||||||
|
4: "已成功",
|
||||||
|
}
|
||||||
|
for _, info := range infoRes.Data {
|
||||||
|
dataMap[info.SupplierUniqueCode] = &DataInfo{
|
||||||
|
Status: statusMap[info.Status],
|
||||||
|
OwningEntity: info.OwningEntityName,
|
||||||
|
SupplierUniqueCode: info.SupplierUniqueCode,
|
||||||
|
LegalName: info.LegalName,
|
||||||
|
LocalName: info.LocalName,
|
||||||
|
CountryOrRegion: info.CountryOrRegionCode,
|
||||||
|
CompanyRegistrationNumber: info.CompanyRegistrationNumber,
|
||||||
|
SupplierType: info.SupplierType,
|
||||||
|
ConnectedParty: info.ConnectedParty,
|
||||||
|
ApprovalStatus: info.ApprovalStatus,
|
||||||
|
ApprovalDate: info.ApprovalDate,
|
||||||
|
LegalEntityType: info.LegalEntityType,
|
||||||
|
SanctionsCountryScreeningResult: info.SanctionsCountryScreeningResult,
|
||||||
|
KeyFinancial: info.KeyFinancial,
|
||||||
|
CompanyAddress: info.CompanyAddress,
|
||||||
|
PrimaryContact: info.PrimaryContact,
|
||||||
|
DataOwnerDepartment: info.DataOwnerDepartment,
|
||||||
|
UpdatedAt: info.UpdatedAt,
|
||||||
|
BasicCompanyInformation: info.BasicCompanyInformation,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 生成最终数据列表
|
||||||
|
var dataList []interface{}
|
||||||
|
for _, data := range dataMap {
|
||||||
|
dataList = append(dataList, &[]any{
|
||||||
|
data.Status, data.OwningEntity, data.SupplierUniqueCode, data.LegalName, data.LocalName,
|
||||||
|
data.CountryOrRegion, data.CompanyRegistrationNumber, data.SupplierType, data.ConnectedParty, data.ApprovalStatus, data.ApprovalDate,
|
||||||
|
data.LegalEntityType, data.SanctionsCountryScreeningResult, data.KeyFinancial, data.CompanyAddress, data.PrimaryContact,
|
||||||
|
data.DataOwnerDepartment, data.UpdatedAt, data.BasicCompanyInformation,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成Excel文件
|
||||||
|
content, err := utils.ToExcelByType(titleList, dataList, "slice", "")
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回Excel文件
|
||||||
|
utils.ResponseXls(c, content, "供应商库")
|
||||||
|
return
|
||||||
|
}
|
||||||
@ -12,14 +12,15 @@ import (
|
|||||||
"fonchain-fiee/pkg/model"
|
"fonchain-fiee/pkg/model"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"fonchain-fiee/pkg/utils"
|
"fonchain-fiee/pkg/utils"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
cmdConf "fonchain-fiee/cmd/config"
|
||||||
|
|
||||||
"github.com/disintegration/imaging"
|
"github.com/disintegration/imaging"
|
||||||
"github.com/fonchain_enterprise/utils/objstorage"
|
"github.com/fonchain_enterprise/utils/objstorage"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
"io"
|
|
||||||
|
|
||||||
ffmpeg "github.com/u2takey/ffmpeg-go"
|
|
||||||
"go.uber.org/zap"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/url"
|
"net/url"
|
||||||
@ -28,6 +29,9 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
ffmpeg "github.com/u2takey/ffmpeg-go"
|
||||||
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -216,7 +220,7 @@ func quickBos(file *multipart.FileHeader, mediaType string, mask string, source
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var objectName string = fmt.Sprintf("%s/%s/%s", config.ConfigData.Oss.BaseDir, config.Env, filePath)
|
var objectName string = fmt.Sprintf("%s/%s/%s", config.ConfigData.Oss.BaseDir, cmdConf.AppConfig.System.AppMode, filePath)
|
||||||
BOSClient, _ := objstorage.NewOSS(os.Getenv(config.ConfigData.Oss.AccessKeyId), os.Getenv(config.ConfigData.Oss.AccessKeySecret), os.Getenv(config.ConfigData.Oss.Endpoint))
|
BOSClient, _ := objstorage.NewOSS(os.Getenv(config.ConfigData.Oss.AccessKeyId), os.Getenv(config.ConfigData.Oss.AccessKeySecret), os.Getenv(config.ConfigData.Oss.Endpoint))
|
||||||
_, err = BOSClient.PutObjectFromBytes(os.Getenv(config.ConfigData.Oss.BucketName), objectName, fileBytes)
|
_, err = BOSClient.PutObjectFromBytes(os.Getenv(config.ConfigData.Oss.BucketName), objectName, fileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -290,7 +294,7 @@ func PutBos(filePath string, mediaType string, needRemove bool) (url string, err
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
filePath = strings.Replace(filePath, model.MediaPath, "", 1)
|
filePath = strings.Replace(filePath, model.MediaPath, "", 1)
|
||||||
var objectName string = fmt.Sprintf("%s/%s%s", config.ConfigData.Oss.BaseDir, config.Env, filePath)
|
var objectName string = fmt.Sprintf("%s/%s%s", config.ConfigData.Oss.BaseDir, cmdConf.AppConfig.System.AppMode, filePath)
|
||||||
_, err = BOSClient.PutObjectFromBytes(os.Getenv(config.ConfigData.Oss.BucketName), objectName, fileBytes)
|
_, err = BOSClient.PutObjectFromBytes(os.Getenv(config.ConfigData.Oss.BucketName), objectName, fileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("=== PutBos PutObject err ", err)
|
fmt.Println("=== PutBos PutObject err ", err)
|
||||||
@ -347,3 +351,30 @@ func getEnvDir(cloudStoreSubPath string) (ep string) {
|
|||||||
ep, _ = url.JoinPath("fiee", cloudStoreSubPath)
|
ep, _ = url.JoinPath("fiee", cloudStoreSubPath)
|
||||||
return ep
|
return ep
|
||||||
}
|
}
|
||||||
|
func PutBosWithName(filePath string, needRemove bool, ossPath string) (url string, err error) {
|
||||||
|
BOSClient, err := objstorage.NewOSS(os.Getenv(config.ConfigData.Oss.AccessKeyId), os.Getenv(config.ConfigData.Oss.AccessKeySecret), os.Getenv(config.ConfigData.Oss.Endpoint))
|
||||||
|
//BOSClient, err := objstorage.NewOSS(config.ConfigData.Oss.AccessKeyId, config.ConfigData.Oss.AccessKeySecret, config.ConfigData.Oss.Endpoint)
|
||||||
|
if err != nil {
|
||||||
|
//logger.Errorf("PutBosWithName err1 ", err)
|
||||||
|
err = errors.New(e.GetMsg(e.ErrorUploadBos))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if ossPath == "" {
|
||||||
|
ossPath = filePath[1:]
|
||||||
|
}
|
||||||
|
var objectName string = fmt.Sprintf("%s/%s%s", config.ConfigData.Oss.BaseDir, cmdConf.AppConfig.System.AppMode, ossPath)
|
||||||
|
_, err = BOSClient.PutObject(os.Getenv(config.ConfigData.Oss.BucketName), objectName, filePath)
|
||||||
|
//_, err = BOSClient.PutObject(config.ConfigData.Oss.BucketName, objectName, filePath)
|
||||||
|
if err != nil {
|
||||||
|
//logger.Errorf("PutBosWithName err2 ", err)
|
||||||
|
err = errors.New(e.GetMsg(e.ErrorUploadBos))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//删除本地文件
|
||||||
|
if needRemove {
|
||||||
|
_ = os.Remove(filePath)
|
||||||
|
}
|
||||||
|
url = fmt.Sprintf("%s/%s", os.Getenv(config.ConfigData.Oss.CdnHost), objectName)
|
||||||
|
//url = fmt.Sprintf("%s/%s", config.ConfigData.Oss.CdnHost, objectName)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
381
pkg/utils/excel/excelInter.go
Normal file
381
pkg/utils/excel/excelInter.go
Normal file
@ -0,0 +1,381 @@
|
|||||||
|
// Package excel -----------------------------
|
||||||
|
// @file : templateInter.go
|
||||||
|
// @author : JJXu
|
||||||
|
// @contact : wavingbear@163.com
|
||||||
|
// @time : 2022/7/23 15:34
|
||||||
|
// -------------------------------------------
|
||||||
|
package excel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"reflect"
|
||||||
|
"sync"
|
||||||
|
|
||||||
|
"github.com/tealeg/xlsx"
|
||||||
|
"github.com/xuri/excelize/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
ErrSheetNotExist = errors.New("sheet does not exist")
|
||||||
|
ErrSheetDataFormatNotSupport = errors.New("sheet data format not support")
|
||||||
|
//ErrSheetNameNotInTemplate = errors.New("sheet name not in emailTemplate")
|
||||||
|
)
|
||||||
|
|
||||||
|
// ======================================================================================================================
|
||||||
|
//
|
||||||
|
// Sheet define
|
||||||
|
type HeaderRow struct {
|
||||||
|
RowNum int //行号
|
||||||
|
Values []string
|
||||||
|
}
|
||||||
|
|
||||||
|
// 抽象工作簿
|
||||||
|
type Sheet interface {
|
||||||
|
GetData() any //数据,支持struct、[]struct、[]*struct三种类型
|
||||||
|
SheetName() string //表名称
|
||||||
|
SheetHeaders() []string //表头名称,没有则跳过插入表头的步骤
|
||||||
|
GetJsonFiledList() []string //指定字段的排列顺序,默认按照结构体中的顺序排列(表头与数据没有关联,使用这个指定字段插入顺序)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 实例化工作簿,使用模板生成excel的话用这个
|
||||||
|
func NewTemplateSheet(sheetName string, datas any) Sheet {
|
||||||
|
return &newSheetDefine{
|
||||||
|
Datas: datas,
|
||||||
|
Name: sheetName,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 实例化工作簿,不通过模板生成excel的话用这个
|
||||||
|
func NewSheet(sheetName string, datas any, headers []string, jsonFiledList ...[]string) Sheet {
|
||||||
|
st := &newSheetDefine{
|
||||||
|
Datas: datas,
|
||||||
|
Name: sheetName,
|
||||||
|
Headers: headers,
|
||||||
|
}
|
||||||
|
if jsonFiledList != nil {
|
||||||
|
st.JsonFiledList = jsonFiledList[0]
|
||||||
|
}
|
||||||
|
return st
|
||||||
|
}
|
||||||
|
|
||||||
|
// 定义一个能够通用的工作簿结构,此结构必须遵循Sheet接口规范
|
||||||
|
type newSheetDefine struct {
|
||||||
|
Datas any
|
||||||
|
Name string
|
||||||
|
Headers []string
|
||||||
|
JsonFiledList []string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *newSheetDefine) GetData() any {
|
||||||
|
return s.Datas
|
||||||
|
}
|
||||||
|
func (s *newSheetDefine) SheetName() string {
|
||||||
|
return s.Name
|
||||||
|
}
|
||||||
|
func (s *newSheetDefine) SheetHeaders() []string {
|
||||||
|
return s.Headers
|
||||||
|
}
|
||||||
|
func (s *newSheetDefine) GetJsonFiledList() []string {
|
||||||
|
return s.JsonFiledList
|
||||||
|
}
|
||||||
|
|
||||||
|
//======================================================================================================================
|
||||||
|
// Sheet define
|
||||||
|
|
||||||
|
// WriteToExcel 通过模板文件写入数据并另存为
|
||||||
|
// param fileName : 文件名
|
||||||
|
// param filesSuffix : 文件后缀名生成函数
|
||||||
|
// param fileRoot : 导出目录
|
||||||
|
// param templatePath : 模板文件路径
|
||||||
|
// param sheets : Sheet类型的数据,类型为[]Sheet
|
||||||
|
// return path : 文件路径
|
||||||
|
// return exfileName : 导出后的文件名
|
||||||
|
// return err
|
||||||
|
func WriteToExcel(fileName string, fileRoot string, templatePath string, sheets ...Sheet) (path string, exFileName string, err error) {
|
||||||
|
var exc *Excel
|
||||||
|
exc, err = NewExcelCreatorFromTemplate(fileName, fileRoot, templatePath, sheets...)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
exc.UseOption(OptionFileNameSuffixWithUnixTime)
|
||||||
|
return exc.WriteToFile()
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadDataFromExcel 从excel文件读取数据
|
||||||
|
func ReadDataFromExcel(filepath string, sheetName string, handler func(rowIndex int, rows []string)) error {
|
||||||
|
ex := Excel{OriginFilePath: filepath}
|
||||||
|
return ex.ReadSheetData(sheetName, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadDataFromBytes 从io口读取数据,用户http上传的附件
|
||||||
|
func ReadDataFromBytes(file io.Reader, sheetName string, handler func(rowIndex int, row []string)) error {
|
||||||
|
exce, err := excelize.OpenReader(file)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var ex = Excel{ex: exce}
|
||||||
|
return ex.ReadSheetData(sheetName, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 读取模板并创建工作表生成器
|
||||||
|
func NewExcelCreatorFromTemplate(fileName string, fileRoot string, templatePath string, sheets ...Sheet) (exc *Excel, err error) {
|
||||||
|
exc = &Excel{
|
||||||
|
SaveRoot: fileRoot,
|
||||||
|
SaveName: fileName,
|
||||||
|
OriginFilePath: templatePath,
|
||||||
|
rwLock: sync.RWMutex{},
|
||||||
|
}
|
||||||
|
if sheets != nil {
|
||||||
|
err = exc.AddSheets(sheets...)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return exc, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新建文件并创建工作表生成器
|
||||||
|
func NewExcelCreatorWithNewFile(fileName string, fileRoot string, sheets ...Sheet) (exc *Excel, err error) {
|
||||||
|
return NewExcelCreatorFromTemplate(fileName, fileRoot, "", sheets...)
|
||||||
|
}
|
||||||
|
|
||||||
|
type Excel struct {
|
||||||
|
ex *excelize.File
|
||||||
|
SaveRoot string
|
||||||
|
SaveName string
|
||||||
|
OriginFilePath string
|
||||||
|
Sheets map[string]Sheet
|
||||||
|
rwLock sync.RWMutex
|
||||||
|
Opts []Option
|
||||||
|
After []Option
|
||||||
|
}
|
||||||
|
|
||||||
|
// UseOption 使用可选项
|
||||||
|
func (s *Excel) UseOption(opts ...Option) {
|
||||||
|
if opts != nil {
|
||||||
|
s.Opts = append(s.Opts, opts...)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func (s *Excel) AfterAddData(after ...Option) {
|
||||||
|
if after != nil {
|
||||||
|
s.After = append(s.After, after...)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加工作簿
|
||||||
|
// 注意如果添加相同的工作簿,之前的会被覆盖
|
||||||
|
func (s *Excel) AddSheets(sheets ...Sheet) (err error) {
|
||||||
|
if s.Sheets == nil {
|
||||||
|
s.Sheets = make(map[string]Sheet, 0)
|
||||||
|
}
|
||||||
|
for _, sheet := range sheets {
|
||||||
|
var sheetName = sheet.SheetName()
|
||||||
|
s.Sheets[sheetName] = sheet
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除工作簿
|
||||||
|
func (s *Excel) DeleteSheets(sheetName string) error {
|
||||||
|
if s.Sheets == nil {
|
||||||
|
return nil
|
||||||
|
} else if s.Sheets[sheetName] != nil {
|
||||||
|
delete(s.Sheets, sheetName)
|
||||||
|
} else {
|
||||||
|
return ErrSheetNotExist
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 读取工作簿
|
||||||
|
func (s *Excel) ReadSheetData(sheetName string, handler func(rowIndex int, row []string)) (err error) {
|
||||||
|
if s.ex == nil {
|
||||||
|
s.ex, err = excelize.OpenFile(s.OriginFilePath)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
datas, err := s.ex.GetRows(sheetName)
|
||||||
|
for i, row := range datas {
|
||||||
|
handler(i, row)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 写入到文件
|
||||||
|
func (s *Excel) WriteToFile() (path string, fileName string, err error) {
|
||||||
|
if s.ex == nil {
|
||||||
|
if s.OriginFilePath == "" {
|
||||||
|
s.ex = excelize.NewFile()
|
||||||
|
} else {
|
||||||
|
s.ex, err = excelize.OpenFile(s.OriginFilePath)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if s.Opts != nil {
|
||||||
|
for _, opt := range s.Opts {
|
||||||
|
opt(s)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//插入数据
|
||||||
|
for sheetName, st := range s.Sheets {
|
||||||
|
//添加表头,没有定义则不插入
|
||||||
|
if st.SheetHeaders() != nil {
|
||||||
|
for i, c := range st.SheetHeaders() {
|
||||||
|
err = s.ex.SetCellValue(sheetName, GetCellIndex(1, i+1), c)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
headerStyleID, errs := s.ex.NewStyle(NewDefaultHeaderStyle())
|
||||||
|
if errs != nil {
|
||||||
|
fmt.Println(errs)
|
||||||
|
err = errs
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//表头设置为默认样式,边框加粗、字体加粗
|
||||||
|
if err = s.ex.SetCellStyle(st.SheetName(), "A1", GetCellIndex(1, len(st.SheetHeaders())), headerStyleID); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//添加数据
|
||||||
|
var firstRow = s.getFirstEmptyRowIndex(s.ex, sheetName)
|
||||||
|
var SheetData = reflect.ValueOf(st.GetData())
|
||||||
|
var SheetType = reflect.TypeOf(st.GetData())
|
||||||
|
writerFunc, exists := writerMap[SheetData.Kind()]
|
||||||
|
if exists {
|
||||||
|
err = writerFunc(s, st, SheetData, SheetType, firstRow)
|
||||||
|
} else {
|
||||||
|
return "", "", ErrSheetDataFormatNotSupport
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if s.After != nil {
|
||||||
|
for _, after := range s.After {
|
||||||
|
after(s)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//检测并生成目录
|
||||||
|
_ = os.MkdirAll(s.SaveRoot, os.ModePerm)
|
||||||
|
//保存
|
||||||
|
path = filepath.ToSlash(filepath.Join(s.SaveRoot, s.SaveName))
|
||||||
|
fileName = s.SaveName
|
||||||
|
s.rwLock.Lock()
|
||||||
|
if err = s.ex.SaveAs(path); err != nil {
|
||||||
|
log.Println(fmt.Sprintf("save file error :%v", err))
|
||||||
|
s.rwLock.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
s.rwLock.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// getJsonFieldList 获取json字段列表
|
||||||
|
func (s *Excel) getJsonFieldList(sheetType reflect.Type) (tagList []string) {
|
||||||
|
t := sheetType.Elem()
|
||||||
|
if t.Kind() == reflect.Ptr {
|
||||||
|
t = t.Elem()
|
||||||
|
if t.Kind() != reflect.Struct {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for i := 0; i < t.NumField(); i++ {
|
||||||
|
var tag = t.Field(i).Tag.Get("json")
|
||||||
|
if tag != "" {
|
||||||
|
tagList = append(tagList, tag)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// dataToMap 数据转字典
|
||||||
|
func (s *Excel) dataToMap(sheet reflect.Value, sheetType reflect.Type) (dataMap map[string]any) {
|
||||||
|
dataMap = make(map[string]any)
|
||||||
|
t := sheetType.Elem()
|
||||||
|
//指针类型结构体拿真实的对象
|
||||||
|
if t.Kind() == reflect.Ptr {
|
||||||
|
t = t.Elem()
|
||||||
|
sheet = sheet.Elem()
|
||||||
|
}
|
||||||
|
for i := 0; i < t.NumField(); i++ {
|
||||||
|
var tag = t.Field(i).Tag.Get("json")
|
||||||
|
if tag != "" {
|
||||||
|
dataMap[t.Field(i).Tag.Get("json")] = sheet.Field(i).Interface()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dataMap
|
||||||
|
}
|
||||||
|
|
||||||
|
// getFirstEmptyRowIndex 获取首个空行的索引位置
|
||||||
|
func (s *Excel) getFirstEmptyRowIndex(ex *excelize.File, sheetName string) (index int) {
|
||||||
|
rows, err := ex.GetRows(sheetName)
|
||||||
|
if err != nil {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
return len(rows)
|
||||||
|
}
|
||||||
|
|
||||||
|
func ToExcel(titleList []string, dataList []interface{}) (content io.ReadSeeker) {
|
||||||
|
// 生成一个新的文件
|
||||||
|
file := xlsx.NewFile()
|
||||||
|
// 添加sheet页
|
||||||
|
sheet, _ := file.AddSheet("Sheet1")
|
||||||
|
// 插入表头
|
||||||
|
titleRow := sheet.AddRow()
|
||||||
|
for _, v := range titleList {
|
||||||
|
cell := titleRow.AddCell()
|
||||||
|
cell.Value = v
|
||||||
|
}
|
||||||
|
// 插入内容
|
||||||
|
for _, v := range dataList {
|
||||||
|
row := sheet.AddRow()
|
||||||
|
row.WriteStruct(v, -1)
|
||||||
|
}
|
||||||
|
|
||||||
|
var buffer bytes.Buffer
|
||||||
|
_ = file.Write(&buffer)
|
||||||
|
file.Save("1.xlsx")
|
||||||
|
content = bytes.NewReader(buffer.Bytes())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自动设置单元格宽度
|
||||||
|
func (s *Excel) autoResetCellWidth(sheetObj Sheet) {
|
||||||
|
// 获取最大字符宽度
|
||||||
|
maxWidths := make(map[int]int)
|
||||||
|
var sheetData = reflect.ValueOf(sheetObj.GetData())
|
||||||
|
var rowLen = 1
|
||||||
|
var columnLen = len(sheetObj.GetJsonFiledList())
|
||||||
|
if sheetData.Kind() == reflect.Slice {
|
||||||
|
rowLen = sheetData.Len()
|
||||||
|
}
|
||||||
|
limitWidth := 90
|
||||||
|
for col := 1; col <= columnLen; col++ {
|
||||||
|
var maxWidth int
|
||||||
|
for row := 0; row < rowLen; row++ {
|
||||||
|
value, _ := s.ex.GetCellValue(sheetObj.SheetName(), GetCellIndex(row+1, col))
|
||||||
|
width := len(value)
|
||||||
|
if width > limitWidth {
|
||||||
|
width = limitWidth
|
||||||
|
}
|
||||||
|
if width > maxWidth {
|
||||||
|
maxWidth = width
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maxWidths[col] = maxWidth
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置列宽度
|
||||||
|
for col, width := range maxWidths {
|
||||||
|
colChar := GetColumnIndex(col)
|
||||||
|
s.ex.SetColWidth(sheetObj.SheetName(), colChar, colChar, float64(width+2))
|
||||||
|
}
|
||||||
|
}
|
||||||
52
pkg/utils/excel/options.go
Normal file
52
pkg/utils/excel/options.go
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
// Package excel -----------------------------
|
||||||
|
// @file : options.go
|
||||||
|
// @author : JJXu
|
||||||
|
// @contact : wavingBear@163.com
|
||||||
|
// @time : 2022/12/19 12:41:40
|
||||||
|
// -------------------------------------------
|
||||||
|
package excel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Option func(excel *Excel)
|
||||||
|
|
||||||
|
// func AddSaveFileSuffixWithUnixTime(excel *Excel) {
|
||||||
|
// excel.SaveName
|
||||||
|
// fmt.Sprintf("%v", time.Now().Unix())
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// 时间戳作为文件后缀
|
||||||
|
func OptionFileNameSuffixWithUnixTime(excel *Excel) {
|
||||||
|
ext := filepath.Ext(excel.SaveName)
|
||||||
|
name := strings.Split(excel.SaveName, ext)[0]
|
||||||
|
excel.SaveName = fmt.Sprintf("%s_%v%s", name, time.Now().Unix(), ext)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 为第一行添加表头
|
||||||
|
func AfterAddHeader1(sheet Sheet, text string) func(excel *Excel) {
|
||||||
|
return func(excel *Excel) {
|
||||||
|
err := excel.ex.InsertRows(sheet.SheetName(), 1, 1)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
err = excel.ex.SetCellValue(sheet.SheetName(), GetCellIndex(1, 1), text)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
headerStyleID, errs := excel.ex.NewStyle(NewHeaderOneStyle())
|
||||||
|
if errs != nil {
|
||||||
|
fmt.Println(errs)
|
||||||
|
err = errs
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//表头设置为默认样式,边框加粗、字体加粗
|
||||||
|
_ = excel.ex.SetCellStyle(sheet.SheetName(), "A1", GetCellIndex(1, len(sheet.SheetHeaders())), headerStyleID)
|
||||||
|
_ = excel.ex.MergeCell(sheet.SheetName(), "A1", GetCellIndex(1, len(sheet.SheetHeaders())))
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
54
pkg/utils/excel/style.go
Normal file
54
pkg/utils/excel/style.go
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
// Package excel -----------------------------
|
||||||
|
// @file : style.go
|
||||||
|
// @author : JJXu
|
||||||
|
// @contact : wavingbear@163.com
|
||||||
|
// @time : 2023/9/1 13:50
|
||||||
|
// -------------------------------------------
|
||||||
|
package excel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/xuri/excelize/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
func NewDefaultHeaderStyle() *excelize.Style {
|
||||||
|
return &excelize.Style{
|
||||||
|
Border: []excelize.Border{
|
||||||
|
{Type: "left", Color: "000000", Style: 2},
|
||||||
|
{Type: "top", Color: "000000", Style: 2},
|
||||||
|
{Type: "bottom", Color: "000000", Style: 2},
|
||||||
|
{Type: "right", Color: "000000", Style: 2},
|
||||||
|
},
|
||||||
|
Font: &excelize.Font{Bold: true, Size: 12},
|
||||||
|
Alignment: &excelize.Alignment{
|
||||||
|
Horizontal: "center",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func NewDefaultDataStyle() *excelize.Style {
|
||||||
|
return &excelize.Style{
|
||||||
|
Border: []excelize.Border{
|
||||||
|
{Type: "left", Color: "000000", Style: 1},
|
||||||
|
{Type: "bottom", Color: "000000", Style: 1},
|
||||||
|
{Type: "right", Color: "000000", Style: 1},
|
||||||
|
},
|
||||||
|
Font: &excelize.Font{Size: 12},
|
||||||
|
Alignment: &excelize.Alignment{
|
||||||
|
Horizontal: "left",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewHeaderOneStyle() *excelize.Style {
|
||||||
|
return &excelize.Style{
|
||||||
|
Border: []excelize.Border{
|
||||||
|
{Type: "left", Color: "000000", Style: 2},
|
||||||
|
{Type: "top", Color: "000000", Style: 2},
|
||||||
|
{Type: "bottom", Color: "000000", Style: 2},
|
||||||
|
{Type: "right", Color: "000000", Style: 2},
|
||||||
|
},
|
||||||
|
Font: &excelize.Font{Bold: true, Size: 14},
|
||||||
|
Alignment: &excelize.Alignment{
|
||||||
|
Horizontal: "center",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
41
pkg/utils/excel/utils.go
Normal file
41
pkg/utils/excel/utils.go
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
// Package utils -----------------------------
|
||||||
|
// @file : excelHelper.go
|
||||||
|
// @author : JJXu
|
||||||
|
// @contact : wavingbear@163.com
|
||||||
|
// @time : 2022/6/9 13:41
|
||||||
|
// -------------------------------------------
|
||||||
|
package excel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"strconv"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 行列坐标值转换为excel的坐标。注意row和columnCount的初始值都是1
|
||||||
|
func GetCellIndex(row int, columnCount int) string {
|
||||||
|
var column = GetColumnIndex(columnCount)
|
||||||
|
return fmt.Sprintf("%s%d", column, row)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取excel的列索引
|
||||||
|
var columnIndices = []string{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
|
||||||
|
|
||||||
|
func GetColumnIndex(num int) string {
|
||||||
|
num--
|
||||||
|
var column = columnIndices[num%26]
|
||||||
|
for num = num / 26; num > 0; num = num / 26 {
|
||||||
|
column = columnIndices[(num-1)%26] + column
|
||||||
|
num--
|
||||||
|
}
|
||||||
|
return column
|
||||||
|
}
|
||||||
|
|
||||||
|
func Int[T int | uint | uint8 | uint32 | uint64 | int32 | int64](value string) T {
|
||||||
|
v, _ := strconv.Atoi(value)
|
||||||
|
return T(v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Float[T float64 | float32](value string) T {
|
||||||
|
v, _ := strconv.ParseFloat(value, 64)
|
||||||
|
return T(v)
|
||||||
|
}
|
||||||
81
pkg/utils/excel/writer.go
Normal file
81
pkg/utils/excel/writer.go
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
// Package excel -----------------------------
|
||||||
|
// @file : writer.go
|
||||||
|
// @author : JJXu
|
||||||
|
// @contact : wavingbear@163.com
|
||||||
|
// @time : 2023/9/1 14:11
|
||||||
|
// -------------------------------------------
|
||||||
|
package excel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"reflect"
|
||||||
|
)
|
||||||
|
|
||||||
|
var writerMap = map[reflect.Kind]func(exc *Excel, sheetObj Sheet, SheetData reflect.Value, SheetType reflect.Type, firstRow int) error{
|
||||||
|
reflect.Slice: sliceWriter,
|
||||||
|
reflect.Struct: structWriter,
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterWriter(dataKind reflect.Kind, function func(exc *Excel, sheetObj Sheet, SheetData reflect.Value, SheetType reflect.Type, firstRow int) error) error {
|
||||||
|
if _, exists := writerMap[dataKind]; exists {
|
||||||
|
return errors.New(fmt.Sprintf("dataKind: %v has existed", dataKind))
|
||||||
|
}
|
||||||
|
writerMap[dataKind] = function
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func sliceWriter(exc *Excel, sheetObj Sheet, SheetData reflect.Value, SheetDataType reflect.Type, firstRow int) error {
|
||||||
|
var cellNameList = sheetObj.GetJsonFiledList()
|
||||||
|
if cellNameList == nil {
|
||||||
|
cellNameList = exc.getJsonFieldList(SheetDataType)
|
||||||
|
}
|
||||||
|
var rowLen = SheetData.Len()
|
||||||
|
for i := 0; i < rowLen; i++ {
|
||||||
|
var dataMap = exc.dataToMap(SheetData.Index(i), SheetDataType)
|
||||||
|
for column, v := range cellNameList {
|
||||||
|
var axis = GetCellIndex(i+firstRow+1, column+1)
|
||||||
|
err := exc.ex.SetCellValue(sheetObj.SheetName(), axis, dataMap[v])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//设置数据格式
|
||||||
|
dataStyleID, errs := exc.ex.NewStyle(NewDefaultDataStyle())
|
||||||
|
if errs != nil {
|
||||||
|
return errs
|
||||||
|
}
|
||||||
|
if err := exc.ex.SetCellStyle(sheetObj.SheetName(), GetCellIndex(firstRow+1, 1), GetCellIndex(rowLen+1, len(sheetObj.SheetHeaders())), dataStyleID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
//设置默认列宽
|
||||||
|
//exc.ex.SetColWidth(sheetObj.SheetName(), GetColumnIndex(1), GetColumnIndex(len(sheetObj.SheetHeaders())), 12.0)
|
||||||
|
exc.autoResetCellWidth(sheetObj)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func structWriter(exc *Excel, sheetObj Sheet, SheetData reflect.Value, SheetType reflect.Type, firstRow int) error {
|
||||||
|
var cellNameList = exc.getJsonFieldList(SheetType)
|
||||||
|
var dataMap = exc.dataToMap(SheetData, SheetType)
|
||||||
|
for column, v := range cellNameList {
|
||||||
|
var axis = GetCellIndex(firstRow+1, column+1)
|
||||||
|
err := exc.ex.SetCellValue(sheetObj.SheetName(), axis, dataMap[v])
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err.Error())
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//设置数据格式
|
||||||
|
dataStyleID, err := exc.ex.NewStyle(NewDefaultDataStyle())
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err = exc.ex.SetCellStyle(sheetObj.SheetName(), GetCellIndex(firstRow, 1), GetCellIndex(firstRow+1, len(sheetObj.SheetHeaders())), dataStyleID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
//设置默认列宽
|
||||||
|
//exc.ex.SetColWidth(sheetObj.SheetName(), GetColumnIndex(1), GetColumnIndex(len(sheetObj.SheetHeaders())), 12.0)
|
||||||
|
exc.autoResetCellWidth(sheetObj)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
555
pkg/utils/img/imageproc.go
Normal file
555
pkg/utils/img/imageproc.go
Normal file
@ -0,0 +1,555 @@
|
|||||||
|
package img
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"crypto/sha256"
|
||||||
|
"encoding/hex"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"image"
|
||||||
|
"image/color"
|
||||||
|
"image/gif"
|
||||||
|
"image/jpeg"
|
||||||
|
"image/png"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/disintegration/imaging"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ResizeMode controls how the source image is mapped to the target WxH.
|
||||||
|
//
|
||||||
|
// - ResizeModeFit: contain (keep aspect), no cropping; resulting image may be smaller than WxH
|
||||||
|
// - ResizeModeFill: cover + crop (center crop) to exactly WxH
|
||||||
|
// - ResizeModePad: keep aspect + pad (letterbox) to exactly WxH (no crop, no stretch)
|
||||||
|
//
|
||||||
|
// If you only pass a single dimension (e.g. W>0, H=0), Fit will keep aspect.
|
||||||
|
// Fill/Pad requires both W and H.
|
||||||
|
//
|
||||||
|
// Note: GIF input will be processed as a single frame (first frame).
|
||||||
|
// If you need animated GIF support, we can extend this later.
|
||||||
|
type ResizeMode string
|
||||||
|
|
||||||
|
const (
|
||||||
|
ResizeModeFit ResizeMode = "fit"
|
||||||
|
ResizeModeFill ResizeMode = "fill"
|
||||||
|
// ResizeModePad keeps aspect ratio (no crop, no stretch) and pads to exactly WxH.
|
||||||
|
// Typical use: 16:9 -> 1024x1024 with white/black bars.
|
||||||
|
ResizeModePad ResizeMode = "pad"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Options struct {
|
||||||
|
TargetWidth int
|
||||||
|
TargetHeight int
|
||||||
|
MaxSizeMB float64
|
||||||
|
|
||||||
|
Mode ResizeMode
|
||||||
|
|
||||||
|
// PadColor is used only when Mode == ResizeModePad.
|
||||||
|
// Default: white.
|
||||||
|
PadColor color.Color
|
||||||
|
|
||||||
|
// OutputDir is where the processed image will be written.
|
||||||
|
// Default: ./runtime/tmp/images/processed
|
||||||
|
OutputDir string
|
||||||
|
|
||||||
|
// Timeout controls total download time.
|
||||||
|
// Default: 30s.
|
||||||
|
Timeout time.Duration
|
||||||
|
|
||||||
|
// MaxDownloadMB caps download size to protect memory/disk.
|
||||||
|
// Default: max( maxSizeMB*6, 30MB ).
|
||||||
|
MaxDownloadMB float64
|
||||||
|
|
||||||
|
// MinQuality is the minimum JPEG quality to try (1-100).
|
||||||
|
// Default: 10. If compression still can't meet MaxSizeMB, returns error.
|
||||||
|
MinQuality int
|
||||||
|
|
||||||
|
// MaxRetries controls how many quality adjustments to attempt.
|
||||||
|
// Default: 15.
|
||||||
|
MaxRetries int
|
||||||
|
|
||||||
|
// AllowResolutionReduction allows reducing resolution further if compression fails.
|
||||||
|
// Default: false.
|
||||||
|
AllowResolutionReduction bool
|
||||||
|
|
||||||
|
// ForceJPEG forces output to JPEG format even if input is PNG/GIF/etc.
|
||||||
|
// If image has alpha channel, it will be flattened to white background.
|
||||||
|
// Default: false.
|
||||||
|
ForceJPEG bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// ProcessFromURL downloads an image from imgURL, resizes it, compresses it to <= MaxSizeMB,
|
||||||
|
// and returns the local output path.
|
||||||
|
//
|
||||||
|
// Contract:
|
||||||
|
// - imgURL: http/https
|
||||||
|
// - TargetWidth/TargetHeight: pixels, >=0
|
||||||
|
// - MaxSizeMB: >0
|
||||||
|
// - returns: absolute or relative file path (depending on OutputDir), and error
|
||||||
|
func ProcessFromURL(imgURL string, opt Options) (string, error) {
|
||||||
|
if strings.TrimSpace(imgURL) == "" {
|
||||||
|
return "", errors.New("imgURL is empty")
|
||||||
|
}
|
||||||
|
u, err := url.Parse(imgURL)
|
||||||
|
if err != nil || (u.Scheme != "http" && u.Scheme != "https") {
|
||||||
|
return "", errors.New("imgURL must be http/https")
|
||||||
|
}
|
||||||
|
if opt.MaxSizeMB <= 0 {
|
||||||
|
return "", errors.New("MaxSizeMB must be > 0")
|
||||||
|
}
|
||||||
|
if opt.TargetWidth < 0 || opt.TargetHeight < 0 {
|
||||||
|
return "", errors.New("TargetWidth/TargetHeight must be >= 0")
|
||||||
|
}
|
||||||
|
if opt.TargetWidth == 0 && opt.TargetHeight == 0 {
|
||||||
|
return "", errors.New("TargetWidth and TargetHeight cannot both be 0")
|
||||||
|
}
|
||||||
|
if opt.Mode == "" {
|
||||||
|
opt.Mode = ResizeModeFit
|
||||||
|
}
|
||||||
|
if opt.Mode != ResizeModeFit && opt.Mode != ResizeModeFill && opt.Mode != ResizeModePad {
|
||||||
|
return "", errors.New("invalid resize Mode")
|
||||||
|
}
|
||||||
|
if (opt.Mode == ResizeModeFill || opt.Mode == ResizeModePad) && (opt.TargetWidth == 0 || opt.TargetHeight == 0) {
|
||||||
|
return "", errors.New("fill/pad mode requires both TargetWidth and TargetHeight")
|
||||||
|
}
|
||||||
|
if opt.Timeout <= 0 {
|
||||||
|
opt.Timeout = 30 * time.Second
|
||||||
|
}
|
||||||
|
if opt.OutputDir == "" {
|
||||||
|
opt.OutputDir = filepath.FromSlash("./runtime/tmp/images/processed")
|
||||||
|
}
|
||||||
|
if opt.MaxDownloadMB <= 0 {
|
||||||
|
opt.MaxDownloadMB = opt.MaxSizeMB * 6
|
||||||
|
if opt.MaxDownloadMB < 30 {
|
||||||
|
opt.MaxDownloadMB = 30
|
||||||
|
}
|
||||||
|
if opt.MaxDownloadMB > 200 {
|
||||||
|
opt.MaxDownloadMB = 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if opt.MinQuality <= 0 {
|
||||||
|
opt.MinQuality = 10
|
||||||
|
}
|
||||||
|
if opt.MinQuality > 100 {
|
||||||
|
opt.MinQuality = 100
|
||||||
|
}
|
||||||
|
if opt.MaxRetries <= 0 {
|
||||||
|
opt.MaxRetries = 15
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure output dir exists.
|
||||||
|
if err := os.MkdirAll(opt.OutputDir, os.ModePerm); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx, cancel := context.WithTimeout(context.Background(), opt.Timeout)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
|
data, contentType, err := downloadWithLimit(ctx, imgURL, int64(opt.MaxDownloadMB*1024*1024))
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
img, fmtName, err := decodeImage(data, contentType)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if image already meets requirements
|
||||||
|
if alreadyMeetsRequirements(img, data, opt) {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
|
||||||
|
img = applyResize(img, opt)
|
||||||
|
|
||||||
|
// Determine output format
|
||||||
|
outExt := ".jpg"
|
||||||
|
outFormat := "jpeg"
|
||||||
|
|
||||||
|
if opt.ForceJPEG {
|
||||||
|
// Force JPEG output, flatten alpha if needed
|
||||||
|
outFormat = "jpeg"
|
||||||
|
outExt = ".jpg"
|
||||||
|
if imageHasAlpha(img) {
|
||||||
|
img = flattenToWhite(img)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Auto-detect: if image has alpha, output PNG; otherwise JPEG
|
||||||
|
hasAlpha := imageHasAlpha(img)
|
||||||
|
if hasAlpha {
|
||||||
|
outExt = ".png"
|
||||||
|
outFormat = "png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a stable file name based on url + options + content signature.
|
||||||
|
h := sha256.New()
|
||||||
|
h.Write([]byte(imgURL))
|
||||||
|
h.Write([]byte(fmt.Sprintf("|%d|%d|%f|%s|%s", opt.TargetWidth, opt.TargetHeight, opt.MaxSizeMB, opt.Mode, outFormat)))
|
||||||
|
h.Write(data[:minInt(len(data), 1024)])
|
||||||
|
name := hex.EncodeToString(h.Sum(nil))[:32] + outExt
|
||||||
|
outPath := filepath.Join(opt.OutputDir, name)
|
||||||
|
|
||||||
|
maxBytes := int64(opt.MaxSizeMB * 1024 * 1024)
|
||||||
|
encoded, err := encodeUnderSize(img, outFormat, maxBytes, opt.MinQuality, opt.MaxRetries)
|
||||||
|
if err != nil {
|
||||||
|
// Fallback: if PNG can't fit, try JPEG (dropping alpha with white background).
|
||||||
|
if outFormat == "png" {
|
||||||
|
flattened := flattenToWhite(img)
|
||||||
|
encoded, err = encodeUnderSize(flattened, "jpeg", maxBytes, opt.MinQuality, opt.MaxRetries)
|
||||||
|
if err == nil {
|
||||||
|
outPath = strings.TrimSuffix(outPath, filepath.Ext(outPath)) + ".jpg"
|
||||||
|
} else {
|
||||||
|
// If AllowResolutionReduction is true, try reducing resolution
|
||||||
|
if opt.AllowResolutionReduction {
|
||||||
|
return tryWithReducedResolution(img, opt, outPath, maxBytes)
|
||||||
|
}
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// If AllowResolutionReduction is true, try reducing resolution
|
||||||
|
if opt.AllowResolutionReduction {
|
||||||
|
return tryWithReducedResolution(img, opt, outPath, maxBytes)
|
||||||
|
}
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tmpPath := outPath + ".tmp"
|
||||||
|
if err := os.WriteFile(tmpPath, encoded, 0o644); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
if err := os.Rename(tmpPath, outPath); err != nil {
|
||||||
|
_ = os.Remove(tmpPath)
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
_ = fmtName // reserved for future behavior
|
||||||
|
return outPath, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func downloadWithLimit(ctx context.Context, imgURL string, maxBytes int64) ([]byte, string, error) {
|
||||||
|
req, err := http.NewRequestWithContext(ctx, http.MethodGet, imgURL, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, "", err
|
||||||
|
}
|
||||||
|
// Reasonable defaults; could be overridden later.
|
||||||
|
req.Header.Set("User-Agent", "fonchain-tools/1.0")
|
||||||
|
|
||||||
|
client := &http.Client{}
|
||||||
|
resp, err := client.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return nil, "", err
|
||||||
|
}
|
||||||
|
defer func() { _ = resp.Body.Close() }()
|
||||||
|
|
||||||
|
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
|
||||||
|
return nil, "", fmt.Errorf("download failed: %s", resp.Status)
|
||||||
|
}
|
||||||
|
if resp.ContentLength > 0 && resp.ContentLength > maxBytes {
|
||||||
|
return nil, "", fmt.Errorf("remote file too large: %d > %d", resp.ContentLength, maxBytes)
|
||||||
|
}
|
||||||
|
|
||||||
|
lr := &io.LimitedReader{R: resp.Body, N: maxBytes + 1}
|
||||||
|
b, err := io.ReadAll(lr)
|
||||||
|
if err != nil {
|
||||||
|
return nil, "", err
|
||||||
|
}
|
||||||
|
if int64(len(b)) > maxBytes {
|
||||||
|
return nil, "", fmt.Errorf("download exceeded limit: %d > %d", len(b), maxBytes)
|
||||||
|
}
|
||||||
|
return b, resp.Header.Get("Content-Type"), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func decodeImage(data []byte, contentType string) (image.Image, string, error) {
|
||||||
|
// Register gif (jpeg/png already registered) for Decode.
|
||||||
|
_ = gif.GIF{}
|
||||||
|
reader := bytes.NewReader(data)
|
||||||
|
img, fmtName, err := image.Decode(reader)
|
||||||
|
if err == nil {
|
||||||
|
return img, fmtName, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Some servers set odd content-type; try simple sniff.
|
||||||
|
_ = contentType
|
||||||
|
return nil, "", fmt.Errorf("decode image failed: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
func applyResize(img image.Image, opt Options) image.Image {
|
||||||
|
w := opt.TargetWidth
|
||||||
|
h := opt.TargetHeight
|
||||||
|
|
||||||
|
srcW := img.Bounds().Dx()
|
||||||
|
srcH := img.Bounds().Dy()
|
||||||
|
if srcW <= 0 || srcH <= 0 {
|
||||||
|
return img
|
||||||
|
}
|
||||||
|
|
||||||
|
switch opt.Mode {
|
||||||
|
case ResizeModeFill:
|
||||||
|
return imaging.Fill(img, w, h, imaging.Center, imaging.Lanczos)
|
||||||
|
case ResizeModeFit:
|
||||||
|
// If only one dimension is provided, keep aspect.
|
||||||
|
if w == 0 {
|
||||||
|
w = int(float64(srcW) * (float64(h) / float64(srcH)))
|
||||||
|
if w < 1 {
|
||||||
|
w = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if h == 0 {
|
||||||
|
h = int(float64(srcH) * (float64(w) / float64(srcW)))
|
||||||
|
if h < 1 {
|
||||||
|
h = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// imaging.Fit ensures the result fits within w,h without cropping.
|
||||||
|
return imaging.Fit(img, w, h, imaging.Lanczos)
|
||||||
|
case ResizeModePad:
|
||||||
|
bg := opt.PadColor
|
||||||
|
if bg == nil {
|
||||||
|
bg = color.White
|
||||||
|
}
|
||||||
|
// First, fit within WxH (no crop).
|
||||||
|
fitted := imaging.Fit(img, w, h, imaging.Lanczos)
|
||||||
|
// Then, paste centered onto WxH canvas.
|
||||||
|
canvas := imaging.New(w, h, bg)
|
||||||
|
x := (w - fitted.Bounds().Dx()) / 2
|
||||||
|
y := (h - fitted.Bounds().Dy()) / 2
|
||||||
|
return imaging.Paste(canvas, fitted, image.Pt(x, y))
|
||||||
|
default:
|
||||||
|
return img
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func encodeUnderSize(img image.Image, format string, maxBytes int64, minQuality, maxRetries int) ([]byte, error) {
|
||||||
|
if maxBytes <= 0 {
|
||||||
|
return nil, errors.New("maxBytes must be > 0")
|
||||||
|
}
|
||||||
|
|
||||||
|
switch format {
|
||||||
|
case "jpeg":
|
||||||
|
// Binary search quality.
|
||||||
|
lo, hi := minQuality, 92
|
||||||
|
var best []byte
|
||||||
|
iterations := 0
|
||||||
|
maxIterations := maxInt(8, maxRetries/2)
|
||||||
|
|
||||||
|
for i := 0; i < maxIterations && lo <= hi; i++ {
|
||||||
|
iterations++
|
||||||
|
q := (lo + hi) / 2
|
||||||
|
b, err := encodeJPEG(img, q)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if int64(len(b)) <= maxBytes {
|
||||||
|
best = b
|
||||||
|
lo = q + 1
|
||||||
|
} else {
|
||||||
|
hi = q - 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if best != nil {
|
||||||
|
return best, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try more aggressive qualities from minQuality down to 1
|
||||||
|
qualities := []int{}
|
||||||
|
for q := minQuality; q >= 1; q -= 5 {
|
||||||
|
qualities = append(qualities, q)
|
||||||
|
}
|
||||||
|
// Ensure we try the lowest qualities
|
||||||
|
if minQuality > 3 {
|
||||||
|
qualities = append(qualities, 3, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
var lastSize int64
|
||||||
|
for _, q := range qualities {
|
||||||
|
if iterations >= maxRetries {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
iterations++
|
||||||
|
b, err := encodeJPEG(img, q)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
lastSize = int64(len(b))
|
||||||
|
if lastSize <= maxBytes {
|
||||||
|
return b, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sizeMB := float64(lastSize) / (1024 * 1024)
|
||||||
|
targetMB := float64(maxBytes) / (1024 * 1024)
|
||||||
|
return nil, fmt.Errorf("cannot compress to %.2fMB (best: %.2fMB at quality %d after %d attempts). Consider increasing MaxSizeMB or enabling AllowResolutionReduction",
|
||||||
|
targetMB, sizeMB, minQuality, iterations)
|
||||||
|
|
||||||
|
case "png":
|
||||||
|
// PNG size depends heavily on content; try best compression.
|
||||||
|
b, err := encodePNG(img, png.BestCompression)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if int64(len(b)) <= maxBytes {
|
||||||
|
return b, nil
|
||||||
|
}
|
||||||
|
sizeMB := float64(len(b)) / (1024 * 1024)
|
||||||
|
targetMB := float64(maxBytes) / (1024 * 1024)
|
||||||
|
return nil, fmt.Errorf("PNG cannot compress to %.2fMB (got %.2fMB). Consider using JPEG format or enabling AllowResolutionReduction",
|
||||||
|
targetMB, sizeMB)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, errors.New("unsupported output format")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func encodeJPEG(img image.Image, quality int) ([]byte, error) {
|
||||||
|
var buf bytes.Buffer
|
||||||
|
// Use 4:2:0 subsampling (default) for smaller size.
|
||||||
|
err := jpeg.Encode(&buf, img, &jpeg.Options{Quality: quality})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return buf.Bytes(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func encodePNG(img image.Image, level png.CompressionLevel) ([]byte, error) {
|
||||||
|
var buf bytes.Buffer
|
||||||
|
enc := png.Encoder{CompressionLevel: level}
|
||||||
|
if err := enc.Encode(&buf, img); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return buf.Bytes(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func imageHasAlpha(img image.Image) bool {
|
||||||
|
switch img.(type) {
|
||||||
|
case *image.NRGBA, *image.NRGBA64, *image.RGBA, *image.RGBA64, *image.Alpha, *image.Alpha16, *image.Paletted:
|
||||||
|
// Need to inspect pixels if we want exactness; but this is good enough and stable.
|
||||||
|
return true
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func flattenToWhite(img image.Image) image.Image {
|
||||||
|
b := img.Bounds()
|
||||||
|
dst := image.NewRGBA(b)
|
||||||
|
|
||||||
|
// Fill with white.
|
||||||
|
for y := b.Min.Y; y < b.Max.Y; y++ {
|
||||||
|
for x := b.Min.X; x < b.Max.X; x++ {
|
||||||
|
dst.Set(x, y, image.White)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw original image over white background.
|
||||||
|
return imaging.Overlay(dst, img, image.Pt(0, 0), 1.0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func minInt(a, b int) int {
|
||||||
|
if a < b {
|
||||||
|
return a
|
||||||
|
}
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
|
func maxInt(a, b int) int {
|
||||||
|
if a > b {
|
||||||
|
return a
|
||||||
|
}
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
|
// alreadyMeetsRequirements checks if the image already satisfies the size and dimension requirements
|
||||||
|
func alreadyMeetsRequirements(img image.Image, data []byte, opt Options) bool {
|
||||||
|
// Check file size
|
||||||
|
maxBytes := int64(opt.MaxSizeMB * 1024 * 1024)
|
||||||
|
if int64(len(data)) > maxBytes {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check dimensions based on mode
|
||||||
|
srcW := img.Bounds().Dx()
|
||||||
|
srcH := img.Bounds().Dy()
|
||||||
|
targetW := opt.TargetWidth
|
||||||
|
targetH := opt.TargetHeight
|
||||||
|
|
||||||
|
switch opt.Mode {
|
||||||
|
case ResizeModeFit:
|
||||||
|
// For fit mode, check if image is already within or equal to target dimensions
|
||||||
|
if targetW > 0 && srcW > targetW {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if targetH > 0 && srcH > targetH {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// If only one dimension is specified, check aspect ratio compatibility
|
||||||
|
if targetW > 0 && targetH == 0 && srcW <= targetW {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if targetH > 0 && targetW == 0 && srcH <= targetH {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if targetW > 0 && targetH > 0 && srcW <= targetW && srcH <= targetH {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
|
||||||
|
case ResizeModeFill, ResizeModePad:
|
||||||
|
// For fill/pad mode, image must be exactly the target dimensions
|
||||||
|
if srcW != targetW || srcH != targetH {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// tryWithReducedResolution attempts to compress by progressively reducing resolution
|
||||||
|
func tryWithReducedResolution(img image.Image, opt Options, outPath string, maxBytes int64) (string, error) {
|
||||||
|
bounds := img.Bounds()
|
||||||
|
w := bounds.Dx()
|
||||||
|
h := bounds.Dy()
|
||||||
|
|
||||||
|
// Try reducing resolution in steps: 90%, 80%, 70%, 60%, 50%
|
||||||
|
reductions := []float64{0.9, 0.8, 0.7, 0.6, 0.5}
|
||||||
|
|
||||||
|
for _, factor := range reductions {
|
||||||
|
newW := int(float64(w) * factor)
|
||||||
|
newH := int(float64(h) * factor)
|
||||||
|
|
||||||
|
if newW < 100 || newH < 100 {
|
||||||
|
break // Don't reduce too much
|
||||||
|
}
|
||||||
|
|
||||||
|
resized := imaging.Resize(img, newW, newH, imaging.Lanczos)
|
||||||
|
|
||||||
|
// Try to encode with reduced resolution
|
||||||
|
encoded, err := encodeUnderSize(resized, "jpeg", maxBytes, opt.MinQuality, opt.MaxRetries/2)
|
||||||
|
if err == nil {
|
||||||
|
// Success! Save it
|
||||||
|
tmpPath := outPath + ".tmp"
|
||||||
|
if err := os.WriteFile(tmpPath, encoded, 0o644); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
if err := os.Rename(tmpPath, outPath); err != nil {
|
||||||
|
_ = os.Remove(tmpPath)
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return outPath, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
targetMB := float64(maxBytes) / (1024 * 1024)
|
||||||
|
return "", fmt.Errorf("cannot compress to %.2fMB even after reducing resolution to 50%%. Original size too large", targetMB)
|
||||||
|
}
|
||||||
@ -1,6 +1,9 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import "strings"
|
import (
|
||||||
|
"regexp"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
// CleanString 移除所有空白字符
|
// CleanString 移除所有空白字符
|
||||||
func CleanString(s string) string {
|
func CleanString(s string) string {
|
||||||
@ -18,3 +21,33 @@ func TruncateString(s string, maxLen int) string {
|
|||||||
}
|
}
|
||||||
return string(runes[:maxLen])
|
return string(runes[:maxLen])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ExtractTags 从文本中提取标签,标签以 # 开头,后面不能直接跟空格
|
||||||
|
func ExtractTags(s string) []string {
|
||||||
|
if len(s) == 0 {
|
||||||
|
return []string{}
|
||||||
|
}
|
||||||
|
re := regexp.MustCompile(`#[^\s#\p{P}]+`)
|
||||||
|
matches := re.FindAllString(s, -1)
|
||||||
|
|
||||||
|
tags := make([]string, 0, len(matches))
|
||||||
|
for _, match := range matches {
|
||||||
|
// 去掉开头的 #,只保留标签内容
|
||||||
|
tag := match[1:]
|
||||||
|
if len(tag) > 0 {
|
||||||
|
tags = append(tags, tag)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return tags
|
||||||
|
}
|
||||||
|
|
||||||
|
// 去掉自动标签里面多余的引号
|
||||||
|
func CleanAutoHashtagsQuote(input string) string {
|
||||||
|
if input == "" {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
cleaned := strings.ReplaceAll(input, "\\\"", "")
|
||||||
|
cleaned = strings.ReplaceAll(cleaned, "\"", "")
|
||||||
|
return cleaned
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user