修改报名审核逻辑
This commit is contained in:
parent
4d1d919d42
commit
5f4bf1f454
@ -50,7 +50,7 @@ public class ApplyController extends DefaultBaseController {
|
|||||||
applyAuditVO.setApplyId(applyId);
|
applyAuditVO.setApplyId(applyId);
|
||||||
applyAuditVO.setApplyAuditExplain("用户撤回报名");
|
applyAuditVO.setApplyAuditExplain("用户撤回报名");
|
||||||
applyAuditVO.setApplyAuditState(1);
|
applyAuditVO.setApplyAuditState(1);
|
||||||
applyService.updateAuditState(applyAuditVO);
|
applyService.updateAuditState(null,applyAuditVO);
|
||||||
return new SuccessResult();
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ public class ApplyController extends DefaultBaseController {
|
|||||||
applyAuditVO.setApplyId(applyId);
|
applyAuditVO.setApplyId(applyId);
|
||||||
applyAuditVO.setApplyAuditExplain("用户进行报道");
|
applyAuditVO.setApplyAuditExplain("用户进行报道");
|
||||||
applyAuditVO.setApplyAuditState(3);
|
applyAuditVO.setApplyAuditState(3);
|
||||||
applyService.updateAuditState(applyAuditVO);
|
applyService.updateAuditState(null,applyAuditVO);
|
||||||
return new SuccessResult();
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ public class ApplyController extends DefaultBaseController {
|
|||||||
if(applyDTO.getApplyAuditState() != 0){
|
if(applyDTO.getApplyAuditState() != 0){
|
||||||
throw new SearchException("报名信息已审核");
|
throw new SearchException("报名信息已审核");
|
||||||
}
|
}
|
||||||
applyService.updateAuditState(applyAuditVO);
|
applyService.updateAuditState(null,applyAuditVO);
|
||||||
return new SuccessResult();
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,12 +44,12 @@ public class ApplyAppController extends DefaultBaseController {
|
|||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PutMapping("updateAuditStateRecall/{applyId}")
|
@PutMapping("updateAuditStateRecall/{applyId}")
|
||||||
@CheckRequestBodyAnnotation
|
@CheckRequestBodyAnnotation
|
||||||
public SuccessResult updateAuditStateRecall(@PathVariable("applyId") String applyId) {
|
public SuccessResult updateAuditStateRecall(@RequestHeader("token") String token,@PathVariable("applyId") String applyId) {
|
||||||
ApplyAuditVO applyAuditVO = new ApplyAuditVO();
|
ApplyAuditVO applyAuditVO = new ApplyAuditVO();
|
||||||
applyAuditVO.setApplyId(applyId);
|
applyAuditVO.setApplyId(applyId);
|
||||||
applyAuditVO.setApplyAuditExplain("用户撤回报名");
|
applyAuditVO.setApplyAuditExplain("用户撤回报名");
|
||||||
applyAuditVO.setApplyAuditState(1);
|
applyAuditVO.setApplyAuditState(1);
|
||||||
applyService.updateAuditState(applyAuditVO);
|
applyService.updateAuditState(token,applyAuditVO);
|
||||||
return new SuccessResult();
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public interface IApplyService {
|
|||||||
* 修改报名状态
|
* 修改报名状态
|
||||||
* @param applyAuditVO
|
* @param applyAuditVO
|
||||||
*/
|
*/
|
||||||
void updateAuditState(ApplyAuditVO applyAuditVO);
|
void updateAuditState(String token,ApplyAuditVO applyAuditVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增报名信息
|
* 新增报名信息
|
||||||
|
@ -128,7 +128,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
if(applyDTO == null){
|
if(applyDTO == null){
|
||||||
throw new SearchException("未获取到报名信息");
|
throw new SearchException("未获取到报名信息");
|
||||||
}
|
}
|
||||||
if(applyDTO.getApplyAuditState() != -1 || applyDTO.getApplyAuditState() != 1){
|
if(!(applyDTO.getApplyAuditState() == -1 || applyDTO.getApplyAuditState() == 1)){
|
||||||
throw new SearchException("暂不能修改信息");
|
throw new SearchException("暂不能修改信息");
|
||||||
}
|
}
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(applyVO);
|
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<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("applyId",applyAuditVO.getApplyId());
|
params.put("applyId",applyAuditVO.getApplyId());
|
||||||
params.put("applyAuditState",applyAuditVO.getApplyAuditState());
|
params.put("applyAuditState",applyAuditVO.getApplyAuditState());
|
||||||
@ -249,7 +249,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
auditLogVO.setApplyId(applyAuditVO.getApplyId());
|
auditLogVO.setApplyId(applyAuditVO.getApplyId());
|
||||||
auditLogVO.setApplyAuditState(applyAuditVO.getApplyAuditState());
|
auditLogVO.setApplyAuditState(applyAuditVO.getApplyAuditState());
|
||||||
auditLogVO.setApplyAuditExplain(applyAuditVO.getApplyAuditExplain());
|
auditLogVO.setApplyAuditExplain(applyAuditVO.getApplyAuditExplain());
|
||||||
applyAuditLogService.save(auditLogVO);
|
applyAuditLogService.save(token,auditLogVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -62,7 +62,6 @@ public class ApplyAuditLogServiceImpl extends DefaultBaseService implements IApp
|
|||||||
Map<String, Object> params = HashMapUtil.beanToMap(applyAuditLogVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(applyAuditLogVO);
|
||||||
params.put("applyAuditState",4);
|
params.put("applyAuditState",4);
|
||||||
params.put("applyAuditExplain","用户以报道");
|
params.put("applyAuditExplain","用户以报道");
|
||||||
this.saveReturnId(token,applyAuditLogVO);
|
|
||||||
applyAuditLogDao.save(params);
|
applyAuditLogDao.save(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,12 +79,7 @@ public class ApplyAuditLogServiceImpl extends DefaultBaseService implements IApp
|
|||||||
params.put("applyAuditUserName", appTokenUser.getName());
|
params.put("applyAuditUserName", appTokenUser.getName());
|
||||||
params.put("applyAuditUserId", appTokenUser.getId());
|
params.put("applyAuditUserId", appTokenUser.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
applyAuditLogDao.save(params);
|
applyAuditLogDao.save(params);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return applyAuditLogId;
|
return applyAuditLogId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user