作者 yangfu
@@ -57,10 +57,10 @@ func (srv CooperationApplicationsService) AuditCooperationApplications(auditComm @@ -57,10 +57,10 @@ func (srv CooperationApplicationsService) AuditCooperationApplications(auditComm
57 // applicationIds = append(applicationIds, idStr) 57 // applicationIds = append(applicationIds, idStr)
58 //} 58 //}
59 _, err := creationCooperationGateway.CooperationApplicationsApproval(allied_creation_cooperation.ReqCooperationApplicationApproval{ 59 _, err := creationCooperationGateway.CooperationApplicationsApproval(allied_creation_cooperation.ReqCooperationApplicationApproval{
60 - CooperationApplicationId: strconv.Itoa(auditCommand.CooperationApplicationId),  
61 - CooperationApplicationDescription: auditCommand.CooperationApplicationVerifyDescription,  
62 - Action: auditCommand.CooperationApplicationStatus,  
63 - Code: "a1-2", 60 + CooperationApplicationId: strconv.Itoa(auditCommand.CooperationApplicationId),
  61 + CooperationApplicationVerifyDescription: auditCommand.CooperationApplicationVerifyDescription,
  62 + Action: auditCommand.CooperationApplicationStatus,
  63 + Code: "a1-2",
64 }) 64 })
65 if err != nil { 65 if err != nil {
66 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 66 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
1 package command 1 package command
2 2
3 import ( 3 import (
4 - "fmt"  
5 -  
6 - "github.com/beego/beego/v2/core/validation"  
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
8 ) 5 )
9 6
@@ -61,21 +58,3 @@ type CreateCooperationContractCommand struct { @@ -61,21 +58,3 @@ type CreateCooperationContractCommand struct {
61 //关联业务员 58 //关联业务员
62 RelationUser []string `json:"relationUser"` 59 RelationUser []string `json:"relationUser"`
63 } 60 }
64 -  
65 -func (createCooperationContractCommand *CreateCooperationContractCommand) Valid(validation *validation.Validation) {  
66 -  
67 -}  
68 -  
69 -func (createCooperationContractCommand *CreateCooperationContractCommand) ValidateCommand() error {  
70 - valid := validation.Validation{}  
71 - b, err := valid.Valid(createCooperationContractCommand)  
72 - if err != nil {  
73 - return err  
74 - }  
75 - if !b {  
76 - for _, validErr := range valid.Errors {  
77 - return fmt.Errorf("%s %s", validErr.Key, validErr.Message)  
78 - }  
79 - }  
80 - return nil  
81 -}  
1 package command 1 package command
2 2
3 import ( 3 import (
4 - "fmt"  
5 -  
6 - "github.com/beego/beego/v2/core/validation"  
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
8 ) 5 )
9 6
@@ -77,21 +74,3 @@ type UpdateCooperationContractCommand struct { @@ -77,21 +74,3 @@ type UpdateCooperationContractCommand struct {
77 //关联业务员 74 //关联业务员
78 RelationUser []string `json:"relationUser"` 75 RelationUser []string `json:"relationUser"`
79 } 76 }
80 -  
81 -func (updateCooperationContractCommand *UpdateCooperationContractCommand) Valid(validation *validation.Validation) {  
82 -  
83 -}  
84 -  
85 -func (updateCooperationContractCommand *UpdateCooperationContractCommand) ValidateCommand() error {  
86 - valid := validation.Validation{}  
87 - b, err := valid.Valid(updateCooperationContractCommand)  
88 - if err != nil {  
89 - return err  
90 - }  
91 - if !b {  
92 - for _, validErr := range valid.Errors {  
93 - return fmt.Errorf("%s %s", validErr.Key, validErr.Message)  
94 - }  
95 - }  
96 - return nil  
97 -}  
@@ -264,9 +264,9 @@ func (gateway HttplibAlliedCreationCooperation) CooperationContractsBatchOperate @@ -264,9 +264,9 @@ func (gateway HttplibAlliedCreationCooperation) CooperationContractsBatchOperate
264 // CooperationContractBatchRemove 批量移除共创合约 264 // CooperationContractBatchRemove 批量移除共创合约
265 func (gateway HttplibAlliedCreationCooperation) CooperationContractBatchRemove(param ReqCooperationContractBatchRemove) (*DataCooperationContractBatchRemove, error) { 265 func (gateway HttplibAlliedCreationCooperation) CooperationContractBatchRemove(param ReqCooperationContractBatchRemove) (*DataCooperationContractBatchRemove, error) {
266 url := gateway.baseUrL + "/cooperation-contracts/batch-remove" 266 url := gateway.baseUrL + "/cooperation-contracts/batch-remove"
267 - method := "DELETE" 267 + method := "POST"
268 req := gateway.CreateRequest(url, method) 268 req := gateway.CreateRequest(url, method)
269 - log.Logger.Debug("向业务模块请求数据:移除共创合约。", map[string]interface{}{ 269 + log.Logger.Debug("向业务模块请求数据:批量移除共创合约。", map[string]interface{}{
270 "api": method + ":" + url, 270 "api": method + ":" + url,
271 "param": param, 271 "param": param,
272 }) 272 })
@@ -93,13 +93,13 @@ type ( @@ -93,13 +93,13 @@ type (
93 } 93 }
94 ) 94 )
95 95
96 -//共创申请批量审核 96 +//共创申请审核
97 type ( 97 type (
98 ReqCooperationApplicationApproval struct { 98 ReqCooperationApplicationApproval struct {
99 - CooperationApplicationId string `json:"cooperationApplicationId"`  
100 - CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述  
101 - Action int `json:"action"` //审核动作,1同意,2拒绝  
102 - Code string `cname:"菜单编码" json:"code" valid:"Required"` 99 + CooperationApplicationId string `json:"cooperationApplicationId"`
  100 + CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //描述
  101 + Action int `json:"action"` //审核动作,1同意,2拒绝
  102 + Code string `json:"code"`
103 } 103 }
104 104
105 DataCooperationApplicationApproval struct { 105 DataCooperationApplicationApproval struct {