RoomOpenHistMapper.xml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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.juxiao.xchat.module.xbd.mapper.room.RoomOpenHistMapper">
  6. <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.room.RoomOpenHist" >
  7. <id column="hist_id" property="histId" jdbcType="VARCHAR" />
  8. <result column="uid" property="uid" jdbcType="BIGINT" />
  9. <result column="room_id" property="roomId" jdbcType="BIGINT" />
  10. <result column="meeting_name" property="meetingName" jdbcType="VARCHAR" />
  11. <result column="type" property="type" jdbcType="TINYINT" />
  12. <result column="reward_money" property="rewardMoney" jdbcType="BIGINT" />
  13. <result column="serv_dura" property="servDura" jdbcType="INTEGER" />
  14. <result column="close_type" property="closeType" jdbcType="TINYINT" />
  15. <result column="open_time" property="openTime" jdbcType="TIMESTAMP" />
  16. <result column="close_time" property="closeTime" jdbcType="TIMESTAMP" />
  17. <result column="dura" property="dura" jdbcType="DOUBLE" />
  18. </resultMap>
  19. <sql id="Base_Column_List" >
  20. hist_id, uid, room_id, meeting_name, type, reward_money, serv_dura, close_type, open_time,
  21. close_time, dura
  22. </sql>
  23. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  24. select
  25. <include refid="Base_Column_List" />
  26. from room_open_hist
  27. where hist_id = #{histId,jdbcType=VARCHAR}
  28. </select>
  29. <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.room.RoomOpenHist" >
  30. insert into room_open_hist (hist_id, uid, room_id,
  31. meeting_name, type, reward_money,
  32. serv_dura, close_type, open_time,
  33. close_time, dura)
  34. values (#{histId,jdbcType=VARCHAR}, #{uid,jdbcType=BIGINT}, #{roomId,jdbcType=BIGINT},
  35. #{meetingName,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, #{rewardMoney,jdbcType=BIGINT},
  36. #{servDura,jdbcType=INTEGER}, #{closeType,jdbcType=TINYINT}, #{openTime,jdbcType=TIMESTAMP},
  37. #{closeTime,jdbcType=TIMESTAMP}, #{dura,jdbcType=DOUBLE})
  38. </insert>
  39. <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.room.RoomOpenHist" >
  40. insert into room_open_hist
  41. <trim prefix="(" suffix=")" suffixOverrides="," >
  42. <if test="histId != null" >
  43. hist_id,
  44. </if>
  45. <if test="uid != null" >
  46. uid,
  47. </if>
  48. <if test="roomId != null" >
  49. room_id,
  50. </if>
  51. <if test="meetingName != null" >
  52. meeting_name,
  53. </if>
  54. <if test="type != null" >
  55. type,
  56. </if>
  57. <if test="rewardMoney != null" >
  58. reward_money,
  59. </if>
  60. <if test="servDura != null" >
  61. serv_dura,
  62. </if>
  63. <if test="closeType != null" >
  64. close_type,
  65. </if>
  66. <if test="openTime != null" >
  67. open_time,
  68. </if>
  69. <if test="closeTime != null" >
  70. close_time,
  71. </if>
  72. <if test="dura != null" >
  73. dura,
  74. </if>
  75. </trim>
  76. <trim prefix="values (" suffix=")" suffixOverrides="," >
  77. <if test="histId != null" >
  78. #{histId,jdbcType=VARCHAR},
  79. </if>
  80. <if test="uid != null" >
  81. #{uid,jdbcType=BIGINT},
  82. </if>
  83. <if test="roomId != null" >
  84. #{roomId,jdbcType=BIGINT},
  85. </if>
  86. <if test="meetingName != null" >
  87. #{meetingName,jdbcType=VARCHAR},
  88. </if>
  89. <if test="type != null" >
  90. #{type,jdbcType=TINYINT},
  91. </if>
  92. <if test="rewardMoney != null" >
  93. #{rewardMoney,jdbcType=BIGINT},
  94. </if>
  95. <if test="servDura != null" >
  96. #{servDura,jdbcType=INTEGER},
  97. </if>
  98. <if test="closeType != null" >
  99. #{closeType,jdbcType=TINYINT},
  100. </if>
  101. <if test="openTime != null" >
  102. #{openTime,jdbcType=TIMESTAMP},
  103. </if>
  104. <if test="closeTime != null" >
  105. #{closeTime,jdbcType=TIMESTAMP},
  106. </if>
  107. <if test="dura != null" >
  108. #{dura,jdbcType=DOUBLE},
  109. </if>
  110. </trim>
  111. </insert>
  112. <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.room.RoomOpenHist" >
  113. update room_open_hist
  114. <set >
  115. <if test="uid != null" >
  116. uid = #{uid,jdbcType=BIGINT},
  117. </if>
  118. <if test="roomId != null" >
  119. room_id = #{roomId,jdbcType=BIGINT},
  120. </if>
  121. <if test="meetingName != null" >
  122. meeting_name = #{meetingName,jdbcType=VARCHAR},
  123. </if>
  124. <if test="type != null" >
  125. type = #{type,jdbcType=TINYINT},
  126. </if>
  127. <if test="rewardMoney != null" >
  128. reward_money = #{rewardMoney,jdbcType=BIGINT},
  129. </if>
  130. <if test="servDura != null" >
  131. serv_dura = #{servDura,jdbcType=INTEGER},
  132. </if>
  133. <if test="closeType != null" >
  134. close_type = #{closeType,jdbcType=TINYINT},
  135. </if>
  136. <if test="openTime != null" >
  137. open_time = #{openTime,jdbcType=TIMESTAMP},
  138. </if>
  139. <if test="closeTime != null" >
  140. close_time = #{closeTime,jdbcType=TIMESTAMP},
  141. </if>
  142. <if test="dura != null" >
  143. dura = #{dura,jdbcType=DOUBLE},
  144. </if>
  145. </set>
  146. where hist_id = #{histId,jdbcType=VARCHAR}
  147. </update>
  148. <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.room.RoomOpenHist" >
  149. update room_open_hist
  150. set uid = #{uid,jdbcType=BIGINT},
  151. room_id = #{roomId,jdbcType=BIGINT},
  152. meeting_name = #{meetingName,jdbcType=VARCHAR},
  153. type = #{type,jdbcType=TINYINT},
  154. reward_money = #{rewardMoney,jdbcType=BIGINT},
  155. serv_dura = #{servDura,jdbcType=INTEGER},
  156. close_type = #{closeType,jdbcType=TINYINT},
  157. open_time = #{openTime,jdbcType=TIMESTAMP},
  158. close_time = #{closeTime,jdbcType=TIMESTAMP},
  159. dura = #{dura,jdbcType=DOUBLE}
  160. where hist_id = #{histId,jdbcType=VARCHAR}
  161. </update>
  162. </mapper>