fix: 修改

This commit is contained in:
ls
2025-02-26 10:34:54 +08:00
parent 378f90be6d
commit 3f2e08c7a5
245 changed files with 7 additions and 39227 deletions

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.boge.modules.dept.dao.mapper.SysDeptMapper">
<insert id="saveDeptRelation">
replace into sys_user_dept values
<foreach collection="depts" item="dept" separator=",">
(#{user},#{dept})
</foreach>
</insert>
<delete id="delDeptRelation">
delete from sys_user_dept where user_id = #{user}
</delete>
<update id="updateSubCount">
update sys_dept set sub_count =
(select m.count from (select count(*) count from sys_dept where pid = #{pid}) as m)
where dept_id = #{pid}
</update>
<select id="findAllChild" resultType="java.lang.String">
SELECT
max(t3.childId) as deptIds
from
(
select *,
if( find_in_set(t1.pid, @p) > 0,@p := concat(@p,',',id),0 ) as childId
from
(select dept_id as id, pid from sys_dept t order by id) t1,
(select @p := #{pid}) t2
) t3
where childId != '0'
</select>
<select id="getDeptRelation" resultType="java.util.Map">
select * from sys_user_dept where dept_id in (
<foreach collection="deptIds" separator="," item="dept">
#{dept}
</foreach>
)
</select>
</mapper>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.boge.modules.dept.dao.mapper.SysUserDeptMapper">
</mapper>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.boge.modules.dict.dao.mapper.SysDictMapper">
</mapper>