From 7ab1fcfdd4facfdafac50dc06804408e4559dba7 Mon Sep 17 00:00:00 2001 From: kongdeqiang <123456> Date: 星期一, 24 二月 2025 08:20:49 +0800 Subject: [PATCH] fix : 查询出场接口修改 --- src/main/resources/mapper/OutParkMapper.xml | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/OutParkMapper.xml b/src/main/resources/mapper/OutParkMapper.xml index 9921d25..f4292b9 100644 --- a/src/main/resources/mapper/OutParkMapper.xml +++ b/src/main/resources/mapper/OutParkMapper.xml @@ -21,19 +21,26 @@ <result property="status3" column="status3"/> <result property="time" column="time"/> <result property="code2" column="code2"/> + <result property="txnOrderId" column="txn_order_id"/> + <result property="txnOrderTime" column="txn_order_time"/> + <result property="respTxnTime" column="resp_txn_time"/> + <result property="qrCode" column="qr_code"/> </resultMap> <select id="getList" resultType="com.boying.entity.OutPark"> select * from out_park <where> 1=1 <if test="carNo != null and carNo != ''"> - and car_no = #{carNo} + and car_no like concat('%',#{carNo},'%') </if> <if test="payCode != null and payCode != ''"> and pay_code = #{payCode} </if> <if test="parkId != null and parkId != ''"> and park_id = #{parkId} + </if> + <if test="status != null and status != ''"> + and status = #{status} </if> <if test="date != null and date != ''"> and DATE_FORMAT(create_time,'%Y-%m-%d') >= DATE_FORMAT(#{date},'%Y-%m-%d') @@ -56,6 +63,9 @@ <if test="parkId != null and parkId != ''"> and park_id = #{parkId} </if> + <if test="status != null and status != ''"> + and status = #{status} + </if> <if test="date != null and date != ''"> and DATE_FORMAT(create_time,'%Y-%m-%d') >= DATE_FORMAT(#{date},'%Y-%m-%d') and DATE_FORMAT(create_time,'%Y-%m-%d') <= DATE_FORMAT(#{date},'%Y-%m-%d') @@ -66,4 +76,15 @@ select id,car_no,status2 from out_park where barrier_id = #{barrierId} and `status` = 1 and status2 = 0 and del_flag = 0 limit 1; </select> + + <select id="getVoList" resultType="com.boying.entity.vo.OutParkVo"> + SELECT SUM(price) price,IFNULL(count( id ),0) num,park_id,DATE_FORMAT(update_time, '%Y-%m-%d') ti FROM out_park + WHERE `status` = 1 AND pay_code IS NOT NULL + <if test="parkId != null and parkId != ''"> + and park_id = #{parkId} + </if> + AND DATE_FORMAT(update_time,'%Y-%m-%d') >= DATE_FORMAT(#{startDate},'%Y-%m-%d') + AND DATE_FORMAT(update_time,'%Y-%m-%d') <= DATE_FORMAT(#{endDate},'%Y-%m-%d') + GROUP BY ti,park_id + </select> </mapper> -- Gitblit v1.9.1