bug修改

This commit is contained in:
lym
2024-04-25 11:09:39 +08:00
parent a1cbfbfaef
commit 82e388372c
5 changed files with 80 additions and 67 deletions
@@ -83,6 +83,8 @@ public class ProcessServiceImpl implements ProcessService {
public void updateProcess(ProcessUserSaveReqVO updateReqVO) {
// 校验存在
validateProcessExists(updateReqVO.getId());
// 校验状态
validateProcessStatus(updateReqVO.getId());
ProcessDO updateProcess = BeanUtils.toBean(updateReqVO, ProcessDO.class);
processUserService.deleteProcessUserByProcess(updateReqVO.getId());
@@ -123,6 +125,13 @@ public class ProcessServiceImpl implements ProcessService {
}
}
private void validateProcessStatus(Long id) {
ProcessDO process = processMapper.selectById(id);
if (process != null && process.getIsEnabled() == Boolean.FALSE) {
throw exception(PROCESS_STATUS_DISABLE);
}
}
@Override
public ProcessUserRespVO getProcess(Long id) {
// 校验存在