AskaRetailsMapper.xml 13 KB

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