AskaChannelsMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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.mofangchuxing.aska.dao.mapper.AskaChannelsMapper">
  6. <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.AskaChannels">
  7. <id property="id" column="id" jdbcType="INTEGER"/>
  8. <result property="name" column="name" jdbcType="CHAR"/>
  9. <result property="prefix" column="prefix" jdbcType="CHAR"/>
  10. <result property="ownerId" column="ownerId" jdbcType="INTEGER"/>
  11. <result property="phone" column="phone" jdbcType="CHAR"/>
  12. <result property="note" column="note" jdbcType="VARCHAR"/>
  13. <result property="account" column="account" jdbcType="VARCHAR"/>
  14. <result property="accountName" column="accountName" jdbcType="VARCHAR"/>
  15. <result property="accountType" column="accountType" jdbcType="CHAR"/>
  16. <result property="relation" column="relation" jdbcType="CHAR"/>
  17. <result property="apiv3" column="apiv3" jdbcType="VARCHAR"/>
  18. <result property="certPath" column="certPath" jdbcType="VARCHAR"/>
  19. <result property="tripartite" column="tripartite" jdbcType="CHAR"/>
  20. <result property="tripvalue" column="tripvalue" jdbcType="INTEGER"/>
  21. <result property="realtimeSplit" column="realtimeSplit" jdbcType="INTEGER"/>
  22. <result property="status" column="status" jdbcType="CHAR"/>
  23. <result property="totalIncome" column="totalIncome" jdbcType="INTEGER"/>
  24. <result property="totalSplit" column="totalSplit" jdbcType="INTEGER"/>
  25. <result property="totalCashOut" column="totalCashOut" jdbcType="INTEGER"/>
  26. <result property="totalRefund" column="totalRefund" jdbcType="INTEGER"/>
  27. <result property="balance" column="balance" jdbcType="INTEGER"/>
  28. </resultMap>
  29. <sql id="Base_Column_List">
  30. id,name,prefix,
  31. ownerId,phone,note,
  32. account,accountName,accountType,
  33. relation,apiv3,certPath,
  34. tripartite,tripvalue,realtimeSplit,
  35. status,totalIncome,totalSplit,
  36. totalCashOut,totalRefund,balance
  37. </sql>
  38. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  39. select
  40. <include refid="Base_Column_List" />
  41. from aska_channels
  42. where id = #{id,jdbcType=INTEGER}
  43. </select>
  44. <select id="getAllChannels" resultMap="BaseResultMap">
  45. select
  46. <include refid="Base_Column_List" />
  47. from aska_channels
  48. where 1=1 <if test="channelName != null">
  49. and name = #{channelName,jdbcType=CHAR},
  50. </if>
  51. </select>
  52. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  53. delete from aska_channels
  54. where id = #{id,jdbcType=INTEGER}
  55. </delete>
  56. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels" useGeneratedKeys="true">
  57. insert into aska_channels
  58. ( id,name,prefix
  59. ,ownerId,phone,note
  60. ,account,accountName,accountType
  61. ,relation,apiv3,certPath
  62. ,tripartite,tripvalue,realtimeSplit
  63. ,status,totalIncome,totalSplit
  64. ,totalCashOut,totalRefund,balance
  65. )
  66. values (#{id,jdbcType=INTEGER},#{name,jdbcType=CHAR},#{prefix,jdbcType=CHAR}
  67. ,#{ownerId,jdbcType=INTEGER},#{phone,jdbcType=CHAR},#{note,jdbcType=VARCHAR}
  68. ,#{account,jdbcType=VARCHAR},#{accountName,jdbcType=VARCHAR},#{accountType,jdbcType=CHAR}
  69. ,#{relation,jdbcType=CHAR},#{apiv3,jdbcType=VARCHAR},#{certPath,jdbcType=VARCHAR}
  70. ,#{tripartite,jdbcType=CHAR},#{tripvalue,jdbcType=INTEGER},#{realtimeSplit,jdbcType=INTEGER}
  71. ,#{status,jdbcType=CHAR},#{totalIncome,jdbcType=INTEGER},#{totalSplit,jdbcType=INTEGER}
  72. ,#{totalCashOut,jdbcType=INTEGER},#{totalRefund,jdbcType=INTEGER},#{balance,jdbcType=INTEGER}
  73. )
  74. </insert>
  75. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels" useGeneratedKeys="true">
  76. insert into aska_channels
  77. <trim prefix="(" suffix=")" suffixOverrides=",">
  78. <if test="id != null">id,</if>
  79. <if test="name != null">name,</if>
  80. <if test="prefix != null">prefix,</if>
  81. <if test="ownerId != null">ownerId,</if>
  82. <if test="phone != null">phone,</if>
  83. <if test="note != null">note,</if>
  84. <if test="account != null">account,</if>
  85. <if test="accountName != null">accountName,</if>
  86. <if test="accountType != null">accountType,</if>
  87. <if test="relation != null">relation,</if>
  88. <if test="apiv3 != null">apiv3,</if>
  89. <if test="certPath != null">certPath,</if>
  90. <if test="tripartite != null">tripartite,</if>
  91. <if test="tripvalue != null">tripvalue,</if>
  92. <if test="realtimeSplit != null">realtimeSplit,</if>
  93. <if test="status != null">status,</if>
  94. <if test="totalIncome != null">totalIncome,</if>
  95. <if test="totalSplit != null">totalSplit,</if>
  96. <if test="totalCashOut != null">totalCashOut,</if>
  97. <if test="totalRefund != null">totalRefund,</if>
  98. <if test="balance != null">balance,</if>
  99. </trim>
  100. <trim prefix="values (" suffix=")" suffixOverrides=",">
  101. <if test="id != null">#{id,jdbcType=INTEGER},</if>
  102. <if test="name != null">#{name,jdbcType=CHAR},</if>
  103. <if test="prefix != null">#{prefix,jdbcType=CHAR},</if>
  104. <if test="ownerId != null">#{ownerId,jdbcType=INTEGER},</if>
  105. <if test="phone != null">#{phone,jdbcType=CHAR},</if>
  106. <if test="note != null">#{note,jdbcType=VARCHAR},</if>
  107. <if test="account != null">#{account,jdbcType=VARCHAR},</if>
  108. <if test="accountName != null">#{accountName,jdbcType=VARCHAR},</if>
  109. <if test="accountType != null">#{accountType,jdbcType=CHAR},</if>
  110. <if test="relation != null">#{relation,jdbcType=CHAR},</if>
  111. <if test="apiv3 != null">#{apiv3,jdbcType=VARCHAR},</if>
  112. <if test="certPath != null">#{certPath,jdbcType=VARCHAR},</if>
  113. <if test="tripartite != null">#{tripartite,jdbcType=CHAR},</if>
  114. <if test="tripvalue != null">#{tripvalue,jdbcType=INTEGER},</if>
  115. <if test="realtimeSplit != null">#{realtimeSplit,jdbcType=INTEGER},</if>
  116. <if test="status != null">#{status,jdbcType=CHAR},</if>
  117. <if test="totalIncome != null">#{totalIncome,jdbcType=INTEGER},</if>
  118. <if test="totalSplit != null">#{totalSplit,jdbcType=INTEGER},</if>
  119. <if test="totalCashOut != null">#{totalCashOut,jdbcType=INTEGER},</if>
  120. <if test="totalRefund != null">#{totalRefund,jdbcType=INTEGER},</if>
  121. <if test="balance != null">#{balance,jdbcType=INTEGER},</if>
  122. </trim>
  123. </insert>
  124. <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels">
  125. update aska_channels
  126. <set>
  127. <if test="name != null">
  128. name = #{name,jdbcType=CHAR},
  129. </if>
  130. <if test="prefix != null">
  131. prefix = #{prefix,jdbcType=CHAR},
  132. </if>
  133. <if test="ownerId != null">
  134. ownerId = #{ownerId,jdbcType=INTEGER},
  135. </if>
  136. <if test="phone != null">
  137. phone = #{phone,jdbcType=CHAR},
  138. </if>
  139. <if test="note != null">
  140. note = #{note,jdbcType=VARCHAR},
  141. </if>
  142. <if test="account != null">
  143. account = #{account,jdbcType=VARCHAR},
  144. </if>
  145. <if test="accountName != null">
  146. accountName = #{accountName,jdbcType=VARCHAR},
  147. </if>
  148. <if test="accountType != null">
  149. accountType = #{accountType,jdbcType=CHAR},
  150. </if>
  151. <if test="relation != null">
  152. relation = #{relation,jdbcType=CHAR},
  153. </if>
  154. <if test="apiv3 != null">
  155. apiv3 = #{apiv3,jdbcType=VARCHAR},
  156. </if>
  157. <if test="certPath != null">
  158. certPath = #{certPath,jdbcType=VARCHAR},
  159. </if>
  160. <if test="tripartite != null">
  161. tripartite = #{tripartite,jdbcType=CHAR},
  162. </if>
  163. <if test="tripvalue != null">
  164. tripvalue = #{tripvalue,jdbcType=INTEGER},
  165. </if>
  166. <if test="realtimeSplit != null">
  167. realtimeSplit = #{realtimeSplit,jdbcType=INTEGER},
  168. </if>
  169. <if test="status != null">
  170. status = #{status,jdbcType=CHAR},
  171. </if>
  172. <if test="totalIncome != null">
  173. totalIncome = #{totalIncome,jdbcType=INTEGER},
  174. </if>
  175. <if test="totalSplit != null">
  176. totalSplit = #{totalSplit,jdbcType=INTEGER},
  177. </if>
  178. <if test="totalCashOut != null">
  179. totalCashOut = #{totalCashOut,jdbcType=INTEGER},
  180. </if>
  181. <if test="totalRefund != null">
  182. totalRefund = #{totalRefund,jdbcType=INTEGER},
  183. </if>
  184. <if test="balance != null">
  185. balance = #{balance,jdbcType=INTEGER},
  186. </if>
  187. </set>
  188. where id = #{id,jdbcType=INTEGER}
  189. </update>
  190. <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels">
  191. update aska_channels
  192. set
  193. name = #{name,jdbcType=CHAR},
  194. prefix = #{prefix,jdbcType=CHAR},
  195. ownerId = #{ownerId,jdbcType=INTEGER},
  196. phone = #{phone,jdbcType=CHAR},
  197. note = #{note,jdbcType=VARCHAR},
  198. account = #{account,jdbcType=VARCHAR},
  199. accountName = #{accountName,jdbcType=VARCHAR},
  200. accountType = #{accountType,jdbcType=CHAR},
  201. relation = #{relation,jdbcType=CHAR},
  202. apiv3 = #{apiv3,jdbcType=VARCHAR},
  203. certPath = #{certPath,jdbcType=VARCHAR},
  204. tripartite = #{tripartite,jdbcType=CHAR},
  205. tripvalue = #{tripvalue,jdbcType=INTEGER},
  206. realtimeSplit = #{realtimeSplit,jdbcType=INTEGER},
  207. status = #{status,jdbcType=CHAR},
  208. totalIncome = #{totalIncome,jdbcType=INTEGER},
  209. totalSplit = #{totalSplit,jdbcType=INTEGER},
  210. totalCashOut = #{totalCashOut,jdbcType=INTEGER},
  211. totalRefund = #{totalRefund,jdbcType=INTEGER},
  212. balance = #{balance,jdbcType=INTEGER}
  213. where id = #{id,jdbcType=INTEGER}
  214. </update>
  215. </mapper>