TaShareRecordMapper.xml 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.huiju.estateagents.mapper.TaShareRecordMapper">
  4. <select id="recordSuccessList" resultType="com.huiju.estateagents.entity.TaShareRecord">
  5. (select
  6. t.nickname,
  7. t.phone,
  8. t.create_time,
  9. t.end_time,
  10. t.verification_status,
  11. t.verification_code
  12. from ta_share_record t where 1=1
  13. <if test="status !=null and status != ''">
  14. and t.status = #{status}
  15. </if>
  16. <if test="orgId != null and orgId != ''">
  17. and t.org_id = #{orgId}
  18. </if>
  19. <if test="phone != null and phone != ''">
  20. and t.phone = #{phone}
  21. </if> order by t.end_time desc limit 100000000)
  22. union all
  23. (select
  24. a.nickname as joinNickName,
  25. a.phone as joinPhone,
  26. a.create_time as joinCreateTime,
  27. a.end_time as joinEndTime,
  28. a.verification_status as joinVerificationStatus,
  29. a.verification_code as joinVerificationCode
  30. from ta_share_child_record a where where 1=1
  31. <if test="status !=null and status != ''">
  32. and a.status = #{status}
  33. </if>
  34. <if test="orgId != null and orgId != ''">
  35. and a.org_id = #{orgId}
  36. </if>
  37. <if test="phone != null and phone != ''">
  38. and a.phone = #{phone}
  39. </if> order by a.end_time desc limit 100000000)
  40. </select>
  41. <select id="recordFailAndProcessingList" resultType="com.huiju.estateagents.po.TaShareRecordPO">
  42. select t.record_id, t.nickname, t.phone, t.create_time, a.group_buy_people, a.join_people from ta_share_record t
  43. left join ta_share_activity a on t.group_activity_id = a.group_acticity_id
  44. where 1=1
  45. <if test="status !=null and status != ''">
  46. and t.status = #{status}
  47. </if>
  48. <if test="orgId != null and orgId != ''">
  49. and t.org_id = #{orgId}
  50. </if>
  51. <if test="phone != null and phone != ''">
  52. and t.phone = #{phone}
  53. </if> order by t.create_time desc
  54. </select>
  55. </mapper>