fix:审核添加接口

禁止向已被删除的项目添加
This commit is contained in:
xiangZr-hhh 2024-04-22 22:06:48 +08:00
parent cbcce7687b
commit f9f35dd4a0
3 changed files with 5 additions and 2 deletions

View File

@ -43,6 +43,9 @@ public interface ProjectMapper {
@Select("select * from organize_oa.oa_project where id=#{id}")
ProjectDO getProjectById(Long id);
@Select("select * from organize_oa.oa_project where id=#{id} and is_delete = 0")
ProjectDO getNotDeleteProjectById(Long id);
@Select("select * from organize_oa.oa_project where id=#{id}")
ProjectDO tgetProjectById(Integer id);

View File

@ -179,7 +179,7 @@ public class ReviewServiceImpl implements ReviewService {
Integer userId = Math.toIntExact(Processing.getAuthHeaderToUserId(request));
//检查对应项目子系统子模块是否存在
if (!projectDAO.isExistProjectById(Long.valueOf(reviewAddVO.getProjectId()))) {
if (projectMapper.getNotDeleteProjectById(Long.valueOf(reviewAddVO.getProjectId())) == null) {
return ResultUtil.error(ErrorCode.PROJECT_NOT_EXIST);
}

View File

@ -141,7 +141,7 @@
<update id="deleteReview">
update organize_oa.oa_review
set is_deleted = 1
set is_delete = 1
where id = ${id}
</update>