JyUserPlatformMapper.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 up.id,up.ry_id,up.ry_no,up.id_card,up.ry_nick_name as name ,up.phone,up.platform_id,up.status,up.create_time from jy_user up
  6. where up.rec_status = 'A'
  7. <if test="param.name != null and param.name !=''">
  8. and up.ry_nick_name like concat ('%',#{param.name},'%')
  9. </if>
  10. <if test="param.phone != null and param.phone !=''">
  11. and up.phone like concat ('%',#{param.phone},'%')
  12. </if>
  13. <if test="param.idCard != null and param.idCard !=''">
  14. and up.id_card like concat ('%',#{param.idCard},'%')
  15. </if>
  16. <if test="param.ryNo != null and param.ryNo !=''">
  17. and up.ry_no like concat ('%',#{param.ryNo},'%')
  18. </if>
  19. <if test="param.platformId != null ">
  20. and up.platform_id = #{param.platformId}
  21. </if>
  22. UNION all SELECT pw.id,null,null,null,name ,null,pw.platform_id,null,pw.create_time from jy_platform_user_wait pw
  23. WHERE pw.rec_status = 'A'
  24. <if test="param.name != null and param.name !=''">
  25. and pw.name like concat ('%',#{param.name},'%')
  26. </if>
  27. <if test="param.phone != null and param.phone !=''">
  28. and pw.rec_status = 'AA'
  29. </if>
  30. <if test="param.idCard != null and param.idCard !=''">
  31. and pw.rec_status = 'AA'
  32. </if>
  33. <if test="param.ryNo != null and param.ryNo !=''">
  34. and pw.rec_status = 'AA'
  35. </if>
  36. <if test="param.platformId != null ">
  37. and pw.platform_id = #{param.platformId}
  38. </if>
  39. order by create_time desc,id desc
  40. </select>
  41. <select id="queryByKey" resultType="com.fdkankan.manage.vo.JyUserPlatform">
  42. select id,id_card,ry_nick_name as name ,phone,platform_id,status,create_time,sys_user_id from jy_user where rec_status = 'A' and status = 1
  43. <if test="queryKey != null and queryKey !=''">
  44. and ( ry_nick_name = #{queryKey} or phone = #{queryKey} or id_card = #{queryKey} )
  45. </if>
  46. </select>
  47. </mapper>