JyUserPlatformMapper.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.fdkankan.manage.mapper.IJyUserPlatformMapper">
  4. <select id="pageList" resultType="com.fdkankan.manage.vo.request.JyUserPlatformVo">
  5. select * from jy_user up
  6. left join jy_platform jp on up.platform_id = jp.id
  7. where up.rec_status = 'A' and jp.rec_status = 'A' and jp.status !=0 and up.id_card != jp.id_card
  8. <if test="param.name != null and param.name !=''">
  9. and up.ry_nick_name like concat ('%',#{param.name},'%')
  10. </if>
  11. <if test="param.phone != null and param.phone !=''">
  12. and up.phone like concat ('%',#{param.phone},'%')
  13. </if>
  14. <if test="param.idCard != null and param.idCard !=''">
  15. and up.id_card like concat ('%',#{param.idCard},'%')
  16. </if>
  17. <if test="param.ryNo != null and param.ryNo !=''">
  18. and up.ry_no like concat ('%',#{param.ryNo},'%')
  19. </if>
  20. <if test="param.platformId != null ">
  21. and up.platform_id = #{param.platformId}
  22. </if>
  23. order by up.id desc
  24. </select>
  25. <select id="queryByKey" resultType="com.fdkankan.manage.vo.JyUserPlatform">
  26. select * from jy_user where rec_status = 'A'
  27. <if test="queryKey != null and queryKey !=''">
  28. and ( ry_nick_name = #{queryKey} or phone = #{queryKey} or id_card = #{queryKey} )
  29. </if>
  30. <if test="noInIds != null and noInIds.size >0">
  31. and id_card not in
  32. <foreach collection="noInIds" item="idCard" open="(" close=")" separator=",">
  33. #{idCard}
  34. </foreach>
  35. </if>
  36. </select>
  37. </mapper>