AccountWithdrawalApplyServiceDaoImplMapper.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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="accountWithdrawalApplyServiceDaoImpl">
  6. <!-- 保存账户提现信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveAccountWithdrawalApplyInfo" parameterType="Map">
  8. insert into account_withdrawal_apply(
  9. apply_id,apply_user_name,amount,context,acct_id,state,apply_user_tel,apply_user_id
  10. ) values (
  11. #{applyId},#{applyUserName},#{amount},#{context},#{acctId},#{state},#{applyUserTel},#{applyUserId}
  12. )
  13. </insert>
  14. <!-- 查询账户提现信息 add by wuxw 2018-07-03 -->
  15. <select id="getAccountWithdrawalApplyInfo" parameterType="Map" resultType="Map">
  16. select t.apply_id,t.apply_id applyId,t.apply_user_name,t.apply_user_name applyUserName,t.amount,t.create_time,t.create_time createTime,t.context,t.acct_id,t.acct_id acctId,t.status_cd,t.status_cd statusCd,t.state,t.apply_user_tel,t.apply_user_tel applyUserTel,t.apply_user_id,t.apply_user_id applyUserId,t1.`name` stateName
  17. from account_withdrawal_apply t left join t_dict t1 on t.state = t1.status_cd
  18. where t1.table_name='account_withdrawal_apply'
  19. and t1.table_columns='state'
  20. <if test="applyId !=null and applyId != ''">
  21. and t.apply_id= #{applyId}
  22. </if>
  23. <if test="applyUserName !=null and applyUserName != ''">
  24. and t.apply_user_name= #{applyUserName}
  25. </if>
  26. <if test="amount !=null and amount != ''">
  27. and t.amount= #{amount}
  28. </if>
  29. <if test="createTime !=null and createTime != ''">
  30. and t.create_time= #{createTime}
  31. </if>
  32. <if test="context !=null and context != ''">
  33. and t.context= #{context}
  34. </if>
  35. <if test="acctId !=null and acctId != ''">
  36. and t.acct_id= #{acctId}
  37. </if>
  38. <if test="statusCd !=null and statusCd != ''">
  39. and t.status_cd= #{statusCd}
  40. </if>
  41. <if test="state !=null and state != ''">
  42. and t.state= #{state}
  43. </if>
  44. <if test="applyUserTel !=null and applyUserTel != ''">
  45. and t.apply_user_tel= #{applyUserTel}
  46. </if>
  47. <if test="applyUserId !=null and applyUserId != ''">
  48. and t.apply_user_id= #{applyUserId}
  49. </if>
  50. order by t.create_time desc
  51. <if test="page != -1 and page != null ">
  52. limit #{page}, #{row}
  53. </if>
  54. </select>
  55. <!-- 修改账户提现信息 add by wuxw 2018-07-03 -->
  56. <update id="updateAccountWithdrawalApplyInfo" parameterType="Map">
  57. update account_withdrawal_apply t set t.status_cd = #{statusCd}
  58. <if test="newBId != null and newBId != ''">
  59. ,t.b_id = #{newBId}
  60. </if>
  61. <if test="applyUserName !=null and applyUserName != ''">
  62. , t.apply_user_name= #{applyUserName}
  63. </if>
  64. <if test="amount !=null and amount != ''">
  65. , t.amount= #{amount}
  66. </if>
  67. <if test="createTime !=null and createTime != ''">
  68. , t.create_time= #{createTime}
  69. </if>
  70. <if test="context !=null and context != ''">
  71. , t.context= #{context}
  72. </if>
  73. <if test="acctId !=null and acctId != ''">
  74. , t.acct_id= #{acctId}
  75. </if>
  76. <if test="state !=null and state != ''">
  77. , t.state= #{state}
  78. </if>
  79. <if test="applyUserTel !=null and applyUserTel != ''">
  80. , t.apply_user_tel= #{applyUserTel}
  81. </if>
  82. <if test="applyUserId !=null and applyUserId != ''">
  83. , t.apply_user_id= #{applyUserId}
  84. </if>
  85. where 1=1 <if test="applyId !=null and applyId != ''">
  86. and t.apply_id= #{applyId}
  87. </if>
  88. </update>
  89. <!-- 查询账户提现数量 add by wuxw 2018-07-03 -->
  90. <select id="queryAccountWithdrawalApplysCount" parameterType="Map" resultType="Map">
  91. select count(1) count
  92. from account_withdrawal_apply t
  93. where 1 =1
  94. <if test="applyId !=null and applyId != ''">
  95. and t.apply_id= #{applyId}
  96. </if>
  97. <if test="applyUserName !=null and applyUserName != ''">
  98. and t.apply_user_name= #{applyUserName}
  99. </if>
  100. <if test="amount !=null and amount != ''">
  101. and t.amount= #{amount}
  102. </if>
  103. <if test="createTime !=null and createTime != ''">
  104. and t.create_time= #{createTime}
  105. </if>
  106. <if test="context !=null and context != ''">
  107. and t.context= #{context}
  108. </if>
  109. <if test="acctId !=null and acctId != ''">
  110. and t.acct_id= #{acctId}
  111. </if>
  112. <if test="statusCd !=null and statusCd != ''">
  113. and t.status_cd= #{statusCd}
  114. </if>
  115. <if test="state !=null and state != ''">
  116. and t.state= #{state}
  117. </if>
  118. <if test="applyUserTel !=null and applyUserTel != ''">
  119. and t.apply_user_tel= #{applyUserTel}
  120. </if>
  121. <if test="applyUserId !=null and applyUserId != ''">
  122. and t.apply_user_id= #{applyUserId}
  123. </if>
  124. </select>
  125. <!-- 查询账户提现信息 add by wuxw 2018-07-03 -->
  126. <select id="listStateWithdrawalApplys" parameterType="Map" resultType="Map">
  127. select t.apply_id,t.apply_id applyId,t.apply_user_name,t.apply_user_name applyUserName,t.amount,t.create_time,t.create_time createTime,t.context,t.acct_id,t.acct_id acctId,t.status_cd,t.status_cd statusCd,t.state,t.apply_user_tel,t.apply_user_tel applyUserTel,t.apply_user_id,t.apply_user_id applyUserId,t1.`name` stateName
  128. from account_withdrawal_apply t left join t_dict t1 on t.state = t1.status_cd
  129. where t1.table_name='account_withdrawal_apply'
  130. and t1.table_columns='state'
  131. <if test="applyId !=null and applyId != ''">
  132. and t.apply_id= #{applyId}
  133. </if>
  134. <if test="applyUserName !=null and applyUserName != ''">
  135. and t.apply_user_name= #{applyUserName}
  136. </if>
  137. <if test="amount !=null and amount != ''">
  138. and t.amount= #{amount}
  139. </if>
  140. <if test="createTime !=null and createTime != ''">
  141. and t.create_time= #{createTime}
  142. </if>
  143. <if test="context !=null and context != ''">
  144. and t.context= #{context}
  145. </if>
  146. <if test="acctId !=null and acctId != ''">
  147. and t.acct_id= #{acctId}
  148. </if>
  149. <if test="statusCd !=null and statusCd != ''">
  150. and t.status_cd= #{statusCd}
  151. </if>
  152. <if test="states != null and states != null">
  153. and t.state in
  154. <foreach collection="states" item="item" open="(" close=")" separator=",">
  155. #{item}
  156. </foreach>
  157. </if>
  158. <if test="applyUserTel !=null and applyUserTel != ''">
  159. and t.apply_user_tel= #{applyUserTel}
  160. </if>
  161. <if test="applyUserId !=null and applyUserId != ''">
  162. and t.apply_user_id= #{applyUserId}
  163. </if>
  164. order by t.create_time desc
  165. <if test="page != -1 and page != null ">
  166. limit #{page}, #{row}
  167. </if>
  168. </select>
  169. <!-- 查询账户提现信息 add by wuxw 2018-07-03 -->
  170. <select id="listStateWithdrawalApplysCount" parameterType="Map" resultType="Map">
  171. select count(1) count
  172. from account_withdrawal_apply t left join t_dict t1 on t.state = t1.status_cd
  173. where t1.table_name='account_withdrawal_apply'
  174. and t1.table_columns='state'
  175. <if test="applyId !=null and applyId != ''">
  176. and t.apply_id= #{applyId}
  177. </if>
  178. <if test="applyUserName !=null and applyUserName != ''">
  179. and t.apply_user_name= #{applyUserName}
  180. </if>
  181. <if test="amount !=null and amount != ''">
  182. and t.amount= #{amount}
  183. </if>
  184. <if test="createTime !=null and createTime != ''">
  185. and t.create_time= #{createTime}
  186. </if>
  187. <if test="context !=null and context != ''">
  188. and t.context= #{context}
  189. </if>
  190. <if test="acctId !=null and acctId != ''">
  191. and t.acct_id= #{acctId}
  192. </if>
  193. <if test="statusCd !=null and statusCd != ''">
  194. and t.status_cd= #{statusCd}
  195. </if>
  196. <if test="states != null and states != null">
  197. and t.state in
  198. <foreach collection="states" item="item" open="(" close=")" separator=",">
  199. #{item}
  200. </foreach>
  201. </if>
  202. <if test="applyUserTel !=null and applyUserTel != ''">
  203. and t.apply_user_tel= #{applyUserTel}
  204. </if>
  205. <if test="applyUserId !=null and applyUserId != ''">
  206. and t.apply_user_id= #{applyUserId}
  207. </if>
  208. order by t.create_time desc
  209. <if test="page != -1 and page != null ">
  210. limit #{page}, #{row}
  211. </if>
  212. </select>
  213. </mapper>