diff --git a/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java b/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java index 4952023..67d312c 100644 --- a/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java +++ b/src/main/java/cn/com/tenlion/controller/api/apply/ApplyController.java @@ -50,7 +50,7 @@ public class ApplyController extends DefaultBaseController { applyAuditVO.setApplyId(applyId); applyAuditVO.setApplyAuditExplain("用户撤回报名"); applyAuditVO.setApplyAuditState(1); - applyService.updateAuditState(applyAuditVO); + applyService.updateAuditState(null,applyAuditVO); return new SuccessResult(); } @@ -67,7 +67,7 @@ public class ApplyController extends DefaultBaseController { applyAuditVO.setApplyId(applyId); applyAuditVO.setApplyAuditExplain("用户进行报道"); applyAuditVO.setApplyAuditState(3); - applyService.updateAuditState(applyAuditVO); + applyService.updateAuditState(null,applyAuditVO); return new SuccessResult(); } @@ -90,7 +90,7 @@ public class ApplyController extends DefaultBaseController { if(applyDTO.getApplyAuditState() != 0){ throw new SearchException("报名信息已审核"); } - applyService.updateAuditState(applyAuditVO); + applyService.updateAuditState(null,applyAuditVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/controller/app/api/apply/ApplyAppController.java b/src/main/java/cn/com/tenlion/controller/app/api/apply/ApplyAppController.java index 4b14391..ec27107 100644 --- a/src/main/java/cn/com/tenlion/controller/app/api/apply/ApplyAppController.java +++ b/src/main/java/cn/com/tenlion/controller/app/api/apply/ApplyAppController.java @@ -44,12 +44,12 @@ public class ApplyAppController extends DefaultBaseController { @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("updateAuditStateRecall/{applyId}") @CheckRequestBodyAnnotation - public SuccessResult updateAuditStateRecall(@PathVariable("applyId") String applyId) { + public SuccessResult updateAuditStateRecall(@RequestHeader("token") String token,@PathVariable("applyId") String applyId) { ApplyAuditVO applyAuditVO = new ApplyAuditVO(); applyAuditVO.setApplyId(applyId); applyAuditVO.setApplyAuditExplain("用户撤回报名"); applyAuditVO.setApplyAuditState(1); - applyService.updateAuditState(applyAuditVO); + applyService.updateAuditState(token,applyAuditVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/service/apply/IApplyService.java b/src/main/java/cn/com/tenlion/service/apply/IApplyService.java index ddc0430..1aef066 100644 --- a/src/main/java/cn/com/tenlion/service/apply/IApplyService.java +++ b/src/main/java/cn/com/tenlion/service/apply/IApplyService.java @@ -32,7 +32,7 @@ public interface IApplyService { * 修改报名状态 * @param applyAuditVO */ - void updateAuditState(ApplyAuditVO applyAuditVO); + void updateAuditState(String token,ApplyAuditVO applyAuditVO); /** * 新增报名信息 diff --git a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java index 52065f2..0c95ddb 100644 --- a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java @@ -128,7 +128,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic if(applyDTO == null){ throw new SearchException("未获取到报名信息"); } - if(applyDTO.getApplyAuditState() != -1 || applyDTO.getApplyAuditState() != 1){ + if(!(applyDTO.getApplyAuditState() == -1 || applyDTO.getApplyAuditState() == 1)){ throw new SearchException("暂不能修改信息"); } Map params = HashMapUtil.beanToMap(applyVO); @@ -240,7 +240,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic - public void updateAuditState(ApplyAuditVO applyAuditVO){ + public void updateAuditState(String token,ApplyAuditVO applyAuditVO){ Map params = new HashMap<>(); params.put("applyId",applyAuditVO.getApplyId()); params.put("applyAuditState",applyAuditVO.getApplyAuditState()); @@ -249,7 +249,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic auditLogVO.setApplyId(applyAuditVO.getApplyId()); auditLogVO.setApplyAuditState(applyAuditVO.getApplyAuditState()); auditLogVO.setApplyAuditExplain(applyAuditVO.getApplyAuditExplain()); - applyAuditLogService.save(auditLogVO); + applyAuditLogService.save(token,auditLogVO); } } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/applyauditlog/impl/ApplyAuditLogServiceImpl.java b/src/main/java/cn/com/tenlion/service/applyauditlog/impl/ApplyAuditLogServiceImpl.java index 9a39f57..18d3b62 100644 --- a/src/main/java/cn/com/tenlion/service/applyauditlog/impl/ApplyAuditLogServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/applyauditlog/impl/ApplyAuditLogServiceImpl.java @@ -62,7 +62,6 @@ public class ApplyAuditLogServiceImpl extends DefaultBaseService implements IApp Map params = HashMapUtil.beanToMap(applyAuditLogVO); params.put("applyAuditState",4); params.put("applyAuditExplain","用户以报道"); - this.saveReturnId(token,applyAuditLogVO); applyAuditLogDao.save(params); } @@ -80,12 +79,7 @@ public class ApplyAuditLogServiceImpl extends DefaultBaseService implements IApp params.put("applyAuditUserName", appTokenUser.getName()); params.put("applyAuditUserId", appTokenUser.getId()); } - - applyAuditLogDao.save(params); - - - return applyAuditLogId; }