NobelUsersMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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.users.NobleUsersMapper">
  6. <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.users.NobleUsers" >
  7. <id column="uid" property="uid" jdbcType="BIGINT" />
  8. <result column="noble_id" property="nobleId" jdbcType="INTEGER" />
  9. <result column="noble_name" property="nobleName" jdbcType="VARCHAR" />
  10. <result column="expire" property="expire" jdbcType="TIMESTAMP" />
  11. <result column="badge_id" property="badgeId" jdbcType="INTEGER" />
  12. <result column="badge" property="badge" jdbcType="VARCHAR" />
  13. <result column="cardbg_id" property="cardbgId" jdbcType="INTEGER" />
  14. <result column="cardbg" property="cardbg" jdbcType="VARCHAR" />
  15. <result column="zonebg_id" property="zonebgId" jdbcType="INTEGER" />
  16. <result column="zonebg" property="zonebg" jdbcType="VARCHAR" />
  17. <result column="room_background_id" property="roomBackgroundId" jdbcType="INTEGER" />
  18. <result column="room_background" property="roomBackground" jdbcType="VARCHAR" />
  19. <result column="mic_decorate_id" property="micDecorateId" jdbcType="INTEGER" />
  20. <result column="mic_decorate" property="micDecorate" jdbcType="VARCHAR" />
  21. <result column="chat_bubble_id" property="chatBubbleId" jdbcType="INTEGER" />
  22. <result column="chat_bubble" property="chatBubble" jdbcType="VARCHAR" />
  23. <result column="mic_halo_id" property="micHaloId" jdbcType="INTEGER" />
  24. <result column="mic_halo" property="micHalo" jdbcType="VARCHAR" />
  25. <result column="enter_hide" property="enterHide" jdbcType="TINYINT" />
  26. <result column="rank_hide" property="rankHide" jdbcType="TINYINT" />
  27. <result column="good_num" property="goodNum" jdbcType="BIGINT" />
  28. <result column="recom_count" property="recomCount" jdbcType="TINYINT" />
  29. <result column="status" property="status" jdbcType="TINYINT" />
  30. <result column="open_time" property="openTime" jdbcType="TIMESTAMP" />
  31. <result column="renew_time" property="renewTime" jdbcType="TIMESTAMP" />
  32. </resultMap>
  33. <sql id="Base_Column_List" >
  34. uid, noble_id, noble_name, expire, badge_id, badge, cardbg_id, cardbg, zonebg_id,
  35. zonebg, room_background_id, room_background, mic_decorate_id, mic_decorate, chat_bubble_id,
  36. chat_bubble, mic_halo_id, mic_halo, enter_hide, rank_hide, good_num, recom_count,
  37. status, open_time, renew_time
  38. </sql>
  39. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
  40. select
  41. <include refid="Base_Column_List" />
  42. from noble_users
  43. where uid = #{uid,jdbcType=BIGINT}
  44. </select>
  45. <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.users.NobleUsers" >
  46. insert into noble_users (uid, noble_id, noble_name,
  47. expire, badge_id, badge,
  48. cardbg_id, cardbg, zonebg_id,
  49. zonebg, room_background_id, room_background,
  50. mic_decorate_id, mic_decorate, chat_bubble_id,
  51. chat_bubble, mic_halo_id, mic_halo,
  52. enter_hide, rank_hide, good_num,
  53. recom_count, status, open_time,
  54. renew_time)
  55. values (#{uid,jdbcType=BIGINT}, #{nobleId,jdbcType=INTEGER}, #{nobleName,jdbcType=VARCHAR},
  56. #{expire,jdbcType=TIMESTAMP}, #{badgeId,jdbcType=INTEGER}, #{badge,jdbcType=VARCHAR},
  57. #{cardbgId,jdbcType=INTEGER}, #{cardbg,jdbcType=VARCHAR}, #{zonebgId,jdbcType=INTEGER},
  58. #{zonebg,jdbcType=VARCHAR}, #{roomBackgroundId,jdbcType=INTEGER}, #{roomBackground,jdbcType=VARCHAR},
  59. #{micDecorateId,jdbcType=INTEGER}, #{micDecorate,jdbcType=VARCHAR}, #{chatBubbleId,jdbcType=INTEGER},
  60. #{chatBubble,jdbcType=VARCHAR}, #{micHaloId,jdbcType=INTEGER}, #{micHalo,jdbcType=VARCHAR},
  61. #{enterHide,jdbcType=TINYINT}, #{rankHide,jdbcType=TINYINT}, #{goodNum,jdbcType=BIGINT},
  62. #{recomCount,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{openTime,jdbcType=TIMESTAMP},
  63. #{renewTime,jdbcType=TIMESTAMP})
  64. </insert>
  65. <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.NobleUsers" >
  66. insert into noble_users
  67. <trim prefix="(" suffix=")" suffixOverrides="," >
  68. <if test="uid != null" >
  69. uid,
  70. </if>
  71. <if test="nobleId != null" >
  72. noble_id,
  73. </if>
  74. <if test="nobleName != null" >
  75. noble_name,
  76. </if>
  77. <if test="expire != null" >
  78. expire,
  79. </if>
  80. <if test="badgeId != null" >
  81. badge_id,
  82. </if>
  83. <if test="badge != null" >
  84. badge,
  85. </if>
  86. <if test="cardbgId != null" >
  87. cardbg_id,
  88. </if>
  89. <if test="cardbg != null" >
  90. cardbg,
  91. </if>
  92. <if test="zonebgId != null" >
  93. zonebg_id,
  94. </if>
  95. <if test="zonebg != null" >
  96. zonebg,
  97. </if>
  98. <if test="roomBackgroundId != null" >
  99. room_background_id,
  100. </if>
  101. <if test="roomBackground != null" >
  102. room_background,
  103. </if>
  104. <if test="micDecorateId != null" >
  105. mic_decorate_id,
  106. </if>
  107. <if test="micDecorate != null" >
  108. mic_decorate,
  109. </if>
  110. <if test="chatBubbleId != null" >
  111. chat_bubble_id,
  112. </if>
  113. <if test="chatBubble != null" >
  114. chat_bubble,
  115. </if>
  116. <if test="micHaloId != null" >
  117. mic_halo_id,
  118. </if>
  119. <if test="micHalo != null" >
  120. mic_halo,
  121. </if>
  122. <if test="enterHide != null" >
  123. enter_hide,
  124. </if>
  125. <if test="rankHide != null" >
  126. rank_hide,
  127. </if>
  128. <if test="goodNum != null" >
  129. good_num,
  130. </if>
  131. <if test="recomCount != null" >
  132. recom_count,
  133. </if>
  134. <if test="status != null" >
  135. status,
  136. </if>
  137. <if test="openTime != null" >
  138. open_time,
  139. </if>
  140. <if test="renewTime != null" >
  141. renew_time,
  142. </if>
  143. </trim>
  144. <trim prefix="values (" suffix=")" suffixOverrides="," >
  145. <if test="uid != null" >
  146. #{uid,jdbcType=BIGINT},
  147. </if>
  148. <if test="nobleId != null" >
  149. #{nobleId,jdbcType=INTEGER},
  150. </if>
  151. <if test="nobleName != null" >
  152. #{nobleName,jdbcType=VARCHAR},
  153. </if>
  154. <if test="expire != null" >
  155. #{expire,jdbcType=TIMESTAMP},
  156. </if>
  157. <if test="badgeId != null" >
  158. #{badgeId,jdbcType=INTEGER},
  159. </if>
  160. <if test="badge != null" >
  161. #{badge,jdbcType=VARCHAR},
  162. </if>
  163. <if test="cardbgId != null" >
  164. #{cardbgId,jdbcType=INTEGER},
  165. </if>
  166. <if test="cardbg != null" >
  167. #{cardbg,jdbcType=VARCHAR},
  168. </if>
  169. <if test="zonebgId != null" >
  170. #{zonebgId,jdbcType=INTEGER},
  171. </if>
  172. <if test="zonebg != null" >
  173. #{zonebg,jdbcType=VARCHAR},
  174. </if>
  175. <if test="roomBackgroundId != null" >
  176. #{roomBackgroundId,jdbcType=INTEGER},
  177. </if>
  178. <if test="roomBackground != null" >
  179. #{roomBackground,jdbcType=VARCHAR},
  180. </if>
  181. <if test="micDecorateId != null" >
  182. #{micDecorateId,jdbcType=INTEGER},
  183. </if>
  184. <if test="micDecorate != null" >
  185. #{micDecorate,jdbcType=VARCHAR},
  186. </if>
  187. <if test="chatBubbleId != null" >
  188. #{chatBubbleId,jdbcType=INTEGER},
  189. </if>
  190. <if test="chatBubble != null" >
  191. #{chatBubble,jdbcType=VARCHAR},
  192. </if>
  193. <if test="micHaloId != null" >
  194. #{micHaloId,jdbcType=INTEGER},
  195. </if>
  196. <if test="micHalo != null" >
  197. #{micHalo,jdbcType=VARCHAR},
  198. </if>
  199. <if test="enterHide != null" >
  200. #{enterHide,jdbcType=TINYINT},
  201. </if>
  202. <if test="rankHide != null" >
  203. #{rankHide,jdbcType=TINYINT},
  204. </if>
  205. <if test="goodNum != null" >
  206. #{goodNum,jdbcType=BIGINT},
  207. </if>
  208. <if test="recomCount != null" >
  209. #{recomCount,jdbcType=TINYINT},
  210. </if>
  211. <if test="status != null" >
  212. #{status,jdbcType=TINYINT},
  213. </if>
  214. <if test="openTime != null" >
  215. #{openTime,jdbcType=TIMESTAMP},
  216. </if>
  217. <if test="renewTime != null" >
  218. #{renewTime,jdbcType=TIMESTAMP},
  219. </if>
  220. </trim>
  221. </insert>
  222. <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.NobleUsers" >
  223. update noble_users
  224. <set >
  225. <if test="nobleId != null" >
  226. noble_id = #{nobleId,jdbcType=INTEGER},
  227. </if>
  228. <if test="nobleName != null" >
  229. noble_name = #{nobleName,jdbcType=VARCHAR},
  230. </if>
  231. <if test="expire != null" >
  232. expire = #{expire,jdbcType=TIMESTAMP},
  233. </if>
  234. <if test="badgeId != null" >
  235. badge_id = #{badgeId,jdbcType=INTEGER},
  236. </if>
  237. <if test="badge != null" >
  238. badge = #{badge,jdbcType=VARCHAR},
  239. </if>
  240. <if test="cardbgId != null" >
  241. cardbg_id = #{cardbgId,jdbcType=INTEGER},
  242. </if>
  243. <if test="cardbg != null" >
  244. cardbg = #{cardbg,jdbcType=VARCHAR},
  245. </if>
  246. <if test="zonebgId != null" >
  247. zonebg_id = #{zonebgId,jdbcType=INTEGER},
  248. </if>
  249. <if test="zonebg != null" >
  250. zonebg = #{zonebg,jdbcType=VARCHAR},
  251. </if>
  252. <if test="roomBackgroundId != null" >
  253. room_background_id = #{roomBackgroundId,jdbcType=INTEGER},
  254. </if>
  255. <if test="roomBackground != null" >
  256. room_background = #{roomBackground,jdbcType=VARCHAR},
  257. </if>
  258. <if test="micDecorateId != null" >
  259. mic_decorate_id = #{micDecorateId,jdbcType=INTEGER},
  260. </if>
  261. <if test="micDecorate != null" >
  262. mic_decorate = #{micDecorate,jdbcType=VARCHAR},
  263. </if>
  264. <if test="chatBubbleId != null" >
  265. chat_bubble_id = #{chatBubbleId,jdbcType=INTEGER},
  266. </if>
  267. <if test="chatBubble != null" >
  268. chat_bubble = #{chatBubble,jdbcType=VARCHAR},
  269. </if>
  270. <if test="micHaloId != null" >
  271. mic_halo_id = #{micHaloId,jdbcType=INTEGER},
  272. </if>
  273. <if test="micHalo != null" >
  274. mic_halo = #{micHalo,jdbcType=VARCHAR},
  275. </if>
  276. <if test="enterHide != null" >
  277. enter_hide = #{enterHide,jdbcType=TINYINT},
  278. </if>
  279. <if test="rankHide != null" >
  280. rank_hide = #{rankHide,jdbcType=TINYINT},
  281. </if>
  282. <if test="goodNum != null" >
  283. good_num = #{goodNum,jdbcType=BIGINT},
  284. </if>
  285. <if test="recomCount != null" >
  286. recom_count = #{recomCount,jdbcType=TINYINT},
  287. </if>
  288. <if test="status != null" >
  289. status = #{status,jdbcType=TINYINT},
  290. </if>
  291. <if test="openTime != null" >
  292. open_time = #{openTime,jdbcType=TIMESTAMP},
  293. </if>
  294. <if test="renewTime != null" >
  295. renew_time = #{renewTime,jdbcType=TIMESTAMP},
  296. </if>
  297. </set>
  298. where uid = #{uid,jdbcType=BIGINT}
  299. </update>
  300. <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.users.NobleUsers" >
  301. update noble_users
  302. set noble_id = #{nobleId,jdbcType=INTEGER},
  303. noble_name = #{nobleName,jdbcType=VARCHAR},
  304. expire = #{expire,jdbcType=TIMESTAMP},
  305. badge_id = #{badgeId,jdbcType=INTEGER},
  306. badge = #{badge,jdbcType=VARCHAR},
  307. cardbg_id = #{cardbgId,jdbcType=INTEGER},
  308. cardbg = #{cardbg,jdbcType=VARCHAR},
  309. zonebg_id = #{zonebgId,jdbcType=INTEGER},
  310. zonebg = #{zonebg,jdbcType=VARCHAR},
  311. room_background_id = #{roomBackgroundId,jdbcType=INTEGER},
  312. room_background = #{roomBackground,jdbcType=VARCHAR},
  313. mic_decorate_id = #{micDecorateId,jdbcType=INTEGER},
  314. mic_decorate = #{micDecorate,jdbcType=VARCHAR},
  315. chat_bubble_id = #{chatBubbleId,jdbcType=INTEGER},
  316. chat_bubble = #{chatBubble,jdbcType=VARCHAR},
  317. mic_halo_id = #{micHaloId,jdbcType=INTEGER},
  318. mic_halo = #{micHalo,jdbcType=VARCHAR},
  319. enter_hide = #{enterHide,jdbcType=TINYINT},
  320. rank_hide = #{rankHide,jdbcType=TINYINT},
  321. good_num = #{goodNum,jdbcType=BIGINT},
  322. recom_count = #{recomCount,jdbcType=TINYINT},
  323. status = #{status,jdbcType=TINYINT},
  324. open_time = #{openTime,jdbcType=TIMESTAMP},
  325. renew_time = #{renewTime,jdbcType=TIMESTAMP}
  326. where uid = #{uid,jdbcType=BIGINT}
  327. </update>
  328. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
  329. delete from noble_users
  330. where uid = #{uid,jdbcType=BIGINT}
  331. </delete>
  332. <select id="selectByUid" resultMap="BaseResultMap">
  333. select
  334. <include refid="Base_Column_List" />
  335. from noble_users
  336. where uid = #{uid} and expire &gt;= #{expire} and status = #{status}
  337. </select>
  338. </mapper>