Pārlūkot izejas kodu

fix 修复 user与dept xml 编写错误

疯狂的狮子Li 1 gadu atpakaļ
vecāks
revīzija
7b4e8324a9

+ 8 - 1
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -8,7 +8,14 @@
     </resultMap>
 
     <select id="selectDeptList" resultMap="SysDeptResult">
-        select ${ew.getSqlSelect} from sys_dept ${ew.getCustomSqlSegment}
+        select
+        <if test="ew.getSqlSelect != null">
+            ${ew.getSqlSelect}
+        </if>
+        <if test="ew.getSqlSelect == null">
+            *
+        </if>
+        from sys_dept ${ew.getCustomSqlSegment}
     </select>
 
     <select id="countDeptById" resultType="Long">

+ 17 - 3
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -12,14 +12,28 @@
     </resultMap>
 
     <select id="selectPageUserList" resultMap="SysUserResult">
-        select ${ew.getSqlSelect}
+        select
+        <if test="ew.getSqlSelect != null">
+            ${ew.getSqlSelect}
+        </if>
+        <if test="ew.getSqlSelect == null">
+            u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,
+            u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark
+        </if>
         from sys_user u
         ${ew.getCustomSqlSegment}
     </select>
 
     <select id="selectUserList" resultMap="SysUserResult">
-        select ${ew.getSqlSelect}
-        from sys_user
+        select
+        <if test="ew.getSqlSelect != null">
+            ${ew.getSqlSelect}
+        </if>
+        <if test="ew.getSqlSelect == null">
+            u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,
+            u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark
+        </if>
+        from sys_user u
         ${ew.getCustomSqlSegment}
     </select>