Browse Source

修改了Mapper的条件

“study” 1 year ago
parent
commit
c84a706865

+ 1 - 1
ruoyi-admin/src/main/resources/mapper/inventory/TbAssetInventoryMapper.xml

@@ -211,6 +211,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="getChildDeptId" parameterType="String" resultType="String">
         select dept_id
         from sys_dept
-        where dept_id = #{deptId} OR ancestors like concat('%,', #{deptId}, ',%')
+        where dept_id = #{deptId} OR parent_id = #{deptId} OR ancestors like concat('%,', #{deptId}, ',%')
     </select>
 </mapper>