南昌市物联网技防平台-后台
zengh
2021-03-23 ba0f00cf00c2a5c693e9608a56d1f7d032f5e216
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserMapper.xml
@@ -25,6 +25,8 @@
        <result column="role_id" property="roleId"/>
        <result column="dept_id" property="deptId"/>
        <result column="post_id" property="postId"/>
        <result column="online_status" property="online_status"/>
        <result column="channlId" property="channlId"/>
    </resultMap>
    <select id="selectUserPage" resultMap="userResultMap">
@@ -73,4 +75,23 @@
        SELECT id, tenant_id, user_type, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id FROM blade_user ${ew.customSqlSegment}
    </select>
    <!--查询处警人员列表-->
    <select id="selectSecurityUserPageList" resultType="org.springblade.system.user.vo.UsersVo">
        SELECT bu.*,p.jd,p.wd FROM blade_user bu
            LEFT JOIN
        jfpt.sys_position p
            on
        p.snumber=bu.code
            where
        role_id = #{user.roleId}
        <if test="user.realName!=null and user.realName !=''">
            <bind name="realName" value="'%'+user.realName+'%'"/>
            and bu.real_name like #{realName}
        </if>
        <if test="user.code!=null">
            <bind name="code" value="'%'+user.code+'%'"/>
            and bu.code like #{code}
        </if>
        order by bu.code asc
    </select>
</mapper>