fix:审核添加接口
禁止向已被删除的项目添加
This commit is contained in:
parent
cbcce7687b
commit
f9f35dd4a0
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
|
||||
<update id="deleteReview">
|
||||
update organize_oa.oa_review
|
||||
set is_deleted = 1
|
||||
set is_delete = 1
|
||||
where id = ${id}
|
||||
</update>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user