MeetDao.xml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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="io.renren.modules.qyh.mapper.MeetMapper">
  4. <resultMap type="io.renren.modules.qyh.entity.MeetEntity" id="meetMap">
  5. <result property="id" column="id"/>
  6. <result property="expertId" column="expert_id"/>
  7. <result property="storeId" column="store_id"/>
  8. <result property="groupWay" column="group_way"/>
  9. <result property="groupWayEndTime" column="group_way_end_time"/>
  10. <result property="groupNumberPeople" column="group_number_people"/>
  11. <result property="topicId" column="topic_id"/>
  12. <result property="meetPrice" column="meet_price"/>
  13. <result property="meetTime" column="meet_time"/>
  14. <result property="content" column="content"/>
  15. <result property="type" column="type"/>
  16. <result property="process" column="process"/>
  17. <result property="meetType" column="meet_type"/>
  18. <result property="denialReason" column="denial_reason"/>
  19. <result property="denialTime" column="denial_time"/>
  20. <result property="createId" column="create_id"/>
  21. <result property="createTime" column="create_time"/>
  22. <result property="updateId" column="update_id"/>
  23. <result property="updateTime" column="update_time"/>
  24. <result property="isDelete" column="is_delete"/>
  25. <result property="verifyTime" column="verify_time"/>
  26. </resultMap>
  27. <select id="selectGroupList" resultType="io.renren.modules.qyh.model.vo.GroupListVO">
  28. SELECT
  29. wm.id AS meet_id,
  30. wm.expert_id,
  31. wm.group_number_people,
  32. wm.group_way_end_time
  33. FROM
  34. `qyh_meet` wm
  35. WHERE
  36. wm.group_way = 1
  37. AND wm.is_delete = '0'
  38. AND wm.meet_type = 0
  39. AND wm.expert_id = #{expertId}
  40. AND wm.topic_id = #{topicId}
  41. </select>
  42. <select id="myServicePage" resultType="io.renren.modules.qyh.model.vo.MyServicePageVO">
  43. SELECT
  44. wm.id AS meet_id,
  45. wm.type,
  46. wm.meet_time AS meetTime,
  47. wm.process ,
  48. wet.topic_name,
  49. wet.topic_price
  50. FROM
  51. `qyh_meet` wm
  52. JOIN `qyh_expert_topic` wet on wm.topic_id = wet.id AND wet.is_delete = '0'
  53. <where>
  54. wm.is_delete = '0'
  55. AND (wm.process != -3 AND wm.meet_type != 0)
  56. <if test="params.processList != null and params.processList.size > 0">
  57. and wm.process in
  58. <foreach item="process" collection="params.processList" open="(" separator="," close=")">
  59. #{process}
  60. </foreach>
  61. </if>
  62. <if test="params.expertId != null and params.expertId != ''">
  63. and wm.expert_id = #{params.expertId}
  64. </if>
  65. </where>
  66. order by
  67. wm.meet_time asc
  68. </select>
  69. <select id="selectMyServiceStatistics" resultType="java.lang.Integer">
  70. SELECT
  71. COUNT( 1 )
  72. FROM
  73. qyh_meet
  74. WHERE
  75. is_delete = '0'
  76. AND (process != -3 AND meet_type != 0)
  77. <if test="expertId != null and expertId != ''">
  78. AND expert_id = #{expertId}
  79. </if>
  80. <if test="processList != null and processList.size > 0">
  81. and process in
  82. <foreach item="process" collection="processList" open="(" separator="," close=")">
  83. #{process}
  84. </foreach>
  85. </if>
  86. </select>
  87. </mapper>