AppUsersCashrecordMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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.AppUsersCashrecordMapper">
  6. <resultMap type="com.game.business.domain.AppUsersCashrecord" id="AppUsersCashrecordResult">
  7. <result property="id" column="id" />
  8. <result property="account" column="account" />
  9. <result property="accountBank" column="account_bank" />
  10. <result property="actualMoney" column="actual_money" />
  11. <result property="addtime" column="addtime" />
  12. <result property="afterAmount" column="after_amount" />
  13. <result property="auditby" column="auditby" />
  14. <result property="beforeAmount" column="before_amount" />
  15. <result property="cashOutBizNo" column="cash_out_biz_no" />
  16. <result property="cashOutOrderId" column="cash_out_order_id" />
  17. <result property="cashOutPayOrderId" column="cash_out_pay_order_id" />
  18. <result property="cashOutRemark" column="cash_out_remark" />
  19. <result property="cashOutStatus" column="cash_out_status" />
  20. <result property="cashType" column="cash_type" />
  21. <result property="guildId" column="guild_id" />
  22. <result property="money" column="money" />
  23. <result property="name" column="name" />
  24. <result property="orderno" column="orderno" />
  25. <result property="platformService" column="platform_service" />
  26. <result property="reason" column="reason" />
  27. <result property="remarks" column="remarks" />
  28. <result property="service" column="service" />
  29. <result property="status" column="status" />
  30. <result property="statusName" column="status_name" />
  31. <result property="tradeNo" column="trade_no" />
  32. <result property="type" column="type" />
  33. <result property="uid" column="uid" />
  34. <result property="unitType" column="unit_type" />
  35. <result property="uptime" column="uptime" />
  36. <result property="votes" column="votes" />
  37. </resultMap>
  38. <sql id="selectAppUsersCashrecordVo">
  39. select id, account, account_bank, actual_money, addtime, after_amount, auditby, before_amount, cash_out_biz_no, cash_out_order_id, cash_out_pay_order_id, cash_out_remark, cash_out_status, cash_type, guild_id, money, name, orderno, platform_service, reason, remarks, service, status, status_name, trade_no, type, uid, unit_type, uptime, votes from app_users_cashrecord
  40. </sql>
  41. <select id="selectAppUsersCashrecordList" parameterType="com.game.business.domain.AppUsersCashrecord" resultMap="AppUsersCashrecordResult">
  42. <include refid="selectAppUsersCashrecordVo"/>
  43. <where>
  44. <if test="account != null and account != ''"> and account = #{account}</if>
  45. <if test="accountBank != null and accountBank != ''"> and account_bank = #{accountBank}</if>
  46. <if test="actualMoney != null "> and actual_money = #{actualMoney}</if>
  47. <if test="addtime != null "> and addtime = #{addtime}</if>
  48. <if test="afterAmount != null "> and after_amount = #{afterAmount}</if>
  49. <if test="auditby != null and auditby != ''"> and auditby = #{auditby}</if>
  50. <if test="beforeAmount != null "> and before_amount = #{beforeAmount}</if>
  51. <if test="cashOutBizNo != null and cashOutBizNo != ''"> and cash_out_biz_no = #{cashOutBizNo}</if>
  52. <if test="cashOutOrderId != null and cashOutOrderId != ''"> and cash_out_order_id = #{cashOutOrderId}</if>
  53. <if test="cashOutPayOrderId != null and cashOutPayOrderId != ''"> and cash_out_pay_order_id = #{cashOutPayOrderId}</if>
  54. <if test="cashOutRemark != null and cashOutRemark != ''"> and cash_out_remark = #{cashOutRemark}</if>
  55. <if test="cashOutStatus != null "> and cash_out_status = #{cashOutStatus}</if>
  56. <if test="cashType != null "> and cash_type = #{cashType}</if>
  57. <if test="guildId != null "> and guild_id = #{guildId}</if>
  58. <if test="money != null "> and money = #{money}</if>
  59. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  60. <if test="orderno != null and orderno != ''"> and orderno = #{orderno}</if>
  61. <if test="platformService != null "> and platform_service = #{platformService}</if>
  62. <if test="reason != null and reason != ''"> and reason = #{reason}</if>
  63. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  64. <if test="service != null "> and service = #{service}</if>
  65. <if test="status != null "> and status = #{status}</if>
  66. <if test="statusName != null and statusName != ''"> and status_name like concat('%', #{statusName}, '%')</if>
  67. <if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo}</if>
  68. <if test="type != null "> and type = #{type}</if>
  69. <if test="uid != null "> and uid = #{uid}</if>
  70. <if test="unitType != null "> and unit_type = #{unitType}</if>
  71. <if test="uptime != null "> and uptime = #{uptime}</if>
  72. <if test="votes != null "> and votes = #{votes}</if>
  73. </where>
  74. </select>
  75. <select id="selectAppUsersCashrecordById" parameterType="Long" resultMap="AppUsersCashrecordResult">
  76. <include refid="selectAppUsersCashrecordVo"/>
  77. where id = #{id}
  78. </select>
  79. <insert id="insertAppUsersCashrecord" parameterType="com.game.business.domain.AppUsersCashrecord">
  80. insert into app_users_cashrecord
  81. <trim prefix="(" suffix=")" suffixOverrides=",">
  82. <if test="id != null">id,</if>
  83. <if test="account != null">account,</if>
  84. <if test="accountBank != null">account_bank,</if>
  85. <if test="actualMoney != null">actual_money,</if>
  86. <if test="addtime != null">addtime,</if>
  87. <if test="afterAmount != null">after_amount,</if>
  88. <if test="auditby != null">auditby,</if>
  89. <if test="beforeAmount != null">before_amount,</if>
  90. <if test="cashOutBizNo != null">cash_out_biz_no,</if>
  91. <if test="cashOutOrderId != null">cash_out_order_id,</if>
  92. <if test="cashOutPayOrderId != null">cash_out_pay_order_id,</if>
  93. <if test="cashOutRemark != null">cash_out_remark,</if>
  94. <if test="cashOutStatus != null">cash_out_status,</if>
  95. <if test="cashType != null">cash_type,</if>
  96. <if test="guildId != null">guild_id,</if>
  97. <if test="money != null">money,</if>
  98. <if test="name != null">name,</if>
  99. <if test="orderno != null">orderno,</if>
  100. <if test="platformService != null">platform_service,</if>
  101. <if test="reason != null">reason,</if>
  102. <if test="remarks != null">remarks,</if>
  103. <if test="service != null">service,</if>
  104. <if test="status != null">status,</if>
  105. <if test="statusName != null">status_name,</if>
  106. <if test="tradeNo != null">trade_no,</if>
  107. <if test="type != null">type,</if>
  108. <if test="uid != null">uid,</if>
  109. <if test="unitType != null">unit_type,</if>
  110. <if test="uptime != null">uptime,</if>
  111. <if test="votes != null">votes,</if>
  112. </trim>
  113. <trim prefix="values (" suffix=")" suffixOverrides=",">
  114. <if test="id != null">#{id},</if>
  115. <if test="account != null">#{account},</if>
  116. <if test="accountBank != null">#{accountBank},</if>
  117. <if test="actualMoney != null">#{actualMoney},</if>
  118. <if test="addtime != null">#{addtime},</if>
  119. <if test="afterAmount != null">#{afterAmount},</if>
  120. <if test="auditby != null">#{auditby},</if>
  121. <if test="beforeAmount != null">#{beforeAmount},</if>
  122. <if test="cashOutBizNo != null">#{cashOutBizNo},</if>
  123. <if test="cashOutOrderId != null">#{cashOutOrderId},</if>
  124. <if test="cashOutPayOrderId != null">#{cashOutPayOrderId},</if>
  125. <if test="cashOutRemark != null">#{cashOutRemark},</if>
  126. <if test="cashOutStatus != null">#{cashOutStatus},</if>
  127. <if test="cashType != null">#{cashType},</if>
  128. <if test="guildId != null">#{guildId},</if>
  129. <if test="money != null">#{money},</if>
  130. <if test="name != null">#{name},</if>
  131. <if test="orderno != null">#{orderno},</if>
  132. <if test="platformService != null">#{platformService},</if>
  133. <if test="reason != null">#{reason},</if>
  134. <if test="remarks != null">#{remarks},</if>
  135. <if test="service != null">#{service},</if>
  136. <if test="status != null">#{status},</if>
  137. <if test="statusName != null">#{statusName},</if>
  138. <if test="tradeNo != null">#{tradeNo},</if>
  139. <if test="type != null">#{type},</if>
  140. <if test="uid != null">#{uid},</if>
  141. <if test="unitType != null">#{unitType},</if>
  142. <if test="uptime != null">#{uptime},</if>
  143. <if test="votes != null">#{votes},</if>
  144. </trim>
  145. </insert>
  146. <update id="updateAppUsersCashrecord" parameterType="com.game.business.domain.AppUsersCashrecord">
  147. update app_users_cashrecord
  148. <trim prefix="SET" suffixOverrides=",">
  149. <if test="account != null">account = #{account},</if>
  150. <if test="accountBank != null">account_bank = #{accountBank},</if>
  151. <if test="actualMoney != null">actual_money = #{actualMoney},</if>
  152. <if test="addtime != null">addtime = #{addtime},</if>
  153. <if test="afterAmount != null">after_amount = #{afterAmount},</if>
  154. <if test="auditby != null">auditby = #{auditby},</if>
  155. <if test="beforeAmount != null">before_amount = #{beforeAmount},</if>
  156. <if test="cashOutBizNo != null">cash_out_biz_no = #{cashOutBizNo},</if>
  157. <if test="cashOutOrderId != null">cash_out_order_id = #{cashOutOrderId},</if>
  158. <if test="cashOutPayOrderId != null">cash_out_pay_order_id = #{cashOutPayOrderId},</if>
  159. <if test="cashOutRemark != null">cash_out_remark = #{cashOutRemark},</if>
  160. <if test="cashOutStatus != null">cash_out_status = #{cashOutStatus},</if>
  161. <if test="cashType != null">cash_type = #{cashType},</if>
  162. <if test="guildId != null">guild_id = #{guildId},</if>
  163. <if test="money != null">money = #{money},</if>
  164. <if test="name != null">name = #{name},</if>
  165. <if test="orderno != null">orderno = #{orderno},</if>
  166. <if test="platformService != null">platform_service = #{platformService},</if>
  167. <if test="reason != null">reason = #{reason},</if>
  168. <if test="remarks != null">remarks = #{remarks},</if>
  169. <if test="service != null">service = #{service},</if>
  170. <if test="status != null">status = #{status},</if>
  171. <if test="statusName != null">status_name = #{statusName},</if>
  172. <if test="tradeNo != null">trade_no = #{tradeNo},</if>
  173. <if test="type != null">type = #{type},</if>
  174. <if test="uid != null">uid = #{uid},</if>
  175. <if test="unitType != null">unit_type = #{unitType},</if>
  176. <if test="uptime != null">uptime = #{uptime},</if>
  177. <if test="votes != null">votes = #{votes},</if>
  178. </trim>
  179. where id = #{id}
  180. </update>
  181. <delete id="deleteAppUsersCashrecordById" parameterType="Long">
  182. delete from app_users_cashrecord where id = #{id}
  183. </delete>
  184. <delete id="deleteAppUsersCashrecordByIds" parameterType="String">
  185. delete from app_users_cashrecord where id in
  186. <foreach item="id" collection="array" open="(" separator="," close=")">
  187. #{id}
  188. </foreach>
  189. </delete>
  190. </mapper>