UserConfigureMapper.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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.juxiao.xchat.module.xbd.mapper.users.UserConfigureMapper">
  4. <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.users.UserConfigure">
  5. <id column="uid" jdbcType="BIGINT" property="uid" />
  6. <result column="superior_bouns" jdbcType="TINYINT" property="superiorBouns" />
  7. <result column="occupation_ratio" jdbcType="TINYINT" property="occupationRatio" />
  8. <result column="bank_card" jdbcType="VARCHAR" property="bankCard" />
  9. <result column="cardholder" jdbcType="VARCHAR" property="cardholder" />
  10. <result column="green_recom" jdbcType="TINYINT" property="greenRecom" />
  11. <result column="new_users" jdbcType="TINYINT" property="newUsers" />
  12. <result column="game_room" jdbcType="TINYINT" property="gameRoom" />
  13. <result column="green_sort_no" jdbcType="INTEGER" property="greenSortNo" />
  14. <result column="suibao" jdbcType="INTEGER" property="suibao" />
  15. </resultMap>
  16. <sql id="Base_Column_List">
  17. uid, superior_bouns, occupation_ratio, bank_card, cardholder, green_recom, new_users,
  18. game_room, green_sort_no, suibao
  19. </sql>
  20. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  21. select
  22. <include refid="Base_Column_List" />
  23. from user_configure
  24. where uid = #{uid,jdbcType=BIGINT}
  25. </select>
  26. <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserConfigure">
  27. insert into user_configure (uid, superior_bouns, occupation_ratio,
  28. bank_card, cardholder, green_recom,
  29. new_users, game_room, green_sort_no,
  30. suibao)
  31. values (#{uid,jdbcType=BIGINT}, #{superiorBouns,jdbcType=TINYINT}, #{occupationRatio,jdbcType=TINYINT},
  32. #{bankCard,jdbcType=VARCHAR}, #{cardholder,jdbcType=VARCHAR}, #{greenRecom,jdbcType=TINYINT},
  33. #{newUsers,jdbcType=TINYINT}, #{gameRoom,jdbcType=TINYINT}, #{greenSortNo,jdbcType=INTEGER},
  34. #{suibao,jdbcType=INTEGER})
  35. </insert>
  36. <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserConfigure">
  37. insert into user_configure
  38. <trim prefix="(" suffix=")" suffixOverrides=",">
  39. <if test="uid != null">
  40. uid,
  41. </if>
  42. <if test="superiorBouns != null">
  43. superior_bouns,
  44. </if>
  45. <if test="occupationRatio != null">
  46. occupation_ratio,
  47. </if>
  48. <if test="bankCard != null">
  49. bank_card,
  50. </if>
  51. <if test="cardholder != null">
  52. cardholder,
  53. </if>
  54. <if test="greenRecom != null">
  55. green_recom,
  56. </if>
  57. <if test="newUsers != null">
  58. new_users,
  59. </if>
  60. <if test="gameRoom != null">
  61. game_room,
  62. </if>
  63. <if test="greenSortNo != null">
  64. green_sort_no,
  65. </if>
  66. <if test="suibao != null">
  67. suibao,
  68. </if>
  69. </trim>
  70. <trim prefix="values (" suffix=")" suffixOverrides=",">
  71. <if test="uid != null">
  72. #{uid,jdbcType=BIGINT},
  73. </if>
  74. <if test="superiorBouns != null">
  75. #{superiorBouns,jdbcType=TINYINT},
  76. </if>
  77. <if test="occupationRatio != null">
  78. #{occupationRatio,jdbcType=TINYINT},
  79. </if>
  80. <if test="bankCard != null">
  81. #{bankCard,jdbcType=VARCHAR},
  82. </if>
  83. <if test="cardholder != null">
  84. #{cardholder,jdbcType=VARCHAR},
  85. </if>
  86. <if test="greenRecom != null">
  87. #{greenRecom,jdbcType=TINYINT},
  88. </if>
  89. <if test="newUsers != null">
  90. #{newUsers,jdbcType=TINYINT},
  91. </if>
  92. <if test="gameRoom != null">
  93. #{gameRoom,jdbcType=TINYINT},
  94. </if>
  95. <if test="greenSortNo != null">
  96. #{greenSortNo,jdbcType=INTEGER},
  97. </if>
  98. <if test="suibao != null">
  99. #{suibao,jdbcType=INTEGER},
  100. </if>
  101. </trim>
  102. </insert>
  103. <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserConfigure">
  104. update user_configure
  105. <set>
  106. <if test="superiorBouns != null">
  107. superior_bouns = #{superiorBouns,jdbcType=TINYINT},
  108. </if>
  109. <if test="occupationRatio != null">
  110. occupation_ratio = #{occupationRatio,jdbcType=TINYINT},
  111. </if>
  112. <if test="bankCard != null">
  113. bank_card = #{bankCard,jdbcType=VARCHAR},
  114. </if>
  115. <if test="cardholder != null">
  116. cardholder = #{cardholder,jdbcType=VARCHAR},
  117. </if>
  118. <if test="greenRecom != null">
  119. green_recom = #{greenRecom,jdbcType=TINYINT},
  120. </if>
  121. <if test="newUsers != null">
  122. new_users = #{newUsers,jdbcType=TINYINT},
  123. </if>
  124. <if test="gameRoom != null">
  125. game_room = #{gameRoom,jdbcType=TINYINT},
  126. </if>
  127. <if test="greenSortNo != null">
  128. green_sort_no = #{greenSortNo,jdbcType=INTEGER},
  129. </if>
  130. <if test="suibao != null">
  131. suibao = #{suibao,jdbcType=INTEGER},
  132. </if>
  133. </set>
  134. where uid = #{uid,jdbcType=BIGINT}
  135. </update>
  136. <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserConfigure">
  137. update user_configure
  138. set superior_bouns = #{superiorBouns,jdbcType=TINYINT},
  139. occupation_ratio = #{occupationRatio,jdbcType=TINYINT},
  140. bank_card = #{bankCard,jdbcType=VARCHAR},
  141. cardholder = #{cardholder,jdbcType=VARCHAR},
  142. green_recom = #{greenRecom,jdbcType=TINYINT},
  143. new_users = #{newUsers,jdbcType=TINYINT},
  144. game_room = #{gameRoom,jdbcType=TINYINT},
  145. green_sort_no = #{greenSortNo,jdbcType=INTEGER},
  146. suibao = #{suibao,jdbcType=INTEGER}
  147. where uid = #{uid,jdbcType=BIGINT}
  148. </update>
  149. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  150. delete from user_configure
  151. where uid = #{uid,jdbcType=BIGINT}
  152. </delete>
  153. <select id="selectUidList" resultType="java.lang.Long">
  154. select uid from user_configure where suibao = 1
  155. </select>
  156. </mapper>