UserMapper.xml 957 B

123456789101112131415161718
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xjrsoft.module.organization.mapper.UserMapper">
  6. <select id="getResetUserPage" parameterType="com.xjrsoft.module.organization.dto.UserPageDto" resultType="com.xjrsoft.module.organization.vo.ResetUserPageVo">
  7. SELECT DISTINCT t1.*,t3.name AS gender_cn FROM xjr_user t1
  8. INNER JOIN xjr_user_role_relation t2 ON t2.user_id = t1.id
  9. LEFT JOIN xjr_dictionary_detail t3 ON t1.gender = t3.code
  10. WHERE t1.delete_mark = 0
  11. <if test="dto.keyword != null and dto.keyword !=''">
  12. and (t1.name like concat('%', #{dto.keyword}, '%') or t1.mobile like concat('%', #{dto.keyword}, '%'))
  13. </if>
  14. <if test="dto.roleId != null">
  15. and t2.role_id = #{dto.roleId}
  16. </if>
  17. </select>
  18. </mapper>