作者 yangfu
... ... @@ -57,10 +57,10 @@ func (srv CooperationApplicationsService) AuditCooperationApplications(auditComm
// applicationIds = append(applicationIds, idStr)
//}
_, err := creationCooperationGateway.CooperationApplicationsApproval(allied_creation_cooperation.ReqCooperationApplicationApproval{
CooperationApplicationId: strconv.Itoa(auditCommand.CooperationApplicationId),
CooperationApplicationDescription: auditCommand.CooperationApplicationVerifyDescription,
Action: auditCommand.CooperationApplicationStatus,
Code: "a1-2",
CooperationApplicationId: strconv.Itoa(auditCommand.CooperationApplicationId),
CooperationApplicationVerifyDescription: auditCommand.CooperationApplicationVerifyDescription,
Action: auditCommand.CooperationApplicationStatus,
Code: "a1-2",
})
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
package command
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
... ... @@ -61,21 +58,3 @@ type CreateCooperationContractCommand struct {
//关联业务员
RelationUser []string `json:"relationUser"`
}
func (createCooperationContractCommand *CreateCooperationContractCommand) Valid(validation *validation.Validation) {
}
func (createCooperationContractCommand *CreateCooperationContractCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(createCooperationContractCommand)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
package command
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
... ... @@ -77,21 +74,3 @@ type UpdateCooperationContractCommand struct {
//关联业务员
RelationUser []string `json:"relationUser"`
}
func (updateCooperationContractCommand *UpdateCooperationContractCommand) Valid(validation *validation.Validation) {
}
func (updateCooperationContractCommand *UpdateCooperationContractCommand) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(updateCooperationContractCommand)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
... ... @@ -264,9 +264,9 @@ func (gateway HttplibAlliedCreationCooperation) CooperationContractsBatchOperate
// CooperationContractBatchRemove 批量移除共创合约
func (gateway HttplibAlliedCreationCooperation) CooperationContractBatchRemove(param ReqCooperationContractBatchRemove) (*DataCooperationContractBatchRemove, error) {
url := gateway.baseUrL + "/cooperation-contracts/batch-remove"
method := "DELETE"
method := "POST"
req := gateway.CreateRequest(url, method)
log.Logger.Debug("向业务模块请求数据:移除共创合约。", map[string]interface{}{
log.Logger.Debug("向业务模块请求数据:批量移除共创合约。", map[string]interface{}{
"api": method + ":" + url,
"param": param,
})
... ...
... ... @@ -93,13 +93,13 @@ type (
}
)
//共创申请批量审核
//共创申请审核
type (
ReqCooperationApplicationApproval struct {
CooperationApplicationId string `json:"cooperationApplicationId"`
CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述
Action int `json:"action"` //审核动作,1同意,2拒绝
Code string `cname:"菜单编码" json:"code" valid:"Required"`
CooperationApplicationId string `json:"cooperationApplicationId"`
CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //描述
Action int `json:"action"` //审核动作,1同意,2拒绝
Code string `json:"code"`
}
DataCooperationApplicationApproval struct {
... ...