Browse Source

仓库报表

3254194295 2 years ago
parent
commit
58414d1dd6
1 changed files with 33 additions and 32 deletions
  1. 33 32
      platform-dao/src/main/resources/mapper/upms/SysUserMapper.xml

+ 33 - 32
platform-dao/src/main/resources/mapper/upms/SysUserMapper.xml

@@ -2,9 +2,41 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.platform.dao.mapper.upms.SysUserMapper">
 <mapper namespace="com.platform.dao.mapper.upms.SysUserMapper">
 
 
+<!--    <select id="selectVOByKeyword" resultType="com.platform.dao.vo.SysUserVO"-->
+<!--            parameterType="com.platform.dao.dto.upms.SysUserDTO">-->
+<!--        select u.* from t_sys_user u-->
+<!--        join t_sys_user_role role-->
+<!--        on u.user_id=role.user_id-->
+<!--        where 1=1-->
+<!--        <if test="keyword !=null and keyword !=''">-->
+<!--            and (u.username like CONCAT('%',#{keyword},'%')-->
+<!--            or u.real_name like CONCAT('%',#{keyword},'%'))-->
+<!--        </if>-->
+<!--        <if test="deptId !=null and deptId !=''">-->
+<!--            and exists (select 1 from t_sys_user_dept t where t.user_id = u.user_id and t.dept_id = #{deptId}-->
+<!--            union select 1 from t_sys_dept t where t.dept_id = #{deptId} and t.parent_id = '0')-->
+<!--        </if>-->
+<!--        <if test="phone !=null and phone !=''">-->
+<!--            and u.phone = #{phone}-->
+<!--        </if>-->
+<!--        <if test="username !=null and username !=''">-->
+<!--            and u.username = #{username}-->
+<!--        </if>-->
+<!--        <if test="teamId !=null and teamId !=''">-->
+<!--            and exists (select 1 from t_sys_user_team t where t.user_id = u.user_id and t.team_id = #{teamId})-->
+<!--        </if>-->
+<!--        <if test="identityType !=null">-->
+<!--            and u.identity_type = #{identityType}-->
+<!--        </if>-->
+<!--        <if test="roleId!=null and roleId!=''">-->
+<!--            and role.role_id=#{roleId}-->
+<!--        </if>-->
+<!--        order by u.update_time desc-->
+<!--    </select>-->
+
     <select id="selectVOByKeyword" resultType="com.platform.dao.vo.SysUserVO"
     <select id="selectVOByKeyword" resultType="com.platform.dao.vo.SysUserVO"
             parameterType="com.platform.dao.dto.upms.SysUserDTO">
             parameterType="com.platform.dao.dto.upms.SysUserDTO">
-        select u.* from t_sys_user u
+        select distinct u.* from t_sys_user u
         join t_sys_user_role role
         join t_sys_user_role role
         on u.user_id=role.user_id
         on u.user_id=role.user_id
         where 1=1
         where 1=1
@@ -48,37 +80,6 @@
         order by u.update_time desc
         order by u.update_time desc
     </select>
     </select>
 
 
-    <select id="selectVOByKeyword" resultType="com.platform.dao.vo.SysUserVO"
-            parameterType="com.platform.dao.dto.upms.SysUserDTO">
-        select distinct u.* from t_sys_user u
-        join t_sys_user_role role
-        on u.user_id=role.user_id
-        where 1=1
-        <if test="keyword !=null and keyword !=''">
-            and (u.username like CONCAT('%',#{keyword},'%')
-            or u.real_name like CONCAT('%',#{keyword},'%'))
-        </if>
-        <if test="deptId !=null and deptId !=''">
-            and exists (select 1 from t_sys_user_dept t where t.user_id = u.user_id and t.dept_id = #{deptId}
-            union select 1 from t_sys_dept t where t.dept_id = #{deptId} and t.parent_id = '0')
-        </if>
-        <if test="phone !=null and phone !=''">
-            and u.phone = #{phone}
-        </if>
-        <if test="username !=null and username !=''">
-            and u.username = #{username}
-        </if>
-        <if test="teamId !=null and teamId !=''">
-            and exists (select 1 from t_sys_user_team t where t.user_id = u.user_id and t.team_id = #{teamId})
-        </if>
-        <if test="identityType !=null">
-            and u.identity_type = #{identityType}
-        </if>
-        <if test="roleId!=null and roleId!=''">
-            and role.role_id=#{roleId}
-        </if>
-        order by u.update_time desc
-    </select>
 
 
 <!--    <select id="selectByDept" resultType="com.platform.dao.vo.SysUserVO"-->
 <!--    <select id="selectByDept" resultType="com.platform.dao.vo.SysUserVO"-->
 <!--            parameterType="com.platform.dao.dto.upms.SysUserDTO">-->
 <!--            parameterType="com.platform.dao.dto.upms.SysUserDTO">-->