AdminUserCountMapper.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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.goafanti.common.dao.AdminUserCountMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.AdminUserCount">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="aid" jdbcType="VARCHAR" property="aid" />
  7. <result column="private_count" jdbcType="INTEGER" property="privateCount" />
  8. <result column="sign_count" jdbcType="INTEGER" property="signCount" />
  9. <result column="channel_count" jdbcType="INTEGER" property="channelCount" />
  10. <result column="public_release_count" jdbcType="INTEGER" property="publicReleaseCount" />
  11. <result column="follow_count" jdbcType="INTEGER" property="followCount" />
  12. <result column="order_count" jdbcType="INTEGER" property="orderCount" />
  13. <result column="date_time" jdbcType="DATE" property="dateTime" />
  14. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  15. </resultMap>
  16. <sql id="Base_Column_List">
  17. id, aid, private_count, sign_count, channel_count, public_release_count, follow_count,
  18. order_count, date_time, create_time
  19. </sql>
  20. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  21. select
  22. <include refid="Base_Column_List" />
  23. from admin_user_count
  24. where id = #{id,jdbcType=INTEGER}
  25. </select>
  26. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  27. delete from admin_user_count
  28. where id = #{id,jdbcType=INTEGER}
  29. </delete>
  30. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AdminUserCount" useGeneratedKeys="true">
  31. insert into admin_user_count (aid, private_count, sign_count,
  32. channel_count, public_release_count, follow_count,
  33. order_count, date_time, create_time
  34. )
  35. values (#{aid,jdbcType=VARCHAR}, #{privateCount,jdbcType=INTEGER}, #{signCount,jdbcType=INTEGER},
  36. #{channelCount,jdbcType=INTEGER}, #{publicReleaseCount,jdbcType=INTEGER}, #{followCount,jdbcType=INTEGER},
  37. #{orderCount,jdbcType=INTEGER}, #{dateTime,jdbcType=DATE}, #{createTime,jdbcType=TIMESTAMP}
  38. )
  39. </insert>
  40. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AdminUserCount" useGeneratedKeys="true">
  41. insert into admin_user_count
  42. <trim prefix="(" suffix=")" suffixOverrides=",">
  43. <if test="aid != null">
  44. aid,
  45. </if>
  46. <if test="privateCount != null">
  47. private_count,
  48. </if>
  49. <if test="signCount != null">
  50. sign_count,
  51. </if>
  52. <if test="channelCount != null">
  53. channel_count,
  54. </if>
  55. <if test="publicReleaseCount != null">
  56. public_release_count,
  57. </if>
  58. <if test="followCount != null">
  59. follow_count,
  60. </if>
  61. <if test="orderCount != null">
  62. order_count,
  63. </if>
  64. <if test="dateTime != null">
  65. date_time,
  66. </if>
  67. <if test="createTime != null">
  68. create_time,
  69. </if>
  70. </trim>
  71. <trim prefix="values (" suffix=")" suffixOverrides=",">
  72. <if test="aid != null">
  73. #{aid,jdbcType=VARCHAR},
  74. </if>
  75. <if test="privateCount != null">
  76. #{privateCount,jdbcType=INTEGER},
  77. </if>
  78. <if test="signCount != null">
  79. #{signCount,jdbcType=INTEGER},
  80. </if>
  81. <if test="channelCount != null">
  82. #{channelCount,jdbcType=INTEGER},
  83. </if>
  84. <if test="publicReleaseCount != null">
  85. #{publicReleaseCount,jdbcType=INTEGER},
  86. </if>
  87. <if test="followCount != null">
  88. #{followCount,jdbcType=INTEGER},
  89. </if>
  90. <if test="orderCount != null">
  91. #{orderCount,jdbcType=INTEGER},
  92. </if>
  93. <if test="dateTime != null">
  94. #{dateTime,jdbcType=DATE},
  95. </if>
  96. <if test="createTime != null">
  97. #{createTime,jdbcType=TIMESTAMP},
  98. </if>
  99. </trim>
  100. </insert>
  101. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AdminUserCount">
  102. update admin_user_count
  103. <set>
  104. <if test="aid != null">
  105. aid = #{aid,jdbcType=VARCHAR},
  106. </if>
  107. <if test="privateCount != null">
  108. private_count = #{privateCount,jdbcType=INTEGER},
  109. </if>
  110. <if test="signCount != null">
  111. sign_count = #{signCount,jdbcType=INTEGER},
  112. </if>
  113. <if test="channelCount != null">
  114. channel_count = #{channelCount,jdbcType=INTEGER},
  115. </if>
  116. <if test="publicReleaseCount != null">
  117. public_release_count = #{publicReleaseCount,jdbcType=INTEGER},
  118. </if>
  119. <if test="followCount != null">
  120. follow_count = #{followCount,jdbcType=INTEGER},
  121. </if>
  122. <if test="orderCount != null">
  123. order_count = #{orderCount,jdbcType=INTEGER},
  124. </if>
  125. <if test="dateTime != null">
  126. date_time = #{dateTime,jdbcType=DATE},
  127. </if>
  128. <if test="createTime != null">
  129. create_time = #{createTime,jdbcType=TIMESTAMP},
  130. </if>
  131. </set>
  132. where id = #{id,jdbcType=INTEGER}
  133. </update>
  134. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AdminUserCount">
  135. update admin_user_count
  136. set aid = #{aid,jdbcType=VARCHAR},
  137. private_count = #{privateCount,jdbcType=INTEGER},
  138. sign_count = #{signCount,jdbcType=INTEGER},
  139. channel_count = #{channelCount,jdbcType=INTEGER},
  140. public_release_count = #{publicReleaseCount,jdbcType=INTEGER},
  141. follow_count = #{followCount,jdbcType=INTEGER},
  142. order_count = #{orderCount,jdbcType=INTEGER},
  143. date_time = #{dateTime,jdbcType=DATE},
  144. create_time = #{createTime,jdbcType=TIMESTAMP}
  145. where id = #{id,jdbcType=INTEGER}
  146. </update>
  147. <update id="updateByAidAndDateSelective">
  148. update admin_user_count
  149. <set>
  150. <if test="privateCount != null">
  151. private_count = #{privateCount,jdbcType=INTEGER},
  152. </if>
  153. <if test="signCount != null">
  154. sign_count = #{signCount,jdbcType=INTEGER},
  155. </if>
  156. <if test="channelCount != null">
  157. channel_count = #{channelCount,jdbcType=INTEGER},
  158. </if>
  159. <if test="publicReleaseCount != null">
  160. public_release_count = #{publicReleaseCount,jdbcType=INTEGER},
  161. </if>
  162. <if test="followCount != null">
  163. follow_count = #{followCount,jdbcType=INTEGER},
  164. </if>
  165. <if test="orderCount != null">
  166. order_count = #{orderCount,jdbcType=INTEGER},
  167. </if>
  168. </set>
  169. where aid = #{aid,jdbcType=VARCHAR} and date_time = #{dateTime,jdbcType=DATE}
  170. </update>
  171. </mapper>