洪城义警-正式版后台
zhongrj
2023-06-27 2ca9993b57bdd090c4345ea6767687e2fbb83014
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -33,6 +33,7 @@
        <result column="cardid" property="cardid"/>
        <result column="district" property="district"/>
        <result column="jurisdiction" property="jurisdiction"/>
        <result column="team" property="team"/>
    </resultMap>
    <resultMap id="userResultMaps" type="org.springblade.modules.system.vo.UsersVo">
        <result column="id" property="id"/>
@@ -210,7 +211,21 @@
    </select>
    <select id="exportUser" resultType="org.springblade.modules.system.excel.UserExcel">
        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 u.id, u.tenant_id, user_type, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id,
       j.dept_name as fwfw,
       w.dept_name as gzd FROM blade_user u
       LEFT JOIN sys_jurisdiction j on j.id = u.jurisdiction
       LEFT JOIN sys_jurisdiction w on w.id = u.workjurisdiction
       where 1 = 1 and u.is_deleted = 0
        <if test="user.jurisdiction!=null and user.jurisdiction != ''">
            and (jurisdiction = #{user.jurisdiction} or workjurisdiction = #{user.jurisdiction})
        </if>
        <if test="user.workjurisdiction!=null and user.workjurisdiction != ''">
            and workjurisdiction = #{user.workjurisdiction}
        </if>
        <if test="user.realName!=null and user.realName != ''">
            and real_name like concat('%',#{user.realName},'%')
        </if>
    </select>
    <!--根据用户编号查询用户信息-->