洪城义警-正式版后台
zengh
2021-07-16 eceb0c8f9480995c8a17f1d093f4e658268b234c
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -27,6 +27,8 @@
        <result column="post_id" property="postId"/>
        <result column="online_status" property="online_status"/>
        <result column="work_status" property="work_status"/>
        <result column="examination_type" property="examination_type"/>
        <result column="examination_mx" property="examination_mx"/>
    </resultMap>
    <resultMap id="userResultMaps" type="org.springblade.modules.system.vo.UsersVo">
        <result column="id" property="id"/>
@@ -54,6 +56,8 @@
        <result column="work_status" property="work_status"/>
        <result column="jd" property="jd"/>
        <result column="wd" property="wd"/>
        <result column="examination_type" property="examination_type"/>
        <result column="examination_mx" property="examination_mx"/>
        <result column="dept_name" property="deptName"/>
    </resultMap>
@@ -94,8 +98,11 @@
        select s.*,p.jd,p.wd,ST_ASTEXT ( e.coordinate )  from blade_user s
        LEFT JOIN sys_position p ON p.snumber = s.CODE
        LEFT JOIN sys_enclosure e ON e.anumber = s.CODE
        where s.is_deleted = 0
        left join
        blade_role br
        on
        s.role_id=br.id
        where s.is_deleted = 0 and br.role_alias ='处警员'
        <if test="user.account!=null and user.account != ''">
            and s.account = #{user.account}
        </if>
@@ -107,6 +114,9 @@
        </if>
        <if test="user.userType!=null and user.userType != ''">
            and s.user_type = #{user.userType}
        </if>
        <if test="user.examination_type!=null and user.examination_type != ''">
            and s.examination_type = #{user.examination_type}
        </if>
        <if test="deptIdList!=null and deptIdList.size>0">
            and s.id in (
@@ -123,6 +133,47 @@
        </if>
        ORDER BY id
    </select>
    <select id="selectUserPagetxl" resultMap="userResultMaps">
        select s.*,p.jd,p.wd,ST_ASTEXT ( e.coordinate )  from blade_user s
        LEFT JOIN sys_position p ON p.snumber = s.CODE
        LEFT JOIN sys_enclosure e ON e.anumber = s.CODE
        left join
        blade_role br
        on
        s.role_id=br.id
        where s.is_deleted = 0 AND br.role_name NOT LIKE '%管理员%'
        <if test="user.account!=null and user.account != ''">
            and s.account = #{user.account}
        </if>
        <if test="user.id!=null and user.id != ''">
            and s.id = #{user.id}
        </if>
        <if test="user.realName!=null and user.realName != ''">
            and s.real_name = #{user.realName}
        </if>
        <if test="user.userType!=null and user.userType != ''">
            and s.user_type = #{user.userType}
        </if>
        <if test="user.examination_type!=null and user.examination_type != ''">
            and s.examination_type = #{user.examination_type}
        </if>
        <if test="deptIdList!=null and deptIdList.size>0">
            and s.id in (
            SELECT
            user_id
            FROM
            blade_user_dept
            WHERE
            dept_id IN
            <foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
            )
        </if>
        ORDER BY id
    </select>
    <select id="getUser" resultMap="userResultMap">
        SELECT
            *
@@ -176,4 +227,8 @@
        order by bu.code asc
    </select>
    <select id="selectUser" resultType="java.util.HashMap">
        select CAST(id AS CHAR) as groupmember,real_name as rname from blade_user
    </select>
</mapper>