From 50fc2989eeda1e5bbdf0a67dd15fa545db2370ed Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 25 Mar 2026 13:03:12 +0800
Subject: [PATCH] 修复typescript版多表代码生成报错问题
---
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index 62aab4c..eaddf0d 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -47,7 +47,7 @@
order by d.parent_id, d.order_num
</select>
- <select id="selectDeptListByRoleId" resultType="Integer">
+ <select id="selectDeptListByRoleId" resultType="Long">
select d.dept_id
from sys_dept d
left join sys_role_dept rd on d.dept_id = rd.dept_id
@@ -82,7 +82,7 @@
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
<include refid="selectDeptVo"/>
- where dept_name=#{deptName} and parent_id = #{parentId} limit 1
+ where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
</select>
<insert id="insertDept" parameterType="SysDept">
@@ -150,8 +150,12 @@
</foreach>
</update>
+ <update id="updateDeptSort" parameterType="SysDept">
+ update sys_dept set order_num = #{orderNum} where dept_id = #{deptId}
+ </update>
+
<delete id="deleteDeptById" parameterType="Long">
update sys_dept set del_flag = '2' where dept_id = #{deptId}
</delete>
-</mapper>
\ No newline at end of file
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.3