@@ -93,11 +93,11 @@ public class UpdateDeptService { | |||
return JsonResult.error(EditDeptCodeEnum.DEPT_NAME_IS_NOT_NULL.getCode(), EditDeptCodeEnum.DEPT_NAME_IS_NOT_NULL.getMsg()); | |||
} | |||
if (oldEditDeptRequest.getId().equals(newEditDeptRequest.getId())) { | |||
if (!oldEditDeptRequest.getId().equals(newEditDeptRequest.getId())) { | |||
return JsonResult.error(EditDeptCodeEnum.DEPT_ID_IS_NOT_SAME.getCode(), EditDeptCodeEnum.DEPT_ID_IS_NOT_SAME.getMsg()); | |||
} | |||
if (oldEditDeptRequest.getPid().equals(newEditDeptRequest.getPid())) { | |||
if (!oldEditDeptRequest.getPid().equals(newEditDeptRequest.getPid())) { | |||
return JsonResult.error(EditDeptCodeEnum.DEPT_PID_IS_NOT_SAME.getCode(), EditDeptCodeEnum.DEPT_PID_IS_NOT_SAME.getMsg()); | |||
} | |||
@@ -27,10 +27,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
<!-- 批量删除数据 --> | |||
<delete id="deleteBatchByMap" parameterType="hashmap"> | |||
delete from th_road_dept | |||
where tenant_id = #{tenantId} and dept_id = #{deptId} and road_id in | |||
<foreach collection="roadIdList" item="roadId" separator="," open="(" close=")"> | |||
#{roadId} | |||
</foreach> | |||
where tenant_id = #{tenantId} and dept_id = #{deptId} | |||
<if test="roadIdList != null and roadIdList.size() >0 "> | |||
and road_id in | |||
<foreach collection="roadIdList" item="roadId" separator="," open="(" close=")"> | |||
#{roadId} | |||
</foreach> | |||
</if> | |||
</delete> | |||
</mapper> |
@@ -26,10 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
<!-- 批量删除数据 --> | |||
<delete id="deleteBatchByMap" parameterType="hashmap"> | |||
delete from th_section_dept | |||
where tenant_id = #{tenantId} and dept_id = #{deptId} and section_id in | |||
<foreach collection="sectionIdList" item="sectionId" separator="," open="(" close=")"> | |||
#{sectionId} | |||
</foreach> | |||
where tenant_id = #{tenantId} and dept_id = #{deptId} | |||
<if test="sectionIdList != null and sectionIdList.size() >0 "> | |||
and section_id in | |||
<foreach collection="sectionIdList" item="sectionId" separator="," open="(" close=")"> | |||
#{sectionId} | |||
</foreach> | |||
</if> | |||
</delete> | |||
</mapper> |