commit for pull

This commit is contained in:
caixiang
2023-03-01 12:05:06 +08:00
parent 31bc287207
commit 14745366be
9 changed files with 28 additions and 20 deletions

View File

@@ -6,8 +6,9 @@
<select id="getList" resultType="com.cnbm.admin.entity.SysDeptEntity">
select t1.*,(select t2.name from sys_dept t2 where t2.id=t1.pid)parentName from sys_dept t1
<where>
t1.valid = 1
<if test="deptIdList != null">
t1.id in
and t1.id in
<foreach item="id" collection="deptIdList" open="(" separator="," close=")">
#{id}
</foreach>
@@ -18,15 +19,15 @@
<select id="getById" resultType="com.cnbm.admin.entity.SysDeptEntity">
select t1.*,(select t2.name from sys_dept t2 where t2.id=t1.pid)parentName from sys_dept t1
where t1.id = #{value}
where t1.id = #{value} AND t1.valid = 1
</select>
<select id="getIdAndPidList" resultType="com.cnbm.admin.entity.SysDeptEntity">
select t1.id, t1.pid from sys_dept t1
select t1.id, t1.pid from sys_dept t1 AND t1.valid = 1
</select>
<select id="getSubDeptIdList" resultType="long">
select id from sys_dept where pids like #{id}
select id from sys_dept where pids like #{id} AND valid = 1
</select>
</mapper>