修改报名审核逻辑

This commit is contained in:
ly19960718 2021-05-03 18:34:54 +08:00
parent 4d1d919d42
commit 5f4bf1f454
5 changed files with 9 additions and 15 deletions

View File

@ -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();
}

View File

@ -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();
}

View File

@ -32,7 +32,7 @@ public interface IApplyService {
* 修改报名状态
* @param applyAuditVO
*/
void updateAuditState(ApplyAuditVO applyAuditVO);
void updateAuditState(String token,ApplyAuditVO applyAuditVO);
/**
* 新增报名信息

View File

@ -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<String, Object> 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<String, Object> 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);
}
}

View File

@ -62,7 +62,6 @@ public class ApplyAuditLogServiceImpl extends DefaultBaseService implements IApp
Map<String, Object> 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;
}