OrderImageMapper.xml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  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.izouma.awesomeadmin.dao.OrderImageMapper">
  4. <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.OrderImage">
  5. <id column="id" property="id" jdbcType="INTEGER"/>
  6. <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
  7. <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
  8. <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
  9. <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
  10. <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
  11. <result column="order_id" property="orderId" jdbcType="VARCHAR"/>
  12. <result column="user_id" property="userId" jdbcType="VARCHAR"/>
  13. <result column="store_id" property="storeId" jdbcType="VARCHAR"/>
  14. <result column="original_image" property="originalImage" jdbcType="VARCHAR"/>
  15. <result column="original_size" property="originalSize" jdbcType="DECIMAL"/>
  16. <result column="finished_image" property="finishedImage" jdbcType="VARCHAR"/>
  17. <result column="finished_size" property="finishedSize" jdbcType="DECIMAL"/>
  18. <result column="deal_user" property="dealUser" jdbcType="VARCHAR"/>
  19. <result column="status_flag" property="statusFlag" jdbcType="INTEGER"/>
  20. <result column="remark" property="remark" jdbcType="VARCHAR"/>
  21. <result column="image_name" property="imageName" jdbcType="VARCHAR"/>
  22. </resultMap>
  23. <sql id="Base_Column_List">
  24. <trim suffixOverrides=",">
  25. id,
  26. del_flag,
  27. update_time,
  28. update_user,
  29. create_time,
  30. create_user,
  31. order_id,
  32. user_id,
  33. store_id,
  34. original_image,
  35. original_size,
  36. finished_image,
  37. finished_size,
  38. deal_user,
  39. status_flag,
  40. remark,
  41. image_name,
  42. </trim>
  43. </sql>
  44. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
  45. select
  46. <include refid="Base_Column_List"/>
  47. from order_image
  48. where id = #{id,jdbcType=INTEGER}
  49. </select>
  50. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  51. delete from order_image
  52. where id = #{id,jdbcType=INTEGER}
  53. </delete>
  54. <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.OrderImage" useGeneratedKeys="true"
  55. keyProperty="id">
  56. insert into order_image
  57. <trim prefix="(" suffix=")" suffixOverrides=",">
  58. <if test="id!= null">
  59. id,
  60. </if>
  61. <if test="delFlag!= null">
  62. del_flag,
  63. </if>
  64. <if test="updateTime!= null">
  65. update_time,
  66. </if>
  67. <if test="updateUser!= null">
  68. update_user,
  69. </if>
  70. <if test="createTime!= null">
  71. create_time,
  72. </if>
  73. <if test="createUser!= null">
  74. create_user,
  75. </if>
  76. <if test="orderId!= null">
  77. order_id,
  78. </if>
  79. <if test="userId!= null">
  80. user_id,
  81. </if>
  82. <if test="storeId!= null">
  83. store_id,
  84. </if>
  85. <if test="originalImage!= null">
  86. original_image,
  87. </if>
  88. <if test="originalSize!= null">
  89. original_size,
  90. </if>
  91. <if test="finishedImage!= null">
  92. finished_image,
  93. </if>
  94. <if test="finishedSize!= null">
  95. finished_size,
  96. </if>
  97. <if test="dealUser!= null">
  98. deal_user,
  99. </if>
  100. <if test="statusFlag!= null">
  101. status_flag,
  102. </if>
  103. <if test="remark!= null">
  104. remark,
  105. </if>
  106. <if test="imageName!= null">
  107. image_name,
  108. </if>
  109. </trim>
  110. <trim prefix="values (" suffix=")" suffixOverrides=",">
  111. <if test="id != null">
  112. #{id,jdbcType=INTEGER},
  113. </if>
  114. <if test="delFlag != null">
  115. #{delFlag,jdbcType=CHAR},
  116. </if>
  117. <if test="updateTime != null">
  118. #{updateTime,jdbcType=TIMESTAMP},
  119. </if>
  120. <if test="updateUser != null">
  121. #{updateUser,jdbcType=VARCHAR},
  122. </if>
  123. <if test="createTime != null">
  124. #{createTime,jdbcType=TIMESTAMP},
  125. </if>
  126. <if test="createUser != null">
  127. #{createUser,jdbcType=VARCHAR},
  128. </if>
  129. <if test="orderId != null">
  130. #{orderId,jdbcType=VARCHAR},
  131. </if>
  132. <if test="userId != null">
  133. #{userId,jdbcType=VARCHAR},
  134. </if>
  135. <if test="storeId != null">
  136. #{storeId,jdbcType=VARCHAR},
  137. </if>
  138. <if test="originalImage != null">
  139. #{originalImage,jdbcType=VARCHAR},
  140. </if>
  141. <if test="originalSize != null">
  142. #{originalSize,jdbcType=DECIMAL},
  143. </if>
  144. <if test="finishedImage != null">
  145. #{finishedImage,jdbcType=VARCHAR},
  146. </if>
  147. <if test="finishedSize != null">
  148. #{finishedSize,jdbcType=DECIMAL},
  149. </if>
  150. <if test="dealUser != null">
  151. #{dealUser,jdbcType=VARCHAR},
  152. </if>
  153. <if test="statusFlag != null">
  154. #{statusFlag,jdbcType=INTEGER},
  155. </if>
  156. <if test="remark != null">
  157. #{remark,jdbcType=VARCHAR},
  158. </if>
  159. <if test="imageName != null">
  160. #{imageName,jdbcType=VARCHAR},
  161. </if>
  162. </trim>
  163. </insert>
  164. <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.OrderImage">
  165. update order_image
  166. <set>
  167. <if test="id != null">
  168. id= #{id,jdbcType=INTEGER},
  169. </if>
  170. <if test="delFlag != null">
  171. del_flag= #{delFlag,jdbcType=CHAR},
  172. </if>
  173. <if test="updateTime != null">
  174. update_time= #{updateTime,jdbcType=TIMESTAMP},
  175. </if>
  176. <if test="updateUser != null">
  177. update_user= #{updateUser,jdbcType=VARCHAR},
  178. </if>
  179. <if test="createTime != null">
  180. create_time= #{createTime,jdbcType=TIMESTAMP},
  181. </if>
  182. <if test="createUser != null">
  183. create_user= #{createUser,jdbcType=VARCHAR},
  184. </if>
  185. <if test="orderId != null">
  186. order_id= #{orderId,jdbcType=VARCHAR},
  187. </if>
  188. <if test="userId != null">
  189. user_id= #{userId,jdbcType=VARCHAR},
  190. </if>
  191. <if test="storeId != null">
  192. store_id= #{storeId,jdbcType=VARCHAR},
  193. </if>
  194. <if test="originalImage != null">
  195. original_image= #{originalImage,jdbcType=VARCHAR},
  196. </if>
  197. <if test="originalSize != null">
  198. original_size= #{originalSize,jdbcType=DECIMAL},
  199. </if>
  200. <if test="finishedImage != null">
  201. finished_image= #{finishedImage,jdbcType=VARCHAR},
  202. </if>
  203. <if test="finishedSize != null">
  204. finished_size= #{finishedSize,jdbcType=DECIMAL},
  205. </if>
  206. <if test="dealUser != null">
  207. deal_user= #{dealUser,jdbcType=VARCHAR},
  208. </if>
  209. <if test="statusFlag != null">
  210. status_flag= #{statusFlag,jdbcType=INTEGER},
  211. </if>
  212. <if test="remark != null">
  213. remark= #{remark,jdbcType=VARCHAR},
  214. </if>
  215. <if test="imageName != null">
  216. image_name= #{imageName,jdbcType=VARCHAR},
  217. </if>
  218. </set>
  219. where id = #{id,jdbcType=INTEGER}
  220. </update>
  221. <select id="queryOrderImageByPage" parameterType="java.util.Map"
  222. resultType="com.izouma.awesomeadmin.model.OrderImage">
  223. select
  224. <include refid="Base_Column_List"/>
  225. <if test="record.repairId != null and !&quot;&quot;.equals(record.repairId)">
  226. ,
  227. (
  228. SELECT
  229. order_repair_detail.remark
  230. FROM
  231. order_repair_detail
  232. WHERE
  233. order_repair_detail.del_flag = 'N'
  234. and order_repair_detail.image_id = order_image.id
  235. ORDER BY order_repair_detail.id DESC
  236. LIMIT 1
  237. )
  238. as detail_remark
  239. </if>
  240. from order_image
  241. <where>
  242. and del_flag = 'N'
  243. <if test="record.baseRepairId != null and !&quot;&quot;.equals(record.baseRepairId)">
  244. and id in ( SELECT image_id FROM order_repair_detail WHERE repair_id = #{record.baseRepairId})
  245. </if>
  246. <if test="record.id != null and !&quot;&quot;.equals(record.id)">
  247. and id = #{record.id}
  248. </if>
  249. <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
  250. and del_flag = #{record.delFlag}
  251. </if>
  252. <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
  253. and update_time = #{record.updateTime}
  254. </if>
  255. <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
  256. and update_user = #{record.updateUser}
  257. </if>
  258. <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
  259. and create_time = #{record.createTime}
  260. </if>
  261. <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
  262. and create_user = #{record.createUser}
  263. </if>
  264. <if test="record.orderId != null and !&quot;&quot;.equals(record.orderId)">
  265. and order_id = #{record.orderId}
  266. </if>
  267. <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
  268. and user_id = #{record.userId}
  269. </if>
  270. <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
  271. and store_id = #{record.storeId}
  272. </if>
  273. <if test="record.originalImage != null and !&quot;&quot;.equals(record.originalImage)">
  274. and original_image = #{record.originalImage}
  275. </if>
  276. <if test="record.originalSize != null and !&quot;&quot;.equals(record.originalSize)">
  277. and original_size = #{record.originalSize}
  278. </if>
  279. <if test="record.finishedImage != null and !&quot;&quot;.equals(record.finishedImage)">
  280. and finished_image = #{record.finishedImage}
  281. </if>
  282. <if test="record.finishedSize != null and !&quot;&quot;.equals(record.finishedSize)">
  283. and finished_size = #{record.finishedSize}
  284. </if>
  285. <if test="record.dealUser != null and !&quot;&quot;.equals(record.dealUser)">
  286. and deal_user = #{record.dealUser}
  287. </if>
  288. <if test="record.statusFlag != null and !&quot;&quot;.equals(record.statusFlag)">
  289. and status_flag = #{record.statusFlag}
  290. </if>
  291. <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
  292. and remark = #{record.remark}
  293. </if>
  294. <if test="record.imageName != null and !&quot;&quot;.equals(record.imageName)">
  295. and image_name = #{record.imageName}
  296. </if>
  297. <if test="record.unFinished != null and !&quot;&quot;.equals(record.unFinished)">
  298. <if test="'1'.toString()==record.unFinished">
  299. and (finished_image is null or finished_image = '')
  300. </if>
  301. <if test="'0'.toString()==record.unFinished">
  302. and (finished_image is not null and finished_image != '')
  303. </if>
  304. </if>
  305. <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
  306. <trim prefix="and (" suffix=")" prefixOverrides="OR">
  307. OR order_id LIKE concat('%',#{record.searchKey},'%')
  308. OR user_id LIKE concat('%',#{record.searchKey},'%')
  309. OR store_id LIKE concat('%',#{record.searchKey},'%')
  310. OR original_image LIKE concat('%',#{record.searchKey},'%')
  311. OR original_size LIKE concat('%',#{record.searchKey},'%')
  312. OR finished_image LIKE concat('%',#{record.searchKey},'%')
  313. OR finished_size LIKE concat('%',#{record.searchKey},'%')
  314. OR deal_user LIKE concat('%',#{record.searchKey},'%')
  315. OR status_flag LIKE concat('%',#{record.searchKey},'%')
  316. OR remark LIKE concat('%',#{record.searchKey},'%')
  317. </trim>
  318. </if>
  319. <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
  320. <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
  321. <choose>
  322. <when test="item.indexOf('like') != -1">
  323. <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
  324. <if test="detailIndex == 3">
  325. concat('%',#{itemDetail},'%')
  326. </if>
  327. <if test="detailIndex &lt; 3">
  328. ${itemDetail}
  329. </if>
  330. </foreach>
  331. </when>
  332. <otherwise>
  333. <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
  334. <if test="detailIndex == 3">
  335. #{itemDetail}
  336. </if>
  337. <if test="detailIndex &lt; 3">
  338. ${itemDetail}
  339. </if>
  340. </foreach>
  341. </otherwise>
  342. </choose>
  343. </foreach>
  344. </if>
  345. </where>
  346. order by
  347. <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
  348. <trim suffixOverrides=",">
  349. <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
  350. <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
  351. ${itemDetail}
  352. </foreach>
  353. </foreach>
  354. </trim>
  355. ,
  356. </if>
  357. id desc
  358. </select>
  359. <select id="queryAllOrderImage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderImage">
  360. select
  361. <include refid="Base_Column_List"/>
  362. from order_image
  363. <where>
  364. and del_flag = 'N'
  365. <if test="id != null and !&quot;&quot;.equals(id)">
  366. and id = #{id}
  367. </if>
  368. <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
  369. and del_flag = #{delFlag}
  370. </if>
  371. <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
  372. and update_time = #{updateTime}
  373. </if>
  374. <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
  375. and update_user = #{updateUser}
  376. </if>
  377. <if test="createTime != null and !&quot;&quot;.equals(createTime)">
  378. and create_time = #{createTime}
  379. </if>
  380. <if test="createUser != null and !&quot;&quot;.equals(createUser)">
  381. and create_user = #{createUser}
  382. </if>
  383. <if test="orderId != null and !&quot;&quot;.equals(orderId)">
  384. and order_id = #{orderId}
  385. </if>
  386. <if test="userId != null and !&quot;&quot;.equals(userId)">
  387. and user_id = #{userId}
  388. </if>
  389. <if test="storeId != null and !&quot;&quot;.equals(storeId)">
  390. and store_id = #{storeId}
  391. </if>
  392. <if test="originalImage != null and !&quot;&quot;.equals(originalImage)">
  393. and original_image = #{originalImage}
  394. </if>
  395. <if test="originalSize != null and !&quot;&quot;.equals(originalSize)">
  396. and original_size = #{originalSize}
  397. </if>
  398. <if test="finishedImage != null and !&quot;&quot;.equals(finishedImage)">
  399. and finished_image = #{finishedImage}
  400. </if>
  401. <if test="finishedSize != null and !&quot;&quot;.equals(finishedSize)">
  402. and finished_size = #{finishedSize}
  403. </if>
  404. <if test="dealUser != null and !&quot;&quot;.equals(dealUser)">
  405. and deal_user = #{dealUser}
  406. </if>
  407. <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
  408. and status_flag = #{statusFlag}
  409. </if>
  410. <if test="remark != null and !&quot;&quot;.equals(remark)">
  411. and remark = #{remark}
  412. </if>
  413. <if test="imageName != null and !&quot;&quot;.equals(imageName)">
  414. and image_name = #{imageName}
  415. </if>
  416. <if test="unFinished != null and !&quot;&quot;.equals(unFinished)">
  417. <if test="'1'.toString()==unFinished">
  418. and (finished_image is null or finished_image = '')
  419. </if>
  420. <if test="'0'.toString()==unFinished">
  421. and (finished_image is not null and finished_image != '')
  422. </if>
  423. </if>
  424. <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
  425. <trim prefix="and (" suffix=")" prefixOverrides="OR">
  426. OR order_id LIKE concat('%',#{searchKey},'%')
  427. OR user_id LIKE concat('%',#{searchKey},'%')
  428. OR store_id LIKE concat('%',#{searchKey},'%')
  429. OR original_image LIKE concat('%',#{searchKey},'%')
  430. OR original_size LIKE concat('%',#{searchKey},'%')
  431. OR finished_image LIKE concat('%',#{searchKey},'%')
  432. OR finished_size LIKE concat('%',#{searchKey},'%')
  433. OR deal_user LIKE concat('%',#{searchKey},'%')
  434. OR status_flag LIKE concat('%',#{searchKey},'%')
  435. OR remark LIKE concat('%',#{searchKey},'%')
  436. </trim>
  437. </if>
  438. <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
  439. <foreach item="item" index="index" collection="advancedQuery.split('_;')">
  440. <choose>
  441. <when test="item.indexOf('like') != -1">
  442. <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
  443. <if test="detailIndex == 3">
  444. concat('%',#{itemDetail},'%')
  445. </if>
  446. <if test="detailIndex &lt; 3">
  447. ${itemDetail}
  448. </if>
  449. </foreach>
  450. </when>
  451. <otherwise>
  452. <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
  453. <if test="detailIndex == 3">
  454. #{itemDetail}
  455. </if>
  456. <if test="detailIndex &lt; 3">
  457. ${itemDetail}
  458. </if>
  459. </foreach>
  460. </otherwise>
  461. </choose>
  462. </foreach>
  463. </if>
  464. </where>
  465. order by
  466. <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
  467. <trim suffixOverrides=",">
  468. <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
  469. <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
  470. ${itemDetail}
  471. </foreach>
  472. </foreach>
  473. </trim>
  474. ,
  475. </if>
  476. id desc
  477. </select>
  478. <select id="queryOrderImage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderImage">
  479. select
  480. <include refid="Base_Column_List"/>
  481. from order_image
  482. <where>
  483. and del_flag = 'N'
  484. <if test="id != null and !&quot;&quot;.equals(id)">
  485. and id = #{id}
  486. </if>
  487. <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
  488. and del_flag = #{delFlag}
  489. </if>
  490. <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
  491. and update_time = #{updateTime}
  492. </if>
  493. <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
  494. and update_user = #{updateUser}
  495. </if>
  496. <if test="createTime != null and !&quot;&quot;.equals(createTime)">
  497. and create_time = #{createTime}
  498. </if>
  499. <if test="createUser != null and !&quot;&quot;.equals(createUser)">
  500. and create_user = #{createUser}
  501. </if>
  502. <if test="orderId != null and !&quot;&quot;.equals(orderId)">
  503. and order_id = #{orderId}
  504. </if>
  505. <if test="userId != null and !&quot;&quot;.equals(userId)">
  506. and user_id = #{userId}
  507. </if>
  508. <if test="storeId != null and !&quot;&quot;.equals(storeId)">
  509. and store_id = #{storeId}
  510. </if>
  511. <if test="originalImage != null and !&quot;&quot;.equals(originalImage)">
  512. and original_image = #{originalImage}
  513. </if>
  514. <if test="originalSize != null and !&quot;&quot;.equals(originalSize)">
  515. and original_size = #{originalSize}
  516. </if>
  517. <if test="finishedImage != null and !&quot;&quot;.equals(finishedImage)">
  518. and finished_image = #{finishedImage}
  519. </if>
  520. <if test="finishedSize != null and !&quot;&quot;.equals(finishedSize)">
  521. and finished_size = #{finishedSize}
  522. </if>
  523. <if test="dealUser != null and !&quot;&quot;.equals(dealUser)">
  524. and deal_user = #{dealUser}
  525. </if>
  526. <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
  527. and status_flag = #{statusFlag}
  528. </if>
  529. <if test="remark != null and !&quot;&quot;.equals(remark)">
  530. and remark = #{remark}
  531. </if>
  532. <if test="imageName != null and !&quot;&quot;.equals(imageName)">
  533. and image_name = #{imageName}
  534. </if>
  535. </where>
  536. LIMIT 1
  537. </select>
  538. <select id="getMemorySize" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderImage">
  539. SELECT
  540. store_id,
  541. ROUND(SUM(original_size) / 1024) AS original_size,
  542. ROUND(SUM(finished_size) / 1024) AS finished_size,
  543. ROUND(
  544. SUM(original_size) / 1024 + SUM(finished_size) / 1024
  545. ) AS total_size
  546. FROM
  547. order_image
  548. <where>
  549. and del_flag = 'N'
  550. <if test="id != null and !&quot;&quot;.equals(id)">
  551. and id = #{id}
  552. </if>
  553. <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
  554. and del_flag = #{delFlag}
  555. </if>
  556. <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
  557. and update_time = #{updateTime}
  558. </if>
  559. <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
  560. and update_user = #{updateUser}
  561. </if>
  562. <if test="createTime != null and !&quot;&quot;.equals(createTime)">
  563. and create_time = #{createTime}
  564. </if>
  565. <if test="createUser != null and !&quot;&quot;.equals(createUser)">
  566. and create_user = #{createUser}
  567. </if>
  568. <if test="orderId != null and !&quot;&quot;.equals(orderId)">
  569. and order_id = #{orderId}
  570. </if>
  571. <if test="userId != null and !&quot;&quot;.equals(userId)">
  572. and user_id = #{userId}
  573. </if>
  574. <if test="storeId != null and !&quot;&quot;.equals(storeId)">
  575. and store_id = #{storeId}
  576. </if>
  577. <if test="originalImage != null and !&quot;&quot;.equals(originalImage)">
  578. and original_image = #{originalImage}
  579. </if>
  580. <if test="originalSize != null and !&quot;&quot;.equals(originalSize)">
  581. and original_size = #{originalSize}
  582. </if>
  583. <if test="finishedImage != null and !&quot;&quot;.equals(finishedImage)">
  584. and finished_image = #{finishedImage}
  585. </if>
  586. <if test="finishedSize != null and !&quot;&quot;.equals(finishedSize)">
  587. and finished_size = #{finishedSize}
  588. </if>
  589. <if test="dealUser != null and !&quot;&quot;.equals(dealUser)">
  590. and deal_user = #{dealUser}
  591. </if>
  592. <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
  593. and status_flag = #{statusFlag}
  594. </if>
  595. <if test="remark != null and !&quot;&quot;.equals(remark)">
  596. and remark = #{remark}
  597. </if>
  598. <if test="imageName != null and !&quot;&quot;.equals(imageName)">
  599. and image_name = #{imageName}
  600. </if>
  601. </where>
  602. GROUP BY
  603. store_id
  604. </select>
  605. <update id="delete">
  606. UPDATE order_image SET del_flag = 'Y'
  607. <where>
  608. AND id = #{id}
  609. </where>
  610. </update>
  611. <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderImage">
  612. select
  613. <include refid="Base_Column_List"/>
  614. from order_image
  615. <where>
  616. and del_flag = 'N'
  617. </where>
  618. order by id desc
  619. </select>
  620. </mapper>