TChanggeDunMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  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.goafanti.common.dao.TChanggeDunMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TChanggeDun">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="did" jdbcType="INTEGER" property="did" />
  12. <result column="cid" jdbcType="INTEGER" property="cid" />
  13. <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
  14. <result column="tid" jdbcType="INTEGER" property="tid" />
  15. <result column="project_type" jdbcType="INTEGER" property="projectType" />
  16. <result column="dun_type" jdbcType="INTEGER" property="dunType" />
  17. <result column="wait_day" jdbcType="INTEGER" property="waitDay" />
  18. <result column="effective_count" jdbcType="INTEGER" property="effectiveCount" />
  19. <result column="aid" jdbcType="VARCHAR" property="aid" />
  20. <result column="status" jdbcType="INTEGER" property="status" />
  21. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  22. <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
  23. <result column="money" jdbcType="DECIMAL" property="money" />
  24. <result column="appropriation_ratio" jdbcType="DECIMAL" property="appropriationRatio" />
  25. </resultMap>
  26. <sql id="Example_Where_Clause">
  27. <!--
  28. WARNING - @mbg.generated
  29. This element is automatically generated by MyBatis Generator, do not modify.
  30. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  31. -->
  32. <where>
  33. <foreach collection="oredCriteria" item="criteria" separator="or">
  34. <if test="criteria.valid">
  35. <trim prefix="(" prefixOverrides="and" suffix=")">
  36. <foreach collection="criteria.criteria" item="criterion">
  37. <choose>
  38. <when test="criterion.noValue">
  39. and ${criterion.condition}
  40. </when>
  41. <when test="criterion.singleValue">
  42. and ${criterion.condition} #{criterion.value}
  43. </when>
  44. <when test="criterion.betweenValue">
  45. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  46. </when>
  47. <when test="criterion.listValue">
  48. and ${criterion.condition}
  49. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  50. #{listItem}
  51. </foreach>
  52. </when>
  53. </choose>
  54. </foreach>
  55. </trim>
  56. </if>
  57. </foreach>
  58. </where>
  59. </sql>
  60. <sql id="Update_By_Example_Where_Clause">
  61. <!--
  62. WARNING - @mbg.generated
  63. This element is automatically generated by MyBatis Generator, do not modify.
  64. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  65. -->
  66. <where>
  67. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  68. <if test="criteria.valid">
  69. <trim prefix="(" prefixOverrides="and" suffix=")">
  70. <foreach collection="criteria.criteria" item="criterion">
  71. <choose>
  72. <when test="criterion.noValue">
  73. and ${criterion.condition}
  74. </when>
  75. <when test="criterion.singleValue">
  76. and ${criterion.condition} #{criterion.value}
  77. </when>
  78. <when test="criterion.betweenValue">
  79. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  80. </when>
  81. <when test="criterion.listValue">
  82. and ${criterion.condition}
  83. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  84. #{listItem}
  85. </foreach>
  86. </when>
  87. </choose>
  88. </foreach>
  89. </trim>
  90. </if>
  91. </foreach>
  92. </where>
  93. </sql>
  94. <sql id="Base_Column_List">
  95. <!--
  96. WARNING - @mbg.generated
  97. This element is automatically generated by MyBatis Generator, do not modify.
  98. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  99. -->
  100. id, did, cid, order_no, tid, project_type, dun_type, wait_day, effective_count, aid,
  101. status, create_time, start_time, money, appropriation_ratio
  102. </sql>
  103. <select id="selectByExample" parameterType="com.goafanti.common.model.TChanggeDunExample" resultMap="BaseResultMap">
  104. <!--
  105. WARNING - @mbg.generated
  106. This element is automatically generated by MyBatis Generator, do not modify.
  107. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  108. -->
  109. select
  110. <if test="distinct">
  111. distinct
  112. </if>
  113. <include refid="Base_Column_List" />
  114. from t_changge_dun
  115. <if test="_parameter != null">
  116. <include refid="Example_Where_Clause" />
  117. </if>
  118. <if test="orderByClause != null">
  119. order by ${orderByClause}
  120. </if>
  121. </select>
  122. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  123. <!--
  124. WARNING - @mbg.generated
  125. This element is automatically generated by MyBatis Generator, do not modify.
  126. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  127. -->
  128. select
  129. <include refid="Base_Column_List" />
  130. from t_changge_dun
  131. where id = #{id,jdbcType=INTEGER}
  132. </select>
  133. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  134. <!--
  135. WARNING - @mbg.generated
  136. This element is automatically generated by MyBatis Generator, do not modify.
  137. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  138. -->
  139. delete from t_changge_dun
  140. where id = #{id,jdbcType=INTEGER}
  141. </delete>
  142. <delete id="deleteByExample" parameterType="com.goafanti.common.model.TChanggeDunExample">
  143. <!--
  144. WARNING - @mbg.generated
  145. This element is automatically generated by MyBatis Generator, do not modify.
  146. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  147. -->
  148. delete from t_changge_dun
  149. <if test="_parameter != null">
  150. <include refid="Example_Where_Clause" />
  151. </if>
  152. </delete>
  153. <insert id="insert" parameterType="com.goafanti.common.model.TChanggeDun">
  154. <!--
  155. WARNING - @mbg.generated
  156. This element is automatically generated by MyBatis Generator, do not modify.
  157. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  158. -->
  159. insert into t_changge_dun (id, did, cid,
  160. order_no, tid, project_type,
  161. dun_type, wait_day, effective_count,
  162. aid, status, create_time,
  163. start_time, money, appropriation_ratio
  164. )
  165. values (#{id,jdbcType=INTEGER}, #{did,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER},
  166. #{orderNo,jdbcType=VARCHAR}, #{tid,jdbcType=INTEGER}, #{projectType,jdbcType=INTEGER},
  167. #{dunType,jdbcType=INTEGER}, #{waitDay,jdbcType=INTEGER}, #{effectiveCount,jdbcType=INTEGER},
  168. #{aid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  169. #{startTime,jdbcType=TIMESTAMP}, #{money,jdbcType=DECIMAL}, #{appropriationRatio,jdbcType=DECIMAL}
  170. )
  171. </insert>
  172. <insert id="insertSelective" parameterType="com.goafanti.common.model.TChanggeDun">
  173. <!--
  174. WARNING - @mbg.generated
  175. This element is automatically generated by MyBatis Generator, do not modify.
  176. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  177. -->
  178. insert into t_changge_dun
  179. <trim prefix="(" suffix=")" suffixOverrides=",">
  180. <if test="id != null">
  181. id,
  182. </if>
  183. <if test="did != null">
  184. did,
  185. </if>
  186. <if test="cid != null">
  187. cid,
  188. </if>
  189. <if test="orderNo != null">
  190. order_no,
  191. </if>
  192. <if test="tid != null">
  193. tid,
  194. </if>
  195. <if test="projectType != null">
  196. project_type,
  197. </if>
  198. <if test="dunType != null">
  199. dun_type,
  200. </if>
  201. <if test="waitDay != null">
  202. wait_day,
  203. </if>
  204. <if test="effectiveCount != null">
  205. effective_count,
  206. </if>
  207. <if test="aid != null">
  208. aid,
  209. </if>
  210. <if test="status != null">
  211. status,
  212. </if>
  213. <if test="createTime != null">
  214. create_time,
  215. </if>
  216. <if test="startTime != null">
  217. start_time,
  218. </if>
  219. <if test="money != null">
  220. money,
  221. </if>
  222. <if test="appropriationRatio != null">
  223. appropriation_ratio,
  224. </if>
  225. </trim>
  226. <trim prefix="values (" suffix=")" suffixOverrides=",">
  227. <if test="id != null">
  228. #{id,jdbcType=INTEGER},
  229. </if>
  230. <if test="did != null">
  231. #{did,jdbcType=INTEGER},
  232. </if>
  233. <if test="cid != null">
  234. #{cid,jdbcType=INTEGER},
  235. </if>
  236. <if test="orderNo != null">
  237. #{orderNo,jdbcType=VARCHAR},
  238. </if>
  239. <if test="tid != null">
  240. #{tid,jdbcType=INTEGER},
  241. </if>
  242. <if test="projectType != null">
  243. #{projectType,jdbcType=INTEGER},
  244. </if>
  245. <if test="dunType != null">
  246. #{dunType,jdbcType=INTEGER},
  247. </if>
  248. <if test="waitDay != null">
  249. #{waitDay,jdbcType=INTEGER},
  250. </if>
  251. <if test="effectiveCount != null">
  252. #{effectiveCount,jdbcType=INTEGER},
  253. </if>
  254. <if test="aid != null">
  255. #{aid,jdbcType=VARCHAR},
  256. </if>
  257. <if test="status != null">
  258. #{status,jdbcType=INTEGER},
  259. </if>
  260. <if test="createTime != null">
  261. #{createTime,jdbcType=TIMESTAMP},
  262. </if>
  263. <if test="startTime != null">
  264. #{startTime,jdbcType=TIMESTAMP},
  265. </if>
  266. <if test="money != null">
  267. #{money,jdbcType=DECIMAL},
  268. </if>
  269. <if test="appropriationRatio != null">
  270. #{appropriationRatio,jdbcType=DECIMAL},
  271. </if>
  272. </trim>
  273. </insert>
  274. <select id="countByExample" parameterType="com.goafanti.common.model.TChanggeDunExample" resultType="java.lang.Long">
  275. <!--
  276. WARNING - @mbg.generated
  277. This element is automatically generated by MyBatis Generator, do not modify.
  278. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  279. -->
  280. select count(*) from t_changge_dun
  281. <if test="_parameter != null">
  282. <include refid="Example_Where_Clause" />
  283. </if>
  284. </select>
  285. <update id="updateByExampleSelective" parameterType="map">
  286. <!--
  287. WARNING - @mbg.generated
  288. This element is automatically generated by MyBatis Generator, do not modify.
  289. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  290. -->
  291. update t_changge_dun
  292. <set>
  293. <if test="record.id != null">
  294. id = #{record.id,jdbcType=INTEGER},
  295. </if>
  296. <if test="record.did != null">
  297. did = #{record.did,jdbcType=INTEGER},
  298. </if>
  299. <if test="record.cid != null">
  300. cid = #{record.cid,jdbcType=INTEGER},
  301. </if>
  302. <if test="record.orderNo != null">
  303. order_no = #{record.orderNo,jdbcType=VARCHAR},
  304. </if>
  305. <if test="record.tid != null">
  306. tid = #{record.tid,jdbcType=INTEGER},
  307. </if>
  308. <if test="record.projectType != null">
  309. project_type = #{record.projectType,jdbcType=INTEGER},
  310. </if>
  311. <if test="record.dunType != null">
  312. dun_type = #{record.dunType,jdbcType=INTEGER},
  313. </if>
  314. <if test="record.waitDay != null">
  315. wait_day = #{record.waitDay,jdbcType=INTEGER},
  316. </if>
  317. <if test="record.effectiveCount != null">
  318. effective_count = #{record.effectiveCount,jdbcType=INTEGER},
  319. </if>
  320. <if test="record.aid != null">
  321. aid = #{record.aid,jdbcType=VARCHAR},
  322. </if>
  323. <if test="record.status != null">
  324. status = #{record.status,jdbcType=INTEGER},
  325. </if>
  326. <if test="record.createTime != null">
  327. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  328. </if>
  329. <if test="record.startTime != null">
  330. start_time = #{record.startTime,jdbcType=TIMESTAMP},
  331. </if>
  332. <if test="record.money != null">
  333. money = #{record.money,jdbcType=DECIMAL},
  334. </if>
  335. <if test="record.appropriationRatio != null">
  336. appropriation_ratio = #{record.appropriationRatio,jdbcType=DECIMAL},
  337. </if>
  338. </set>
  339. <if test="_parameter != null">
  340. <include refid="Update_By_Example_Where_Clause" />
  341. </if>
  342. </update>
  343. <update id="updateByExample" parameterType="map">
  344. <!--
  345. WARNING - @mbg.generated
  346. This element is automatically generated by MyBatis Generator, do not modify.
  347. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  348. -->
  349. update t_changge_dun
  350. set id = #{record.id,jdbcType=INTEGER},
  351. did = #{record.did,jdbcType=INTEGER},
  352. cid = #{record.cid,jdbcType=INTEGER},
  353. order_no = #{record.orderNo,jdbcType=VARCHAR},
  354. tid = #{record.tid,jdbcType=INTEGER},
  355. project_type = #{record.projectType,jdbcType=INTEGER},
  356. dun_type = #{record.dunType,jdbcType=INTEGER},
  357. wait_day = #{record.waitDay,jdbcType=INTEGER},
  358. effective_count = #{record.effectiveCount,jdbcType=INTEGER},
  359. aid = #{record.aid,jdbcType=VARCHAR},
  360. status = #{record.status,jdbcType=INTEGER},
  361. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  362. start_time = #{record.startTime,jdbcType=TIMESTAMP},
  363. money = #{record.money,jdbcType=DECIMAL},
  364. appropriation_ratio = #{record.appropriationRatio,jdbcType=DECIMAL}
  365. <if test="_parameter != null">
  366. <include refid="Update_By_Example_Where_Clause" />
  367. </if>
  368. </update>
  369. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TChanggeDun">
  370. <!--
  371. WARNING - @mbg.generated
  372. This element is automatically generated by MyBatis Generator, do not modify.
  373. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  374. -->
  375. update t_changge_dun
  376. <set>
  377. <if test="did != null">
  378. did = #{did,jdbcType=INTEGER},
  379. </if>
  380. <if test="cid != null">
  381. cid = #{cid,jdbcType=INTEGER},
  382. </if>
  383. <if test="orderNo != null">
  384. order_no = #{orderNo,jdbcType=VARCHAR},
  385. </if>
  386. <if test="tid != null">
  387. tid = #{tid,jdbcType=INTEGER},
  388. </if>
  389. <if test="projectType != null">
  390. project_type = #{projectType,jdbcType=INTEGER},
  391. </if>
  392. <if test="dunType != null">
  393. dun_type = #{dunType,jdbcType=INTEGER},
  394. </if>
  395. <if test="waitDay != null">
  396. wait_day = #{waitDay,jdbcType=INTEGER},
  397. </if>
  398. <if test="effectiveCount != null">
  399. effective_count = #{effectiveCount,jdbcType=INTEGER},
  400. </if>
  401. <if test="aid != null">
  402. aid = #{aid,jdbcType=VARCHAR},
  403. </if>
  404. <if test="status != null">
  405. status = #{status,jdbcType=INTEGER},
  406. </if>
  407. <if test="createTime != null">
  408. create_time = #{createTime,jdbcType=TIMESTAMP},
  409. </if>
  410. <if test="startTime != null">
  411. start_time = #{startTime,jdbcType=TIMESTAMP},
  412. </if>
  413. <if test="money != null">
  414. money = #{money,jdbcType=DECIMAL},
  415. </if>
  416. <if test="appropriationRatio != null">
  417. appropriation_ratio = #{appropriationRatio,jdbcType=DECIMAL},
  418. </if>
  419. </set>
  420. where id = #{id,jdbcType=INTEGER}
  421. </update>
  422. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TChanggeDun">
  423. <!--
  424. WARNING - @mbg.generated
  425. This element is automatically generated by MyBatis Generator, do not modify.
  426. This element was generated on Fri Jan 10 14:42:25 CST 2020.
  427. -->
  428. update t_changge_dun
  429. set did = #{did,jdbcType=INTEGER},
  430. cid = #{cid,jdbcType=INTEGER},
  431. order_no = #{orderNo,jdbcType=VARCHAR},
  432. tid = #{tid,jdbcType=INTEGER},
  433. project_type = #{projectType,jdbcType=INTEGER},
  434. dun_type = #{dunType,jdbcType=INTEGER},
  435. wait_day = #{waitDay,jdbcType=INTEGER},
  436. effective_count = #{effectiveCount,jdbcType=INTEGER},
  437. aid = #{aid,jdbcType=VARCHAR},
  438. status = #{status,jdbcType=INTEGER},
  439. create_time = #{createTime,jdbcType=TIMESTAMP},
  440. start_time = #{startTime,jdbcType=TIMESTAMP},
  441. money = #{money,jdbcType=DECIMAL},
  442. appropriation_ratio = #{appropriationRatio,jdbcType=DECIMAL}
  443. where id = #{id,jdbcType=INTEGER}
  444. </update>
  445. <insert id="insertSelectiveList" parameterType="java.util.List">
  446. insert into t_changge_dun (did, cid,
  447. order_no, tid, project_type,
  448. dun_type, wait_day, effective_count,
  449. aid, status, create_time,
  450. start_time, money, appropriation_ratio
  451. )values
  452. <foreach collection="list" item="item" index= "index" separator =",">
  453. ( #{item.did,jdbcType=INTEGER}, #{item.cid,jdbcType=INTEGER},
  454. #{item.orderNo,jdbcType=VARCHAR}, #{item.tid,jdbcType=INTEGER}, #{item.projectType,jdbcType=INTEGER},
  455. #{item.dunType,jdbcType=INTEGER}, #{item.waitDay,jdbcType=INTEGER}, #{item.effectiveCount,jdbcType=INTEGER},
  456. #{item.aid,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER}, now(),
  457. #{item.startTime,jdbcType=TIMESTAMP}, #{item.money,jdbcType=DECIMAL}, #{item.appropriationRatio,jdbcType=DECIMAL}
  458. )
  459. </foreach>
  460. </insert>
  461. <select id="selectByCid" resultType="com.goafanti.order.bo.TChanggeDunOut">
  462. select a.id,a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, b.set_up_amount setUpAmount,
  463. a.effective_count effectiveCount, a.aid, a.create_time createTime ,b.commodity_name commodityName,a.money,a.status,
  464. a.appropriation_ratio appropriationRatio from t_changge_dun a left join t_order_task b on a.tid=b.id
  465. where cid= #{id}
  466. </select>
  467. </mapper>