修复了可以重复结项的BUG
parent
5b045b322b
commit
63bcda51d7
|
@ -56,6 +56,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|||
throw new BadRequestException("项目不存在");
|
||||
if(!Objects.equals(staffId, targetProject.getProjectCreator()))
|
||||
throw new BadRequestException("用户请求非法");
|
||||
if(targetProject.getIsCompleted())
|
||||
throw new BadRequestException("该项目已结项");
|
||||
targetProject.setIsCompleted(true);
|
||||
targetProject.setProjectCloseTime(LocalDate.now());
|
||||
if(baseMapper.updateById(targetProject)==1)
|
||||
|
|
Loading…
Reference in New Issue