From 75a2623173bcc4a235aa1f99f7ef28519186160b Mon Sep 17 00:00:00 2001 From: yanghb <yanghb> Date: 星期五, 21 四月 2023 11:24:25 +0800 Subject: [PATCH] 代码调整 --- UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml | 46 ++++++++-------------------------------------- 1 files changed, 8 insertions(+), 38 deletions(-) diff --git a/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml b/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml index d5019db..0012180 100644 --- a/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml +++ b/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/dao/mapping/OrderLogisticsMapper.xml @@ -13,8 +13,6 @@ <result column="cargoType" property="cargoType"/> <result column="urgent" property="urgent"/> <result column="cargoNumber" property="cargoNumber"/> - <result column="userImg" property="userImg"/> - <result column="driverImg" property="driverImg"/> <result column="remark" property="remark"/> <result column="placementLon" property="placementLon"/> <result column="placementLat" property="placementLat"/> @@ -41,7 +39,6 @@ <result column="orderMoney" property="orderMoney"/> <result column="travelMoney" property="travelMoney"/> <result column="tipMoney" property="tipMoney"/> - <result column="holidayFee" property="holidayFee"/> <result column="redPacketMoney" property="redPacketMoney"/> <result column="couponMoney" property="couponMoney"/> <result column="redPacketId" property="redPacketId"/> @@ -49,12 +46,8 @@ <result column="discount" property="discount"/> <result column="discountMoney" property="discountMoney"/> <result column="activityId" property="activityId"/> - <result column="taxiCardId" property="taxiCardId"/> - <result column="userTaxiCardId" property="userTaxiCardId"/> - <result column="discountAmount" property="discountAmount"/> <result column="companyId" property="companyId"/> <result column="payMoney" property="payMoney"/> - <result column="thankYouFee" property="thankYouFee"/> <result column="state" property="state"/> <result column="insertTime" property="insertTime"/> <result column="travelTime" property="travelTime"/> @@ -163,14 +156,8 @@ state as state, orderMoney as orderMoney, payMoney as payMoney, - (select price from t_order_logistics_spread where orderLogisticsId = a.id) as differenceMoney, - userImg, - driverImg, - thankYouFee, - DATE_FORMAT(arriveTimeExpect, '%Y-%m-%d %H:%i') as arriveTimeExpect, - IF(endServiceTime is not null,DATE_FORMAT(endServiceTime, '%Y-%m-%d %H:%i'),'') as endServiceTime, - pickUpCode - from t_order_logistics as a where userId = #{uid} and a.type = #{type} order by insertTime desc limit #{pageNum}, #{size} + (select price from t_order_logistics_spread where orderLogisticsId = a.id) as differenceMoney + from t_order_logistics as a where userId = #{uid} order by insertTime desc limit #{pageNum}, #{size} </select> @@ -187,7 +174,7 @@ <select id="queryInvoiceOrder" resultType="map"> select - id as orderId, + id as id, DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i') as time, startAddress as startAddress, endAddress as endAddress, @@ -198,39 +185,22 @@ `type` as orderType from t_order_logistics where state in (9) <if test="type == 1"> - and (invoiceId is null or invoiceId in (select id from t_invoice where state = 3)) + and invoiceId is null and invoiceId in (select id from t_invoice where state != 2) </if> <if test="type == 2"> and invoiceId in (select id from t_invoice where state = 2) </if> - <if test="null != startTime"> - and travelTime >= #{startTime} + <if test="null != startTime and null != endTime"> + and travelTime between #{startTime} and #{endTime} </if> - <if test="null != startMoney"> - and payMoney >= #{startMoney} - </if> - <if test="null != endTime"> - and #{endTime}>= travelTime - </if> - <if test="null != endMoney"> - and #{endMoney}>=payMoney + <if test="null != startMoney and null != endMoney"> + and payMoney between #{startMoney} and #{endMoney} </if> <if test="null !=uid"> and userId = #{uid} </if> <if test="null != orderType"> and `type` = #{orderType} - </if> - </select> - - - <select id="queryByState" resultType="com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics"> - select * from t_order_logistics where isDelete = 1 and userId = #{uid} - <if test="null != state"> - and state in - <foreach collection="state" item="item" index="index" open="(" separator="," close=")"> - #{item} - </foreach> </if> </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1