...
|
...
|
@@ -602,6 +602,7 @@ func (cooperationApplicationService *CooperationApplicationService) CancelCooper |
|
|
}()
|
|
|
//TODO 校验用户菜单模块权限
|
|
|
|
|
|
// 共创申请仓储初始化
|
|
|
var cooperationApplicationRepository domain.CooperationApplicationRepository
|
|
|
if value, err := factory.CreateCooperationApplicationRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
...
|
...
|
@@ -610,12 +611,16 @@ func (cooperationApplicationService *CooperationApplicationService) CancelCooper |
|
|
} else {
|
|
|
cooperationApplicationRepository = value
|
|
|
}
|
|
|
cooperationApplication, err := cooperationApplicationRepository.FindOne(map[string]interface{}{"cooperationApplicationId": cancelCooperationApplicationCommand.CooperationApplicationId})
|
|
|
cooperationApplicationId, err := strconv.ParseInt(cancelCooperationApplicationCommand.CooperationApplicationId, 10, 64)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "共创申请ID错误")
|
|
|
}
|
|
|
cooperationApplication, err := cooperationApplicationRepository.FindOne(map[string]interface{}{"cooperationApplicationId": cooperationApplicationId})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if cooperationApplication == nil {
|
|
|
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", strconv.FormatInt(cancelCooperationApplicationCommand.CooperationApplicationId, 10)))
|
|
|
return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", strconv.FormatInt(cooperationApplicationId, 10)))
|
|
|
}
|
|
|
if err := cooperationApplication.Update(map[string]interface{}{
|
|
|
"isCanceled": true,
|
...
|
...
|
|