dataCenterMapper.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  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.sqx.modules.datacentre.dao.DataCentreDao">
  4. <!--总用户数-->
  5. <select id="findAllCount" resultType="int">
  6. select count(*)
  7. from tb_user
  8. where status = 1
  9. </select>
  10. <!--今日新增用户数-->
  11. <select id="findDayAddUser" resultType="int">
  12. select count(*)
  13. from tb_user
  14. where status = 1
  15. and date_format(create_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d')
  16. </select>
  17. <!--本月新增用户数-->
  18. <select id="findMonthAddUser" resultType="int">
  19. select count(*)
  20. from tb_user
  21. where status = 1
  22. and date_format(create_time, '%Y-%m') = date_format(#{date}, '%Y-%m')
  23. </select>
  24. <!--本年新增用户数-->
  25. <select id="findYearAddUser" resultType="int">
  26. select count(*)
  27. from tb_user
  28. where status = 1
  29. and date_format(create_time, '%Y') = date_format(#{date}, '%Y')
  30. </select>
  31. <!--今日收入-->
  32. <select id="findDayIncome" resultType="java.math.BigDecimal">
  33. select ifnull(sum(pay_money), 0)
  34. from tb_order
  35. where status in (3, 4)
  36. and date_format(pay_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d')
  37. </select>
  38. <!--本月收入-->
  39. <select id="findMonthIncome" resultType="java.math.BigDecimal">
  40. select ifnull(sum(pay_money), 0)
  41. from tb_order
  42. where status in (3, 4)
  43. and date_format(pay_time, '%Y-%m') = date_format(#{date}, '%Y-%m')
  44. </select>
  45. <!--本年收入-->
  46. <select id="findYearIncome" resultType="java.math.BigDecimal">
  47. select ifnull(sum(pay_money), 0)
  48. from tb_order
  49. where status in (3, 4)
  50. and date_format(pay_time, '%Y') = date_format(#{date}, '%Y')
  51. </select>
  52. <!--今日发单数量-->
  53. <select id="findIndentCount" resultType="int">
  54. select count(*)
  55. from tb_order
  56. where status in (3, 4)
  57. and date_format(pay_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d')
  58. </select>
  59. <select id="selectPayOrderAnalyze" resultType="com.sqx.modules.order.entity.TbOrder">
  60. select tor.*, gs.shop_name as shopName from tb_order tor left join goods_shop gs on tor.shop_id = gs.shop_id
  61. where tor.is_pay = 1
  62. <if test="query.dateType=='day'">
  63. and date_format(tor.pay_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
  64. </if>
  65. <if test="query.dateType=='month'">
  66. and date_format(tor.pay_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
  67. </if>
  68. <if test="query.dateType=='year'">
  69. and date_format(tor.pay_time,'%Y')=date_format(#{query.date},'%Y')
  70. </if>
  71. <if test="query.startTime!=null and query.startTime!=''">
  72. and tor.pay_time>=#{query.startTime}
  73. </if>
  74. <if test="query.endTime!=null and query.endTime!=''">
  75. and tor.pay_time <![CDATA[<=]]> #{query.endTime}
  76. </if>
  77. order by tor.pay_time desc
  78. </select>
  79. <select id="sumOrderMonth" resultType="int">
  80. select count(*)
  81. from tb_order
  82. where user_id = #{userId}
  83. and status in (3, 4)
  84. and date_format(pay_time, '%Y-%m') = date_format(#{date}, '%Y-%m')
  85. </select>
  86. <select id="sumJoinOrderMonth" resultType="int">
  87. select count(*)
  88. from tb_indent
  89. where rider_user_id = #{userId}
  90. and indent_state in (2,3,4,6,11)
  91. and date_format(create_time, '%Y-%m') = date_format(#{date}, '%Y-%m')
  92. </select>
  93. <select id="sumRiderMoney" resultType="java.math.BigDecimal">
  94. select ifnull(sum(rider_money), 0)
  95. from tb_indent
  96. where rider_user_id = #{userId}
  97. and indent_state = 6
  98. </select>
  99. <select id="sumCashMoney" resultType="java.math.BigDecimal">
  100. select ifnull(sum(money), 0)
  101. from cash_out
  102. where user_id = #{userId}
  103. and state = 1
  104. and date_format(out_at, '%Y-%m') = date_format(#{date}, '%Y-%m')
  105. </select>
  106. <select id="sumTopUpMonth" resultType="java.math.BigDecimal">
  107. select ifnull(sum(money), 0)
  108. from pay_details
  109. where user_id = #{userId}
  110. and classify = 2
  111. and date_format(pay_time, '%Y-%m') = date_format(#{date}, '%Y-%m')
  112. </select>
  113. <select id="selectTopUpStatistics" resultType="java.math.BigDecimal">
  114. select ifnull(sum(money), 0) from pay_details where classify = 2
  115. <if test="dateType=='day'">
  116. and date_format(pay_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
  117. </if>
  118. <if test="dateType=='month'">
  119. and date_format(pay_time,'%Y-%m')=date_format(#{date},'%Y-%m')
  120. </if>
  121. <if test="dateType=='year'">
  122. and date_format(pay_time,'%Y')=date_format(#{date},'%Y')
  123. </if>
  124. </select>
  125. <select id="findAllCertification" resultType="com.sqx.modules.app.entity.UserEntity">
  126. select * from tb_user where 1 = 1
  127. <if test="phone!=null and phone!=''">
  128. and phone=#{phone}
  129. </if>
  130. <if test="userName!=null and userName!=''">
  131. and user_name = #{userName}
  132. </if>
  133. <if test="checkCertification!=null and checkCertification!='' and checkCertification!='-1' ">
  134. and check_certification = #{checkCertification}
  135. </if>
  136. <if test="checkCertification!=null or checkCertification=='-1'">
  137. and check_certification in (0,1,2)
  138. </if>
  139. order by audit_time desc
  140. </select>
  141. <update id="checkCertification">
  142. update tb_user
  143. set check_certification = #{checkCertification},
  144. check_certification_message = #{checkCertificationMessage}
  145. where user_id = #{userId}
  146. </update>
  147. <select id="findCertification" resultType="com.sqx.modules.app.entity.UserEntity">
  148. select *
  149. from tb_user
  150. where user_id = #{userId}
  151. and status = 1
  152. </select>
  153. <select id="rankingList" resultType="com.sqx.modules.errand.entity.TbIndent">
  154. SELECT
  155. *,
  156. @rank_num := @rank_num + 1 AS rankNum
  157. FROM
  158. ( SELECT @rank_num := 0 ) r,
  159. ( SELECT ifnull( sum( rider_money ), 0 ) AS moneyOrder, i.rider_user_id, u.nick_name as nickName, u.avatar as
  160. avatar,
  161. i.user_province as userProvince, i.user_city as userCity, i.user_district as userDistrict
  162. FROM tb_indent i left join tb_user u on i.rider_user_id = u.user_id
  163. WHERE i.rider_user_id IS NOT NULL
  164. <if test="address!=null and address!=''">
  165. and (i.user_province like concat('%',#{address},'%') or i.user_city like concat('%',#{address},'%') or
  166. i.user_district like concat('%',#{address},'%'))
  167. </if>
  168. <if test="dateType=='day'">
  169. and date_format(i.create_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
  170. </if>
  171. <if test="dateType=='month'">
  172. and date_format(i.create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
  173. </if>
  174. <if test="dateType=='year'">
  175. and date_format(i.create_time,'%Y')=date_format(#{date},'%Y')
  176. </if>
  177. GROUP BY i.rider_user_id ) a
  178. ORDER BY moneyOrder DESC
  179. </select>
  180. <select id="selectNewShopCount" resultType="int">
  181. select count(*) from goods_shop where 1 = 1
  182. <if test="query.dateType=='day'">
  183. and date_format(create_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
  184. </if>
  185. <if test="query.dateType=='month'">
  186. and date_format(create_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
  187. </if>
  188. <if test="query.dateType=='year'">
  189. and date_format(create_time,'%Y')=date_format(#{query.date},'%Y')
  190. </if>
  191. <if test="query.endTime != null and query.endTime != ''">
  192. and create_time <![CDATA[<=]]> #{query.endTime}
  193. </if>
  194. <if test="query.startTime != null and query.startTime != ''">
  195. and create_time >= #{query.startTime}
  196. </if>
  197. </select>
  198. <select id="selectRankingList" resultType="com.sqx.modules.order.entity.TbOrder">
  199. SELECT
  200. *,
  201. @rank_num := @rank_num + 1 AS rankNum
  202. FROM
  203. ( SELECT @rank_num := 0 ) r,
  204. ( SELECT ifnull( sum( pay_money ), 0 ) AS shopMoney, tor.shop_id , u.shop_name,gp.id as shopType,gp.shop_type_name as shopTypeName
  205. FROM tb_order tor left join goods_shop u on tor.shop_id = u.shop_id
  206. left join shop_type gp on gp.id=u.shop_type_id
  207. WHERE tor.shop_id IS NOT NULL and tor.status = 4
  208. <if test="query.startTime != null and query.startTime !=''">
  209. and tor.pay_time >= #{query.startTime}
  210. </if>
  211. <if test="query.endTime != null and query.endTime != ''">
  212. and tor.pay_time <![CDATA[<=]]> #{query.endTime}
  213. </if>
  214. <if test="query.shopType != null and query.shopType != '' ">
  215. and gp.id = #{query.shopType}
  216. </if>
  217. <if test="query.dateType=='day'">
  218. and date_format(tor.pay_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
  219. </if>
  220. <if test="query.dateType=='month'">
  221. and date_format(tor.pay_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
  222. </if>
  223. <if test="query.dateType=='year'">
  224. and date_format(tor.pay_time,'%Y')=date_format(#{query.date},'%Y')
  225. </if>
  226. GROUP BY tor.shop_id ) a
  227. ORDER BY shopMoney DESC
  228. </select>
  229. <select id="excelShopCenter" resultType="com.sqx.modules.order.entity.TbOrder">
  230. SELECT
  231. *,
  232. @rank_num := @rank_num + 1 AS Rank
  233. FROM
  234. ( SELECT @rank_num := 0 ) r,
  235. ( SELECT ifnull( sum( pay_money ), 0 ) AS shopMoney, tor.shop_id , u.shop_name,gp.id as shopType,gp.shop_type_name as shopTypeName
  236. FROM tb_order tor left join goods_shop u on tor.shop_id = u.shop_id
  237. left join shop_type gp on gp.id=u.shop_type_id
  238. WHERE tor.shop_id IS NOT NULL and tor.status = 4
  239. <if test="query.startTime != null and query.startTime !=''">
  240. and tor.pay_time >= #{query.startTime}
  241. </if>
  242. <if test="query.endTime != null and query.endTime != ''">
  243. and tor.pay_time <![CDATA[<=]]> #{query.endTime}
  244. </if>
  245. <if test="query.shopType != null and query.shopType != '' ">
  246. and gp.id = #{query.shopType}
  247. </if>
  248. GROUP BY tor.shop_id ) a
  249. ORDER BY shopMoney DESC
  250. </select>
  251. <select id="allUserCount" resultType="int">
  252. select count(*) from tb_user where status = 1
  253. <if test="query.dateType=='day'">
  254. and date_format(create_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
  255. </if>
  256. <if test="query.dateType=='month'">
  257. and date_format(create_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
  258. </if>
  259. <if test="query.dateType=='year'">
  260. and date_format(create_time,'%Y')=date_format(#{query.date},'%Y')
  261. </if>
  262. <if test="query.startTime!=null and query.startTime!=''">
  263. and create_time>=#{query.startTime}
  264. </if>
  265. <if test="query.endTime!=null and query.endTime!=''">
  266. and create_time <![CDATA[<=]]> #{query.endTime}
  267. </if>
  268. </select>
  269. <select id="phoneUserCount" resultType="int">
  270. select count(*) from tb_user where status = 1 and phone is not null
  271. <if test="query.dateType=='day'">
  272. and date_format(create_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
  273. </if>
  274. <if test="query.dateType=='month'">
  275. and date_format(create_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
  276. </if>
  277. <if test="query.dateType=='year'">
  278. and date_format(create_time,'%Y')=date_format(#{query.date},'%Y')
  279. </if>
  280. <if test="query.startTime!=null and query.startTime!=''">
  281. and create_time>=#{query.startTime}
  282. </if>
  283. <if test="query.endTime!=null and query.endTime!=''">
  284. and create_time <![CDATA[<=]]> #{query.endTime}
  285. </if>
  286. </select>
  287. <select id="selectUserFeedback" resultType="com.sqx.modules.errand.entity.Feedback">
  288. select * from sys_feedback where 1 = 1
  289. <if test="userEmail!=null and userEmail!=''">
  290. and user_email = #{userEmail}
  291. </if>
  292. order by feedback_time desc
  293. </select>
  294. <select id="findUserAddIndent" resultType="com.sqx.modules.errand.entity.TbIndent">
  295. select i.*,
  296. tu.nick_name as riderNickName,
  297. tu.phone as riderPhone
  298. from tb_indent i
  299. left join tb_indent ti on ti.order_id = i.order_id
  300. left join tb_user tu on ti.rider_user_id = tu.user_id
  301. where i.user_id = #{userId}
  302. and i.indent_state in (2, 3, 4, 5, 6, 8, 9, 10)
  303. order by i.create_time desc
  304. </select>
  305. <select id="findUserReceivingIndent" resultType="com.sqx.modules.errand.entity.TbIndent">
  306. select *
  307. from tb_indent
  308. where rider_user_id = #{userId}
  309. and indent_state in (3, 4, 5, 6)
  310. order by create_time desc
  311. </select>
  312. <select id="findTopUpMoney" resultType="com.sqx.modules.pay.entity.PayDetails">
  313. select pd.*, tu.nick_name as nickName from pay_details pd left join tb_user tu on pd.user_id = tu.user_id where
  314. 1 = 1
  315. <if test="userId!=null">
  316. and pd.user_id = #{userId}
  317. </if>
  318. <if test="startTime!=null and startTime!=''and endTime!=null and endTime!='' ">
  319. and str_to_date(pd.create_time, '%Y-%m-%d') between str_to_date(#{startTime}, '%Y-%m-%d') AND
  320. str_to_date(#{endTime}, '%Y-%m-%d')
  321. </if>
  322. order by pd.create_time desc
  323. </select>
  324. <select id="billMoney" resultType="java.math.BigDecimal">
  325. select ifnull(sum(indent_money),0) from tb_indent where indent_state in (2, 3, 4, 6)
  326. <if test="dateType=='day'">
  327. and date_format(create_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
  328. </if>
  329. <if test="dateType=='month'">
  330. and date_format(create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
  331. </if>
  332. <if test="dateType=='year'">
  333. and date_format(create_time,'%Y')=date_format(#{date},'%Y')
  334. </if>
  335. </select>
  336. <select id="riderMoney" resultType="java.math.BigDecimal">
  337. select ifnull(sum(rider_money),0) from tb_indent where indent_state = "6"
  338. <if test="dateType=='day'">
  339. and date_format(create_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
  340. </if>
  341. <if test="dateType=='month'">
  342. and date_format(create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
  343. </if>
  344. <if test="dateType=='year'">
  345. and date_format(create_time,'%Y')=date_format(#{date},'%Y')
  346. </if>
  347. </select>
  348. <select id="platformMoney" resultType="java.math.BigDecimal">
  349. select ifnull(sum(platform_money),0) from tb_indent where indent_state = "6"
  350. <if test="dateType=='day'">
  351. and date_format(create_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
  352. </if>
  353. <if test="dateType=='month'">
  354. and date_format(create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
  355. </if>
  356. <if test="dateType=='year'">
  357. and date_format(create_time,'%Y')=date_format(#{date},'%Y')
  358. </if>
  359. </select>
  360. <select id="selectCashDeposit" resultType="com.sqx.modules.app.entity.UserMoneyDetails">
  361. select umd.*, tu.phone as phone, tu.nick_name as nickName from user_money_details umd left join tb_user tu on
  362. umd.user_id = tu.user_id where 1 = 1
  363. <if test="phone!=null and phone!=''">
  364. and tu.phone = #{phone}
  365. </if>
  366. <if test="type!=null">
  367. and umd.type = #{type}
  368. </if>
  369. <if test="userId!=null">
  370. and umd.user_id = #{userId}
  371. </if>
  372. and classify = 1
  373. order by umd.create_time desc
  374. </select>
  375. <select id="tcwmplatformMoney" resultType="java.math.BigDecimal">
  376. select ifnull(sum(pay_money), 0) from tb_order where status = 4
  377. <if test="dateType=='day'">
  378. and date_format(pay_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
  379. </if>
  380. <if test="dateType=='month'">
  381. and date_format(pay_time,'%Y-%m')=date_format(#{date},'%Y-%m')
  382. </if>
  383. <if test="dateType=='year'">
  384. and date_format(pay_time,'%Y')=date_format(#{date},'%Y')
  385. </if>
  386. </select>
  387. <select id="tcwmShopMoney" resultType="java.math.BigDecimal">
  388. select ifnull(sum(shop_income_money), 0) from tb_order where status = 4
  389. <if test="dateType=='day'">
  390. and date_format(pay_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
  391. </if>
  392. <if test="dateType=='month'">
  393. and date_format(pay_time,'%Y-%m')=date_format(#{date},'%Y-%m')
  394. </if>
  395. <if test="dateType=='year'">
  396. and date_format(pay_time,'%Y')=date_format(#{date},'%Y')
  397. </if>
  398. </select>
  399. <select id="selectFeedbackList" resultType="com.sqx.modules.errand.entity.Feedback">
  400. select * from sys_feedback where 1 = 1
  401. <if test="type!=null">
  402. and feedback_type = #{type}
  403. </if>
  404. order by feedback_time desc
  405. </select>
  406. <select id="selectTakeCount" resultType="int">
  407. select count(*) from tb_order
  408. where order_type = #{orderType}
  409. and is_pay=1 and status in (0,3,4,7,6)
  410. <if test="query.shopId!=null">
  411. and shop_id = #{query.shopId}
  412. </if>
  413. <if test="query.dateType=='day'">
  414. and date_format(pay_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
  415. </if>
  416. <if test="query.dateType=='month'">
  417. and date_format(pay_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
  418. </if>
  419. <if test="query.dateType=='year'">
  420. and date_format(pay_time,'%Y')=date_format(#{query.date},'%Y')
  421. </if>
  422. <if test="query.startTime!=null and query.startTime!=''">
  423. and pay_time>=#{query.startTime}
  424. </if>
  425. <if test="query.endTime!=null and query.endTime!=''">
  426. and pay_time <![CDATA[<=]]> #{query.endTime}
  427. </if>
  428. </select>
  429. <select id="selectTakeMoney" resultType="java.math.BigDecimal">
  430. select ifnull(sum(pay_money), 0) from tb_order
  431. where order_type = #{orderType}
  432. and is_pay=1 and status in (0,3,4,7,6)
  433. <if test="query.shopId!=null">
  434. and shop_id = #{query.shopId}
  435. </if>
  436. <if test="query.dateType=='day'">
  437. and date_format(pay_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
  438. </if>
  439. <if test="query.dateType=='month'">
  440. and date_format(pay_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
  441. </if>
  442. <if test="query.dateType=='year'">
  443. and date_format(pay_time,'%Y')=date_format(#{query.date},'%Y')
  444. </if>
  445. <if test="query.startTime!=null and query.startTime!=''">
  446. and pay_time>=#{query.startTime}
  447. </if>
  448. <if test="query.endTime!=null and query.endTime!=''">
  449. and pay_time <![CDATA[<=]]> #{query.endTime}
  450. </if>
  451. </select>
  452. <select id="cancelOrderCount" resultType="int">
  453. select count(*) from tb_order where status = 5
  454. <if test="query.shopId!=null">
  455. and shop_id = #{query.shopId}
  456. </if>
  457. <if test="query.dateType=='day'">
  458. and date_format(create_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
  459. </if>
  460. <if test="query.dateType=='month'">
  461. and date_format(create_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
  462. </if>
  463. <if test="query.dateType=='year'">
  464. and date_format(create_time,'%Y')=date_format(#{query.date},'%Y')
  465. </if>
  466. <if test="query.startTime!=null and query.startTime!=''">
  467. and create_time>=#{query.startTime}
  468. </if>
  469. <if test="query.endTime!=null and query.endTime!=''">
  470. and create_time <![CDATA[<=]]> #{query.endTime}
  471. </if>
  472. </select>
  473. <select id="cancelOrderMoney" resultType="java.math.BigDecimal">
  474. select ifnull(sum(pay_money), 0) from tb_order where status = 5
  475. <if test="query.shopId!=null">
  476. and shop_id = #{query.shopId}
  477. </if>
  478. <if test="query.dateType=='day'">
  479. and date_format(create_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
  480. </if>
  481. <if test="query.dateType=='month'">
  482. and date_format(create_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
  483. </if>
  484. <if test="query.dateType=='year'">
  485. and date_format(create_time,'%Y')=date_format(#{query.date},'%Y')
  486. </if>
  487. <if test="query.startTime!=null and query.startTime!=''">
  488. and create_time>=#{query.startTime}
  489. </if>
  490. <if test="query.endTime!=null and query.endTime!=''">
  491. and create_time <![CDATA[<=]]> #{query.endTime}
  492. </if>
  493. </select>
  494. </mapper>