NewOrderDunMapper.xml 16 KB

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