AppUsersChargeMapper.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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.game.business.mapper.AppUsersChargeMapper">
  6. <resultMap type="com.game.business.domain.AppUsersCharge" id="AppUsersChargeResult">
  7. <result property="id" column="id" />
  8. <result property="addtime" column="addtime" />
  9. <result property="afterCoin" column="after_coin" />
  10. <result property="agentId" column="agent_id" />
  11. <result property="ambient" column="ambient" />
  12. <result property="coin" column="coin" />
  13. <result property="coinType" column="coin_type" />
  14. <result property="coinGive" column="coin_give" />
  15. <result property="isAgent" column="is_agent" />
  16. <result property="isDelete" column="is_delete" />
  17. <result property="isWater" column="is_water" />
  18. <result property="money" column="money" />
  19. <result property="optType" column="opt_type" />
  20. <result property="optUser" column="opt_user" />
  21. <result property="orderno" column="orderno" />
  22. <result property="pid" column="pid" />
  23. <result property="pidLevel1" column="pid_level1" />
  24. <result property="pidLevel2" column="pid_level2" />
  25. <result property="pidLevel3" column="pid_level3" />
  26. <result property="pidLevel4" column="pid_level4" />
  27. <result property="remarks" column="remarks" />
  28. <result property="ruleId" column="rule_id" />
  29. <result property="status" column="status" />
  30. <result property="touid" column="touid" />
  31. <result property="tradeNo" column="trade_no" />
  32. <result property="type" column="type" />
  33. <result property="uid" column="uid" />
  34. </resultMap>
  35. <sql id="selectAppUsersChargeVo">
  36. select id, addtime, after_coin, agent_id, ambient, coin, coin_type, coin_give, is_agent, is_delete, is_water, money, opt_type, opt_user, orderno, pid, pid_level1, pid_level2, pid_level3, pid_level4, remarks, rule_id, status, touid, trade_no, type, uid from app_users_charge
  37. </sql>
  38. <select id="selectAppUsersChargeList" parameterType="com.game.business.domain.AppUsersCharge" resultMap="AppUsersChargeResult">
  39. <include refid="selectAppUsersChargeVo"/>
  40. <where>
  41. <if test="addtime != null "> and addtime = #{addtime}</if>
  42. <if test="afterCoin != null "> and after_coin = #{afterCoin}</if>
  43. <if test="agentId != null "> and agent_id = #{agentId}</if>
  44. <if test="ambient != null "> and ambient = #{ambient}</if>
  45. <if test="coin != null "> and coin = #{coin}</if>
  46. <if test="coinType != null "> and coin_type = #{coinType}</if>
  47. <if test="coinGive != null "> and coin_give = #{coinGive}</if>
  48. <if test="isAgent != null "> and is_agent = #{isAgent}</if>
  49. <if test="isDelete != null "> and is_delete = #{isDelete}</if>
  50. <if test="isWater != null "> and is_water = #{isWater}</if>
  51. <if test="money != null "> and money = #{money}</if>
  52. <if test="optType != null "> and opt_type = #{optType}</if>
  53. <if test="optUser != null and optUser != ''"> and opt_user = #{optUser}</if>
  54. <if test="orderno != null and orderno != ''"> and orderno = #{orderno}</if>
  55. <if test="pid != null "> and pid = #{pid}</if>
  56. <if test="pidLevel1 != null "> and pid_level1 = #{pidLevel1}</if>
  57. <if test="pidLevel2 != null "> and pid_level2 = #{pidLevel2}</if>
  58. <if test="pidLevel3 != null "> and pid_level3 = #{pidLevel3}</if>
  59. <if test="pidLevel4 != null "> and pid_level4 = #{pidLevel4}</if>
  60. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  61. <if test="ruleId != null "> and rule_id = #{ruleId}</if>
  62. <if test="status != null "> and status = #{status}</if>
  63. <if test="touid != null "> and touid = #{touid}</if>
  64. <if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo}</if>
  65. <if test="type != null "> and type = #{type}</if>
  66. <if test="uid != null "> and uid = #{uid}</if>
  67. </where>
  68. </select>
  69. <select id="selectAppUsersChargeById" parameterType="Long" resultMap="AppUsersChargeResult">
  70. <include refid="selectAppUsersChargeVo"/>
  71. where id = #{id}
  72. </select>
  73. <insert id="insertAppUsersCharge" parameterType="com.game.business.domain.AppUsersCharge">
  74. insert into app_users_charge
  75. <trim prefix="(" suffix=")" suffixOverrides=",">
  76. <if test="id != null">id,</if>
  77. <if test="addtime != null">addtime,</if>
  78. <if test="afterCoin != null">after_coin,</if>
  79. <if test="agentId != null">agent_id,</if>
  80. <if test="ambient != null">ambient,</if>
  81. <if test="coin != null">coin,</if>
  82. <if test="coinType != null">coin_type,</if>
  83. <if test="coinGive != null">coin_give,</if>
  84. <if test="isAgent != null">is_agent,</if>
  85. <if test="isDelete != null">is_delete,</if>
  86. <if test="isWater != null">is_water,</if>
  87. <if test="money != null">money,</if>
  88. <if test="optType != null">opt_type,</if>
  89. <if test="optUser != null">opt_user,</if>
  90. <if test="orderno != null">orderno,</if>
  91. <if test="pid != null">pid,</if>
  92. <if test="pidLevel1 != null">pid_level1,</if>
  93. <if test="pidLevel2 != null">pid_level2,</if>
  94. <if test="pidLevel3 != null">pid_level3,</if>
  95. <if test="pidLevel4 != null">pid_level4,</if>
  96. <if test="remarks != null">remarks,</if>
  97. <if test="ruleId != null">rule_id,</if>
  98. <if test="status != null">status,</if>
  99. <if test="touid != null">touid,</if>
  100. <if test="tradeNo != null">trade_no,</if>
  101. <if test="type != null">type,</if>
  102. <if test="uid != null">uid,</if>
  103. </trim>
  104. <trim prefix="values (" suffix=")" suffixOverrides=",">
  105. <if test="id != null">#{id},</if>
  106. <if test="addtime != null">#{addtime},</if>
  107. <if test="afterCoin != null">#{afterCoin},</if>
  108. <if test="agentId != null">#{agentId},</if>
  109. <if test="ambient != null">#{ambient},</if>
  110. <if test="coin != null">#{coin},</if>
  111. <if test="coinType != null">#{coinType},</if>
  112. <if test="coinGive != null">#{coinGive},</if>
  113. <if test="isAgent != null">#{isAgent},</if>
  114. <if test="isDelete != null">#{isDelete},</if>
  115. <if test="isWater != null">#{isWater},</if>
  116. <if test="money != null">#{money},</if>
  117. <if test="optType != null">#{optType},</if>
  118. <if test="optUser != null">#{optUser},</if>
  119. <if test="orderno != null">#{orderno},</if>
  120. <if test="pid != null">#{pid},</if>
  121. <if test="pidLevel1 != null">#{pidLevel1},</if>
  122. <if test="pidLevel2 != null">#{pidLevel2},</if>
  123. <if test="pidLevel3 != null">#{pidLevel3},</if>
  124. <if test="pidLevel4 != null">#{pidLevel4},</if>
  125. <if test="remarks != null">#{remarks},</if>
  126. <if test="ruleId != null">#{ruleId},</if>
  127. <if test="status != null">#{status},</if>
  128. <if test="touid != null">#{touid},</if>
  129. <if test="tradeNo != null">#{tradeNo},</if>
  130. <if test="type != null">#{type},</if>
  131. <if test="uid != null">#{uid},</if>
  132. </trim>
  133. </insert>
  134. <update id="updateAppUsersCharge" parameterType="com.game.business.domain.AppUsersCharge">
  135. update app_users_charge
  136. <trim prefix="SET" suffixOverrides=",">
  137. <if test="addtime != null">addtime = #{addtime},</if>
  138. <if test="afterCoin != null">after_coin = #{afterCoin},</if>
  139. <if test="agentId != null">agent_id = #{agentId},</if>
  140. <if test="ambient != null">ambient = #{ambient},</if>
  141. <if test="coin != null">coin = #{coin},</if>
  142. <if test="coinType != null">coin_type = #{coinType},</if>
  143. <if test="coinGive != null">coin_give = #{coinGive},</if>
  144. <if test="isAgent != null">is_agent = #{isAgent},</if>
  145. <if test="isDelete != null">is_delete = #{isDelete},</if>
  146. <if test="isWater != null">is_water = #{isWater},</if>
  147. <if test="money != null">money = #{money},</if>
  148. <if test="optType != null">opt_type = #{optType},</if>
  149. <if test="optUser != null">opt_user = #{optUser},</if>
  150. <if test="orderno != null">orderno = #{orderno},</if>
  151. <if test="pid != null">pid = #{pid},</if>
  152. <if test="pidLevel1 != null">pid_level1 = #{pidLevel1},</if>
  153. <if test="pidLevel2 != null">pid_level2 = #{pidLevel2},</if>
  154. <if test="pidLevel3 != null">pid_level3 = #{pidLevel3},</if>
  155. <if test="pidLevel4 != null">pid_level4 = #{pidLevel4},</if>
  156. <if test="remarks != null">remarks = #{remarks},</if>
  157. <if test="ruleId != null">rule_id = #{ruleId},</if>
  158. <if test="status != null">status = #{status},</if>
  159. <if test="touid != null">touid = #{touid},</if>
  160. <if test="tradeNo != null">trade_no = #{tradeNo},</if>
  161. <if test="type != null">type = #{type},</if>
  162. <if test="uid != null">uid = #{uid},</if>
  163. </trim>
  164. where id = #{id}
  165. </update>
  166. <delete id="deleteAppUsersChargeById" parameterType="Long">
  167. delete from app_users_charge where id = #{id}
  168. </delete>
  169. <delete id="deleteAppUsersChargeByIds" parameterType="String">
  170. delete from app_users_charge where id in
  171. <foreach item="id" collection="array" open="(" separator="," close=")">
  172. #{id}
  173. </foreach>
  174. </delete>
  175. </mapper>