正在显示
1 个修改的文件
包含
17 行增加
和
2 行删除
@@ -269,6 +269,11 @@ func (cooperationApplicationService *CooperationApplicationService) ApprovalCoop | @@ -269,6 +269,11 @@ func (cooperationApplicationService *CooperationApplicationService) ApprovalCoop | ||
269 | return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", strconv.FormatInt(cooperationApplicationId, 10))) | 269 | return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", strconv.FormatInt(cooperationApplicationId, 10))) |
270 | } | 270 | } |
271 | 271 | ||
272 | + // 校验共创申请是否已经审核过 | ||
273 | + if cooperationApplication.CooperationApplicationStatus != 1 { | ||
274 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "改申请已经审核过") | ||
275 | + } | ||
276 | + | ||
272 | if approvalCooperationApplicationCommand.Action == 1 { | 277 | if approvalCooperationApplicationCommand.Action == 1 { |
273 | cooperationApplication.CooperationApplicationStatus = 2 | 278 | cooperationApplication.CooperationApplicationStatus = 2 |
274 | } else if approvalCooperationApplicationCommand.Action == 2 { | 279 | } else if approvalCooperationApplicationCommand.Action == 2 { |
@@ -346,7 +351,12 @@ func (cooperationApplicationService *CooperationApplicationService) BatchApprova | @@ -346,7 +351,12 @@ func (cooperationApplicationService *CooperationApplicationService) BatchApprova | ||
346 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 351 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
347 | } else { | 352 | } else { |
348 | if count > 0 { | 353 | if count > 0 { |
349 | - for i, _ := range cooperationApplications { | 354 | + for i, cooperationApplication := range cooperationApplications { |
355 | + // 校验共创申请是否已经审核过 | ||
356 | + if cooperationApplication.CooperationApplicationStatus != 1 { | ||
357 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "改申请已经审核过") | ||
358 | + } | ||
359 | + // 更新共创申请数据 | ||
350 | cooperationApplications[i].CooperationApplicationVerifyDescription = batchApprovalCooperationApplicationCommand.CooperationApplicationVerifyDescription | 360 | cooperationApplications[i].CooperationApplicationVerifyDescription = batchApprovalCooperationApplicationCommand.CooperationApplicationVerifyDescription |
351 | if batchApprovalCooperationApplicationCommand.Action == 1 { // 同意 | 361 | if batchApprovalCooperationApplicationCommand.Action == 1 { // 同意 |
352 | cooperationApplications[i].CooperationApplicationStatus = 2 | 362 | cooperationApplications[i].CooperationApplicationStatus = 2 |
@@ -421,7 +431,12 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr | @@ -421,7 +431,12 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr | ||
421 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 431 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
422 | } else { | 432 | } else { |
423 | if count > 0 { | 433 | if count > 0 { |
424 | - for i, _ := range cooperationApplications { | 434 | + for i, cooperationApplication := range cooperationApplications { |
435 | + // 校验共创申请是否已经审核过 | ||
436 | + if cooperationApplication.CooperationApplicationStatus != 1 { | ||
437 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "改申请已经审核过") | ||
438 | + } | ||
439 | + // 更新共创申请 | ||
425 | if oneClickApprovalCooperationApplicationCommand.Action == 1 { | 440 | if oneClickApprovalCooperationApplicationCommand.Action == 1 { |
426 | cooperationApplications[i].CooperationApplicationStatus = 2 | 441 | cooperationApplications[i].CooperationApplicationStatus = 2 |
427 | } else if oneClickApprovalCooperationApplicationCommand.Action == 2 { | 442 | } else if oneClickApprovalCooperationApplicationCommand.Action == 2 { |
-
请 注册 或 登录 后发表评论