正在显示
20 个修改的文件
包含
54 行增加
和
19 行删除
@@ -29,7 +29,7 @@ type CreateCompanyCommand struct { | @@ -29,7 +29,7 @@ type CreateCompanyCommand struct { | ||
29 | } | 29 | } |
30 | 30 | ||
31 | func (createCompanyCommand *CreateCompanyCommand) Valid(validation *validation.Validation) { | 31 | func (createCompanyCommand *CreateCompanyCommand) Valid(validation *validation.Validation) { |
32 | - validation.SetError("CustomValid", "未实现的自定义认证") | 32 | + |
33 | } | 33 | } |
34 | 34 | ||
35 | func (createCompanyCommand *CreateCompanyCommand) ValidateCommand() error { | 35 | func (createCompanyCommand *CreateCompanyCommand) ValidateCommand() error { |
@@ -19,7 +19,7 @@ type AuditCooperationApplicationCommand struct { | @@ -19,7 +19,7 @@ type AuditCooperationApplicationCommand struct { | ||
19 | } | 19 | } |
20 | 20 | ||
21 | func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) Valid(validation *validation.Validation) { | 21 | func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) Valid(validation *validation.Validation) { |
22 | - validation.SetError("CustomValid", "未实现的自定义认证") | 22 | + |
23 | } | 23 | } |
24 | 24 | ||
25 | func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) ValidateCommand() error { | 25 | func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) ValidateCommand() error { |
@@ -16,7 +16,7 @@ type GetCooperationApplicationQuery struct { | @@ -16,7 +16,7 @@ type GetCooperationApplicationQuery struct { | ||
16 | } | 16 | } |
17 | 17 | ||
18 | func (getCooperationApplicationQuery *GetCooperationApplicationQuery) Valid(validation *validation.Validation) { | 18 | func (getCooperationApplicationQuery *GetCooperationApplicationQuery) Valid(validation *validation.Validation) { |
19 | - validation.SetError("CustomValid", "未实现的自定义认证") | 19 | + |
20 | } | 20 | } |
21 | 21 | ||
22 | func (getCooperationApplicationQuery *GetCooperationApplicationQuery) ValidateQuery() error { | 22 | func (getCooperationApplicationQuery *GetCooperationApplicationQuery) ValidateQuery() error { |
@@ -85,7 +85,7 @@ type CreateCooperationContractCommand struct { | @@ -85,7 +85,7 @@ type CreateCooperationContractCommand struct { | ||
85 | } | 85 | } |
86 | 86 | ||
87 | func (createCooperationContractCommand *CreateCooperationContractCommand) Valid(validation *validation.Validation) { | 87 | func (createCooperationContractCommand *CreateCooperationContractCommand) Valid(validation *validation.Validation) { |
88 | - validation.SetError("CustomValid", "未实现的自定义认证") | 88 | + |
89 | } | 89 | } |
90 | 90 | ||
91 | func (createCooperationContractCommand *CreateCooperationContractCommand) ValidateCommand() error { | 91 | func (createCooperationContractCommand *CreateCooperationContractCommand) ValidateCommand() error { |
@@ -86,7 +86,7 @@ type UpdateCooperationContractCommand struct { | @@ -86,7 +86,7 @@ type UpdateCooperationContractCommand struct { | ||
86 | } | 86 | } |
87 | 87 | ||
88 | func (updateCooperationContractCommand *UpdateCooperationContractCommand) Valid(validation *validation.Validation) { | 88 | func (updateCooperationContractCommand *UpdateCooperationContractCommand) Valid(validation *validation.Validation) { |
89 | - validation.SetError("CustomValid", "未实现的自定义认证") | 89 | + |
90 | } | 90 | } |
91 | 91 | ||
92 | func (updateCooperationContractCommand *UpdateCooperationContractCommand) ValidateCommand() error { | 92 | func (updateCooperationContractCommand *UpdateCooperationContractCommand) ValidateCommand() error { |
@@ -2,6 +2,7 @@ package command | @@ -2,6 +2,7 @@ package command | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | + | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" |
6 | 7 | ||
7 | "github.com/beego/beego/v2/core/validation" | 8 | "github.com/beego/beego/v2/core/validation" |
@@ -17,7 +18,7 @@ type MenuFavoriteCommand struct { | @@ -17,7 +18,7 @@ type MenuFavoriteCommand struct { | ||
17 | } | 18 | } |
18 | 19 | ||
19 | func (menuFavoriteCommand *MenuFavoriteCommand) Valid(validation *validation.Validation) { | 20 | func (menuFavoriteCommand *MenuFavoriteCommand) Valid(validation *validation.Validation) { |
20 | - validation.SetError("CustomValid", "未实现的自定义认证") | 21 | + |
21 | } | 22 | } |
22 | 23 | ||
23 | func (menuFavoriteCommand *MenuFavoriteCommand) ValidateCommand() error { | 24 | func (menuFavoriteCommand *MenuFavoriteCommand) ValidateCommand() error { |
@@ -22,7 +22,7 @@ type MenuUpdateCommand struct { | @@ -22,7 +22,7 @@ type MenuUpdateCommand struct { | ||
22 | } | 22 | } |
23 | 23 | ||
24 | func (menuUpdateQuery *MenuUpdateCommand) Valid(validation *validation.Validation) { | 24 | func (menuUpdateQuery *MenuUpdateCommand) Valid(validation *validation.Validation) { |
25 | - validation.SetError("CustomValid", "未实现的自定义认证") | 25 | + |
26 | } | 26 | } |
27 | 27 | ||
28 | func (menuUpdateQuery *MenuUpdateCommand) ValidateQuery() error { | 28 | func (menuUpdateQuery *MenuUpdateCommand) ValidateQuery() error { |
@@ -15,7 +15,7 @@ type RemoveDividendsOrderCommand struct { | @@ -15,7 +15,7 @@ type RemoveDividendsOrderCommand struct { | ||
15 | } | 15 | } |
16 | 16 | ||
17 | func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) Valid(validation *validation.Validation) { | 17 | func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) Valid(validation *validation.Validation) { |
18 | - validation.SetError("CustomValid", "未实现的自定义认证") | 18 | + |
19 | } | 19 | } |
20 | 20 | ||
21 | func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) ValidateCommand() error { | 21 | func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) ValidateCommand() error { |
@@ -15,7 +15,7 @@ type GetDividendsOrderQuery struct { | @@ -15,7 +15,7 @@ type GetDividendsOrderQuery struct { | ||
15 | } | 15 | } |
16 | 16 | ||
17 | func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) { | 17 | func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) { |
18 | - validation.SetError("CustomValid", "未实现的自定义认证") | 18 | + |
19 | } | 19 | } |
20 | 20 | ||
21 | func (getDividendsOrderQuery *GetDividendsOrderQuery) ValidateQuery() error { | 21 | func (getDividendsOrderQuery *GetDividendsOrderQuery) ValidateQuery() error { |
@@ -14,7 +14,7 @@ type ListDividendsOrdersQuery struct { | @@ -14,7 +14,7 @@ type ListDividendsOrdersQuery struct { | ||
14 | } | 14 | } |
15 | 15 | ||
16 | func (listDividendsOrdersQuery *ListDividendsOrdersQuery) Valid(validation *validation.Validation) { | 16 | func (listDividendsOrdersQuery *ListDividendsOrdersQuery) Valid(validation *validation.Validation) { |
17 | - validation.SetError("CustomValid", "未实现的自定义认证") | 17 | + |
18 | } | 18 | } |
19 | 19 | ||
20 | func (listDividendsOrdersQuery *ListDividendsOrdersQuery) ValidateQuery() error { | 20 | func (listDividendsOrdersQuery *ListDividendsOrdersQuery) ValidateQuery() error { |
@@ -21,7 +21,7 @@ type SearchDividendsOrderQuery struct { | @@ -21,7 +21,7 @@ type SearchDividendsOrderQuery struct { | ||
21 | } | 21 | } |
22 | 22 | ||
23 | func (searchDividendsOrderQuery *SearchDividendsOrderQuery) Valid(validation *validation.Validation) { | 23 | func (searchDividendsOrderQuery *SearchDividendsOrderQuery) Valid(validation *validation.Validation) { |
24 | - validation.SetError("CustomValid", "未实现的自定义认证") | 24 | + |
25 | } | 25 | } |
26 | 26 | ||
27 | func (searchDividendsOrderQuery *SearchDividendsOrderQuery) ValidateQuery() error { | 27 | func (searchDividendsOrderQuery *SearchDividendsOrderQuery) ValidateQuery() error { |
@@ -15,7 +15,7 @@ type OrgGetQuery struct { | @@ -15,7 +15,7 @@ type OrgGetQuery struct { | ||
15 | } | 15 | } |
16 | 16 | ||
17 | func (orgGetQuery *OrgGetQuery) Valid(validation *validation.Validation) { | 17 | func (orgGetQuery *OrgGetQuery) Valid(validation *validation.Validation) { |
18 | - validation.SetError("CustomValid", "未实现的自定义认证") | 18 | + |
19 | } | 19 | } |
20 | 20 | ||
21 | func (orgGetQuery *OrgGetQuery) ValidateQuery() error { | 21 | func (orgGetQuery *OrgGetQuery) ValidateQuery() error { |
@@ -2,6 +2,7 @@ package query | @@ -2,6 +2,7 @@ package query | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | + | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" |
6 | 7 | ||
7 | "github.com/beego/beego/v2/core/validation" | 8 | "github.com/beego/beego/v2/core/validation" |
@@ -15,7 +16,7 @@ type RoleMenuBeforeEditQuery struct { | @@ -15,7 +16,7 @@ type RoleMenuBeforeEditQuery struct { | ||
15 | } | 16 | } |
16 | 17 | ||
17 | func (roleMenuBeforeEditQuery *RoleMenuBeforeEditQuery) Valid(validation *validation.Validation) { | 18 | func (roleMenuBeforeEditQuery *RoleMenuBeforeEditQuery) Valid(validation *validation.Validation) { |
18 | - validation.SetError("CustomValid", "未实现的自定义认证") | 19 | + |
19 | } | 20 | } |
20 | 21 | ||
21 | func (roleMenuBeforeEditQuery *RoleMenuBeforeEditQuery) ValidateQuery() error { | 22 | func (roleMenuBeforeEditQuery *RoleMenuBeforeEditQuery) ValidateQuery() error { |
@@ -2,6 +2,7 @@ package query | @@ -2,6 +2,7 @@ package query | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | + | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" |
6 | 7 | ||
7 | "github.com/beego/beego/v2/core/validation" | 8 | "github.com/beego/beego/v2/core/validation" |
@@ -15,7 +16,7 @@ type RoleUserBeforeEditQuery struct { | @@ -15,7 +16,7 @@ type RoleUserBeforeEditQuery struct { | ||
15 | } | 16 | } |
16 | 17 | ||
17 | func (roleUserBeforeEditQuery *RoleUserBeforeEditQuery) Valid(validation *validation.Validation) { | 18 | func (roleUserBeforeEditQuery *RoleUserBeforeEditQuery) Valid(validation *validation.Validation) { |
18 | - //validation.SetError("CustomValid", "未实现的自定义认证") | 19 | + |
19 | } | 20 | } |
20 | 21 | ||
21 | func (roleUserBeforeEditQuery *RoleUserBeforeEditQuery) ValidateQuery() error { | 22 | func (roleUserBeforeEditQuery *RoleUserBeforeEditQuery) ValidateQuery() error { |
@@ -15,7 +15,7 @@ type RoleUserInfoQuery struct { | @@ -15,7 +15,7 @@ type RoleUserInfoQuery struct { | ||
15 | } | 15 | } |
16 | 16 | ||
17 | func (roleUserInfoQuery *RoleUserInfoQuery) Valid(validation *validation.Validation) { | 17 | func (roleUserInfoQuery *RoleUserInfoQuery) Valid(validation *validation.Validation) { |
18 | - validation.SetError("CustomValid", "未实现的自定义认证") | 18 | + |
19 | } | 19 | } |
20 | 20 | ||
21 | func (roleUserInfoQuery *RoleUserInfoQuery) ValidateQuery() error { | 21 | func (roleUserInfoQuery *RoleUserInfoQuery) ValidateQuery() error { |
@@ -33,7 +33,7 @@ type CompanyUserAddCommand struct { | @@ -33,7 +33,7 @@ type CompanyUserAddCommand struct { | ||
33 | } | 33 | } |
34 | 34 | ||
35 | func (companyUserAddCommand *CompanyUserAddCommand) Valid(validation *validation.Validation) { | 35 | func (companyUserAddCommand *CompanyUserAddCommand) Valid(validation *validation.Validation) { |
36 | - validation.SetError("CustomValid", "未实现的自定义认证") | 36 | + |
37 | } | 37 | } |
38 | 38 | ||
39 | func (companyUserAddCommand *CompanyUserAddCommand) ValidateCommand() error { | 39 | func (companyUserAddCommand *CompanyUserAddCommand) ValidateCommand() error { |
@@ -17,7 +17,7 @@ type CompanyUserEnableCommand struct { | @@ -17,7 +17,7 @@ type CompanyUserEnableCommand struct { | ||
17 | } | 17 | } |
18 | 18 | ||
19 | func (companyUserEnableCommand *CompanyUserEnableCommand) Valid(validation *validation.Validation) { | 19 | func (companyUserEnableCommand *CompanyUserEnableCommand) Valid(validation *validation.Validation) { |
20 | - validation.SetError("CustomValid", "未实现的自定义认证") | 20 | + |
21 | } | 21 | } |
22 | 22 | ||
23 | func (companyUserEnableCommand *CompanyUserEnableCommand) ValidateCommand() error { | 23 | func (companyUserEnableCommand *CompanyUserEnableCommand) ValidateCommand() error { |
@@ -14,7 +14,7 @@ type CompanyUserResetPasswordCommand struct { | @@ -14,7 +14,7 @@ type CompanyUserResetPasswordCommand struct { | ||
14 | } | 14 | } |
15 | 15 | ||
16 | func (companyUserResetPasswordCommand *CompanyUserResetPasswordCommand) Valid(validation *validation.Validation) { | 16 | func (companyUserResetPasswordCommand *CompanyUserResetPasswordCommand) Valid(validation *validation.Validation) { |
17 | - validation.SetError("CustomValid", "未实现的自定义认证") | 17 | + |
18 | } | 18 | } |
19 | 19 | ||
20 | func (companyUserResetPasswordCommand *CompanyUserResetPasswordCommand) ValidateCommand() error { | 20 | func (companyUserResetPasswordCommand *CompanyUserResetPasswordCommand) ValidateCommand() error { |
@@ -42,7 +42,7 @@ type Role struct { | @@ -42,7 +42,7 @@ type Role struct { | ||
42 | } | 42 | } |
43 | 43 | ||
44 | func (companyUserUpdateCommand *CompanyUserUpdateCommand) Valid(validation *validation.Validation) { | 44 | func (companyUserUpdateCommand *CompanyUserUpdateCommand) Valid(validation *validation.Validation) { |
45 | - validation.SetError("CustomValid", "未实现的自定义认证") | 45 | + |
46 | } | 46 | } |
47 | 47 | ||
48 | func (companyUserUpdateCommand *CompanyUserUpdateCommand) ValidateCommand() error { | 48 | func (companyUserUpdateCommand *CompanyUserUpdateCommand) ValidateCommand() error { |
@@ -196,3 +196,35 @@ func (gateway HttplibAlliedCreationCooperation) DividendsReturnedOrderGet(param | @@ -196,3 +196,35 @@ func (gateway HttplibAlliedCreationCooperation) DividendsReturnedOrderGet(param | ||
196 | err = gateway.GetResponseData(result, &data) | 196 | err = gateway.GetResponseData(result, &data) |
197 | return &data, err | 197 | return &data, err |
198 | } | 198 | } |
199 | + | ||
200 | +// DividendsReturnedOrderBatchRemove 批量移除分红退货单 | ||
201 | +func (gateway HttplibAlliedCreationCooperation) DividendsReturnedOrderBatchRemove(param ReqDividendsReturnedOrderRemove) ( | ||
202 | + *DataDividendsReturnedOrderRemove, error) { | ||
203 | + url := gateway.baseUrL + "/dividends-returned-orders/batch-remove" | ||
204 | + method := "POST" | ||
205 | + req := gateway.CreateRequest(url, method) | ||
206 | + log.Logger.Debug("向业务模块请求数据:批量移除分红退货单。", map[string]interface{}{ | ||
207 | + "api": method + ":" + url, | ||
208 | + "param": param, | ||
209 | + }) | ||
210 | + req, err := req.JSONBody(param) | ||
211 | + if err != nil { | ||
212 | + return nil, fmt.Errorf("请求批量移除分红退货单失败:%w", err) | ||
213 | + } | ||
214 | + | ||
215 | + byteResult, err := req.Bytes() | ||
216 | + if err != nil { | ||
217 | + return nil, fmt.Errorf("获取批量移除分红退货单失败:%w", err) | ||
218 | + } | ||
219 | + log.Logger.Debug("获取业务模块请求数据:批量移除分红退货单。", map[string]interface{}{ | ||
220 | + "result": string(byteResult), | ||
221 | + }) | ||
222 | + var result service_gateway.GatewayResponse | ||
223 | + err = json.Unmarshal(byteResult, &result) | ||
224 | + if err != nil { | ||
225 | + return nil, fmt.Errorf("解析移除分红退货单:%w", err) | ||
226 | + } | ||
227 | + var data DataDividendsReturnedOrderRemove | ||
228 | + err = gateway.GetResponseData(result, &data) | ||
229 | + return &data, err | ||
230 | +} |
-
请 注册 或 登录 后发表评论