DcIntroducerMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.ygj.yuemum.dao.distributionchannel.DcIntroducerDao" >
  4. <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
  5. <result column="id" property="id" jdbcType="INTEGER" />
  6. <result column="wv_phone" property="wv_phone" jdbcType="VARCHAR" />
  7. <result column="wv_gradeid" property="wv_gradeid" jdbcType="INTEGER" />
  8. <result column="wv_Introduction_total" property="wv_Introduction_total" jdbcType="DECIMAL" />
  9. <result column="wv_withdraw_total" property="wv_withdraw_total" jdbcType="DECIMAL" />
  10. <result column="wv_Introduction_count" property="wv_Introduction_count" jdbcType="INTEGER" />
  11. <result column="wv_order_count" property="wv_order_count" jdbcType="INTEGER" />
  12. <result column="wv_extract_count" property="wv_extract_count" jdbcType="INTEGER" />
  13. <result column="wv_qrcode" property="wv_qrcode" jdbcType="VARCHAR" />
  14. <result column="wv_people_count" property="wv_people_count" jdbcType="INTEGER" />
  15. <result column="wv_register_count" property="wv_register_count" jdbcType="INTEGER" />
  16. <result column="wv_contract_count" property="wv_contract_count" jdbcType="INTEGER" />
  17. <result column="wv_finish_count" property="wv_finish_count" jdbcType="INTEGER" />
  18. <result column="wv_consultant" property="wv_consultant" jdbcType="VARCHAR" />
  19. <result column="wv_account_number" property="wv_account_number" jdbcType="VARCHAR" />
  20. <result column="wv_account_bank" property="wv_account_bank" jdbcType="VARCHAR" />
  21. <result column="wv_account_number_path" property="wv_account_number_path" jdbcType="VARCHAR" />
  22. </resultMap>
  23. <!--获取所有数据-->
  24. <select id="getDcIntroducers" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer">
  25. select
  26. *
  27. from dc_introducer
  28. order by id desc
  29. </select>
  30. <select id="checkDcIntroducers" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" parameterType="java.lang.String">
  31. select
  32. *
  33. from dc_introducer
  34. where wv_phone = #{wv_phone,jdbcType=VARCHAR}
  35. order by id desc
  36. </select>
  37. <select id="queryDcIntroducers" resultType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer">
  38. select
  39. id,
  40. wv_phone,
  41. wv_gradeid,
  42. wv_Introduction_total,
  43. wv_withdraw_total,
  44. wv_Introduction_count,
  45. wv_extract_count,
  46. wv_qrcode,
  47. wv_order_count,
  48. wv_people_count,
  49. wv_register_count,
  50. wv_contract_count,
  51. wv_finish_count,
  52. wv_consultant,
  53. wv_account_number,
  54. wv_account_bank,
  55. wv_account_number_path
  56. from dc_introducer
  57. where 1=1
  58. <if test="wv_phone != null and wv_phone != ''">
  59. and wv_phone = #{wv_phone,jdbcType=VARCHAR}
  60. </if>
  61. <if test="wv_gradeid != null and wv_gradeid != ''">
  62. and wv_gradeid = #{wv_gradeid,jdbcType=INTEGER}
  63. </if>
  64. <if test="wv_Introduction_total != null and wv_Introduction_total != ''">
  65. and wv_Introduction_total = #{wv_Introduction_total,jdbcType=DECIMAL}
  66. </if>
  67. <if test="wv_withdraw_total != null and wv_withdraw_total != ''">
  68. and wv_withdraw_total = #{wv_withdraw_total,jdbcType=DECIMAL}
  69. </if>
  70. <if test="wv_Introduction_count != null and wv_Introduction_count != ''">
  71. and wv_Introduction_count = #{wv_Introduction_count,jdbcType=INTEGER}
  72. </if>
  73. <if test="wv_qrcode != null and wv_qrcode != ''">
  74. and wv_qrcode = #{wv_qrcode,jdbcType=VARCHAR}
  75. </if>
  76. <if test="wv_order_count != null and wv_order_count != ''">
  77. and wv_order_count = #{wv_order_count,jdbcType=INTEGER}
  78. </if>
  79. <if test="wv_people_count != null and wv_people_count != ''">
  80. and wv_people_count = #{wv_people_count,jdbcType=INTEGER}
  81. </if>
  82. <if test="wv_extract_count != null and wv_extract_count != ''">
  83. and wv_extract_count = #{wv_extract_count,jdbcType=INTEGER}
  84. </if>
  85. <if test="wv_register_count != null and wv_register_count != ''">
  86. and wv_register_count = #{wv_register_count,jdbcType=INTEGER}
  87. </if>
  88. <if test="wv_contract_count != null and wv_contract_count != ''">
  89. and wv_contract_count = #{wv_contract_count,jdbcType=INTEGER}
  90. </if>
  91. <if test="wv_finish_count != null and wv_finish_count != ''">
  92. and wv_finish_count = #{wv_finish_count,jdbcType=INTEGER}
  93. </if>
  94. <if test="wv_consultant != null and wv_consultant != ''">
  95. and wv_consultant = #{wv_consultant,jdbcType=INTEGER}
  96. </if>
  97. <if test="wv_account_number != null and wv_account_number != ''">
  98. and wv_account_number = #{wv_account_number,jdbcType=VARCHAR}
  99. </if>
  100. <if test="wv_account_bank != null and wv_account_bank != ''">
  101. and wv_account_bank = #{wv_account_bank,jdbcType=VARCHAR}
  102. </if>
  103. <if test="wv_account_number_path != null and wv_account_number_path != ''">
  104. and wv_account_number_path = #{wv_account_number_path,jdbcType=VARCHAR}
  105. </if>
  106. order by id desc
  107. </select>
  108. <update id="updateDcIntroducer" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
  109. update dc_introducer
  110. <set >
  111. <if test="wv_phone != null" >
  112. wv_phone = #{wv_phone,jdbcType=VARCHAR},
  113. </if>
  114. <if test="wv_gradeid != null" >
  115. wv_gradeid = #{wv_gradeid,jdbcType=INTEGER},
  116. </if>
  117. <if test="wv_Introduction_total != null" >
  118. wv_Introduction_total = #{wv_Introduction_total,jdbcType=DECIMAL},
  119. </if>
  120. <if test="wv_withdraw_total != null" >
  121. wv_withdraw_total = #{wv_withdraw_total,jdbcType=DECIMAL},
  122. </if>
  123. <if test="wv_Introduction_count != null" >
  124. wv_Introduction_count = #{wv_Introduction_count,jdbcType=INTEGER},
  125. </if>
  126. <if test="wv_order_count != null" >
  127. wv_order_count = #{wv_order_count,jdbcType=INTEGER},
  128. </if>
  129. <if test="wv_extract_count != null" >
  130. wv_extract_count = #{wv_extract_count,jdbcType=INTEGER},
  131. </if>
  132. <if test="wv_qrcode != null" >
  133. wv_qrcode = #{wv_qrcode,jdbcType=VARCHAR},
  134. </if>
  135. <if test="wv_register_count != null" >
  136. wv_register_count = #{wv_register_count,jdbcType=INTEGER},
  137. </if>
  138. <if test="wv_contract_count != null" >
  139. wv_contract_count = #{wv_contract_count,jdbcType=INTEGER},
  140. </if>
  141. <if test="wv_finish_count != null" >
  142. wv_finish_count = #{wv_finish_count,jdbcType=INTEGER},
  143. </if>
  144. <if test="wv_people_count != null" >
  145. wv_people_count = #{wv_people_count,jdbcType=INTEGER},
  146. </if>
  147. <if test="wv_consultant != null" >
  148. wv_consultant = #{wv_consultant,jdbcType=INTEGER},
  149. </if>
  150. <if test="wv_account_number_path != null" >
  151. wv_account_number_path = #{wv_account_number_path,jdbcType=VARCHAR},
  152. </if>
  153. <if test="wv_account_bank != null" >
  154. wv_account_bank = #{wv_account_bank,jdbcType=VARCHAR},
  155. </if>
  156. <if test="wv_account_number != null" >
  157. wv_account_number = #{wv_account_number,jdbcType=VARCHAR}
  158. </if>
  159. </set>
  160. where id = #{id,jdbcType=INTEGER}
  161. </update>
  162. <update id="updateAccountNumber" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
  163. update dc_introducer
  164. <set >
  165. <if test="wv_account_number != null" >
  166. wv_account_number = #{wv_account_number,jdbcType=VARCHAR},
  167. </if>
  168. <if test="wv_account_bank != null" >
  169. wv_account_bank = #{wv_account_bank,jdbcType=VARCHAR},
  170. </if>
  171. <if test="wv_account_number_path != null" >
  172. wv_account_number_path = #{wv_account_number_path,jdbcType=VARCHAR}
  173. </if>
  174. </set>
  175. where wv_phone = #{wv_phone,jdbcType=VARCHAR}
  176. </update>
  177. <insert id="insertDcIntroducer" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducer" >
  178. insert into dc_introducer
  179. <trim prefix="(" suffix=")" suffixOverrides="," >
  180. <if test="wv_phone != null" >
  181. wv_phone,
  182. </if>
  183. <if test="wv_gradeid != null" >
  184. wv_gradeid,
  185. </if>
  186. <if test="wv_Introduction_total != null" >
  187. wv_Introduction_total,
  188. </if>
  189. <if test="wv_withdraw_total != null" >
  190. wv_withdraw_total,
  191. </if>
  192. <if test="wv_Introduction_count != null" >
  193. wv_Introduction_count,
  194. </if>
  195. <if test="wv_order_count != null" >
  196. wv_order_count,
  197. </if>
  198. <if test="wv_extract_count != null" >
  199. wv_extract_count,
  200. </if>
  201. <if test="wv_qrcode != null" >
  202. wv_qrcode,
  203. </if>
  204. <if test="wv_register_count != null" >
  205. wv_register_count,
  206. </if>
  207. <if test="wv_contract_count != null" >
  208. wv_contract_count,
  209. </if>
  210. <if test="wv_finish_count != null" >
  211. wv_finish_count,
  212. </if>
  213. <if test="wv_people_count != null" >
  214. wv_people_count,
  215. </if>
  216. <if test="wv_account_number != null" >
  217. wv_account_number,
  218. </if>
  219. <if test="wv_account_bank != null" >
  220. wv_account_bank,
  221. </if>
  222. <if test="wv_consultant != null" >
  223. wv_consultant
  224. </if>
  225. </trim>
  226. <trim prefix="values (" suffix=")" suffixOverrides="," >
  227. <if test="wv_phone != null" >
  228. #{wv_phone,jdbcType=VARCHAR},
  229. </if>
  230. <if test="wv_gradeid != null" >
  231. #{wv_gradeid,jdbcType=INTEGER},
  232. </if>
  233. <if test="wv_Introduction_total != null" >
  234. #{wv_Introduction_total,jdbcType=DECIMAL},
  235. </if>
  236. <if test="wv_withdraw_total != null" >
  237. #{wv_withdraw_total,jdbcType=DECIMAL},
  238. </if>
  239. <if test="wv_extract_count != null" >
  240. #{wv_extract_count,jdbcType=INTEGER},
  241. </if>
  242. <if test="wv_order_count != null" >
  243. #{wv_order_count,jdbcType=INTEGER},
  244. </if>
  245. <if test="wv_Introduction_count != null" >
  246. #{wv_Introduction_count,jdbcType=INTEGER},
  247. </if>
  248. <if test="wv_qrcode != null" >
  249. #{wv_qrcode,jdbcType=VARCHAR},
  250. </if>
  251. <if test="wv_register_count != null" >
  252. #{wv_register_count,jdbcType=INTEGER},
  253. </if>
  254. <if test="wv_contract_count != null" >
  255. #{wv_contract_count,jdbcType=INTEGER},
  256. </if>
  257. <if test="wv_finish_count != null" >
  258. #{wv_finish_count,jdbcType=INTEGER},
  259. </if>
  260. <if test="wv_people_count != null" >
  261. #{wv_people_count,jdbcType=INTEGER},
  262. </if>
  263. <if test="wv_account_number != null" >
  264. #{wv_account_number,jdbcType=VARCHAR},
  265. </if>
  266. <if test="wv_account_bank != null" >
  267. #{wv_account_bank,jdbcType=VARCHAR},
  268. </if>
  269. <if test="wv_consultant != null" >
  270. #{wv_consultant,jdbcType=VARCHAR}
  271. </if>
  272. </trim>
  273. </insert>
  274. </mapper>