浏览代码

周报档案

王燏镕 8 月之前
父节点
当前提交
6104895a12
共有 1 个文件被更改,包括 12 次插入7 次删除
  1. 12 7
      pms-service/src/main/resources/mapper/ProjectWMapper.xml

+ 12 - 7
pms-service/src/main/resources/mapper/ProjectWMapper.xml

@@ -30,12 +30,17 @@
     </select>
     <select id="getUserVoByUserId" resultType="com.tofly.pms.fegin.vo.UserVo">
         select
-            id,
-            username,
-            real_name
-        from public.sys_user where id in
-      <foreach collection="userIdList" item="userId" separator="," open="(" close=")">
-          #{userId}
-      </foreach>
+        id,
+        username,
+        real_name
+        from public.sys_user
+        <where>
+            <if test="userIdList != null and userIdList.size() > 0">
+                id in
+                <foreach collection="userIdList" item="userId" separator="," open="(" close=")">
+                    #{userId}
+                </foreach>
+            </if>
+        </where>
     </select>
 </mapper>