UserNoblePrettyNoAppMapper.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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.UserNoblePrettyNoAppMapper">
  6. <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.users.UserNoblePrettyNoApp" >
  7. <id column="record_id" property="recordId" jdbcType="INTEGER" />
  8. <result column="uid" property="uid" jdbcType="BIGINT" />
  9. <result column="erban_no" property="erbanNo" jdbcType="BIGINT" />
  10. <result column="noble_id" property="nobleId" jdbcType="INTEGER" />
  11. <result column="noble_name" property="nobleName" jdbcType="VARCHAR" />
  12. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  13. <result column="approve_erban_no" property="approveErbanNo" jdbcType="BIGINT" />
  14. <result column="approve_result" property="approveResult" jdbcType="TINYINT" />
  15. <result column="approve_desc" property="approveDesc" jdbcType="VARCHAR" />
  16. <result column="approve_time" property="approveTime" jdbcType="TIMESTAMP" />
  17. <result column="admin_id" property="adminId" jdbcType="INTEGER" />
  18. </resultMap>
  19. <resultMap id="UserNoblePrettyNoAppVOResultMap" type="com.juxiao.xchat.module.xbd.vo.UserNoblePrettyNoAppVO" >
  20. <id column="record_id" property="recordId" jdbcType="INTEGER" />
  21. <result column="uid" property="uid" jdbcType="BIGINT" />
  22. <result column="erban_no" property="erbanNo" jdbcType="BIGINT" />
  23. <result column="noble_id" property="nobleId" jdbcType="INTEGER" />
  24. <result column="noble_name" property="nobleName" jdbcType="VARCHAR" />
  25. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  26. <result column="approve_erban_no" property="approveErbanNo" jdbcType="BIGINT" />
  27. <result column="approve_result" property="approveResult" jdbcType="TINYINT" />
  28. <result column="approve_desc" property="approveDesc" jdbcType="VARCHAR" />
  29. <result column="approve_time" property="approveTime" jdbcType="TIMESTAMP" />
  30. <result column="admin_id" property="adminId" jdbcType="INTEGER" />
  31. </resultMap>
  32. <sql id="Base_Column_List" >
  33. record_id, uid, erban_no, noble_id, noble_name, create_time, approve_erban_no, approve_result,
  34. approve_desc, approve_time, admin_id
  35. </sql>
  36. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  37. select
  38. <include refid="Base_Column_List" />
  39. from user_noble_pretty_no_app
  40. where record_id = #{recordId,jdbcType=INTEGER}
  41. </select>
  42. <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserNoblePrettyNoApp" >
  43. <selectKey resultType="java.lang.Integer" keyProperty="recordId" order="AFTER" >
  44. SELECT LAST_INSERT_ID()
  45. </selectKey>
  46. insert into user_noble_pretty_no_app (uid, erban_no, noble_id,
  47. noble_name, create_time, approve_erban_no,
  48. approve_result, approve_desc, approve_time,
  49. admin_id)
  50. values (#{uid,jdbcType=BIGINT}, #{erbanNo,jdbcType=BIGINT}, #{nobleId,jdbcType=INTEGER},
  51. #{nobleName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{approveErbanNo,jdbcType=BIGINT},
  52. #{approveResult,jdbcType=TINYINT}, #{approveDesc,jdbcType=VARCHAR}, #{approveTime,jdbcType=TIMESTAMP},
  53. #{adminId,jdbcType=INTEGER})
  54. </insert>
  55. <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserNoblePrettyNoApp" >
  56. <selectKey resultType="java.lang.Integer" keyProperty="recordId" order="AFTER" >
  57. SELECT LAST_INSERT_ID()
  58. </selectKey>
  59. insert into user_noble_pretty_no_app
  60. <trim prefix="(" suffix=")" suffixOverrides="," >
  61. <if test="uid != null" >
  62. uid,
  63. </if>
  64. <if test="erbanNo != null" >
  65. erban_no,
  66. </if>
  67. <if test="nobleId != null" >
  68. noble_id,
  69. </if>
  70. <if test="nobleName != null" >
  71. noble_name,
  72. </if>
  73. <if test="createTime != null" >
  74. create_time,
  75. </if>
  76. <if test="approveErbanNo != null" >
  77. approve_erban_no,
  78. </if>
  79. <if test="approveResult != null" >
  80. approve_result,
  81. </if>
  82. <if test="approveDesc != null" >
  83. approve_desc,
  84. </if>
  85. <if test="approveTime != null" >
  86. approve_time,
  87. </if>
  88. <if test="adminId != null" >
  89. admin_id,
  90. </if>
  91. </trim>
  92. <trim prefix="values (" suffix=")" suffixOverrides="," >
  93. <if test="uid != null" >
  94. #{uid,jdbcType=BIGINT},
  95. </if>
  96. <if test="erbanNo != null" >
  97. #{erbanNo,jdbcType=BIGINT},
  98. </if>
  99. <if test="nobleId != null" >
  100. #{nobleId,jdbcType=INTEGER},
  101. </if>
  102. <if test="nobleName != null" >
  103. #{nobleName,jdbcType=VARCHAR},
  104. </if>
  105. <if test="createTime != null" >
  106. #{createTime,jdbcType=TIMESTAMP},
  107. </if>
  108. <if test="approveErbanNo != null" >
  109. #{approveErbanNo,jdbcType=BIGINT},
  110. </if>
  111. <if test="approveResult != null" >
  112. #{approveResult,jdbcType=TINYINT},
  113. </if>
  114. <if test="approveDesc != null" >
  115. #{approveDesc,jdbcType=VARCHAR},
  116. </if>
  117. <if test="approveTime != null" >
  118. #{approveTime,jdbcType=TIMESTAMP},
  119. </if>
  120. <if test="adminId != null" >
  121. #{adminId,jdbcType=INTEGER},
  122. </if>
  123. </trim>
  124. </insert>
  125. <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserNoblePrettyNoApp" >
  126. update user_noble_pretty_no_app
  127. <set >
  128. <if test="uid != null" >
  129. uid = #{uid,jdbcType=BIGINT},
  130. </if>
  131. <if test="erbanNo != null" >
  132. erban_no = #{erbanNo,jdbcType=BIGINT},
  133. </if>
  134. <if test="nobleId != null" >
  135. noble_id = #{nobleId,jdbcType=INTEGER},
  136. </if>
  137. <if test="nobleName != null" >
  138. noble_name = #{nobleName,jdbcType=VARCHAR},
  139. </if>
  140. <if test="createTime != null" >
  141. create_time = #{createTime,jdbcType=TIMESTAMP},
  142. </if>
  143. <if test="approveErbanNo != null" >
  144. approve_erban_no = #{approveErbanNo,jdbcType=BIGINT},
  145. </if>
  146. <if test="approveResult != null" >
  147. approve_result = #{approveResult,jdbcType=TINYINT},
  148. </if>
  149. <if test="approveDesc != null" >
  150. approve_desc = #{approveDesc,jdbcType=VARCHAR},
  151. </if>
  152. <if test="approveTime != null" >
  153. approve_time = #{approveTime,jdbcType=TIMESTAMP},
  154. </if>
  155. <if test="adminId != null" >
  156. admin_id = #{adminId,jdbcType=INTEGER},
  157. </if>
  158. </set>
  159. where record_id = #{recordId,jdbcType=INTEGER}
  160. </update>
  161. <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserNoblePrettyNoApp" >
  162. update user_noble_pretty_no_app
  163. set uid = #{uid,jdbcType=BIGINT},
  164. erban_no = #{erbanNo,jdbcType=BIGINT},
  165. noble_id = #{nobleId,jdbcType=INTEGER},
  166. noble_name = #{nobleName,jdbcType=VARCHAR},
  167. create_time = #{createTime,jdbcType=TIMESTAMP},
  168. approve_erban_no = #{approveErbanNo,jdbcType=BIGINT},
  169. approve_result = #{approveResult,jdbcType=TINYINT},
  170. approve_desc = #{approveDesc,jdbcType=VARCHAR},
  171. approve_time = #{approveTime,jdbcType=TIMESTAMP},
  172. admin_id = #{adminId,jdbcType=INTEGER}
  173. where record_id = #{recordId,jdbcType=INTEGER}
  174. </update>
  175. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  176. delete from user_noble_pretty_no_app
  177. where record_id = #{recordId,jdbcType=INTEGER}
  178. </delete>
  179. <select id="selectUserNoblePrettyNoAppByList" resultMap="UserNoblePrettyNoAppVOResultMap">
  180. select
  181. <include refid="Base_Column_List" />
  182. from user_noble_pretty_no_app
  183. where 1 = 1
  184. <if test="prettyErBanNo != null">
  185. and approve_erban_no = #{prettyErBanNo}
  186. </if>
  187. <if test="userErBanNo != null">
  188. and erban_no = #{userErBanNo}
  189. </if>
  190. <if test="review != null">
  191. and approve_result = #{review}
  192. </if>
  193. order by create_time desc
  194. </select>
  195. <select id="selectUserNoblePrettyNoAppByUid" resultMap="BaseResultMap">
  196. select
  197. <include refid="Base_Column_List" />
  198. from user_noble_pretty_no_app
  199. where uid = #{uid}
  200. </select>
  201. </mapper>