From 213f6b217ba9eb8f5562adb7e90407a7797a581a Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期五, 24 三月 2023 10:35:37 +0800 Subject: [PATCH] 发票管理修改 --- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml | 73 +++++++++++++++++++++++++++++++++++- 1 files changed, 70 insertions(+), 3 deletions(-) diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml index 307cc05..0a1fd14 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml @@ -8,7 +8,7 @@ <result column="code" property="code" /> <result column="userId" property="userId" /> <result column="driverId" property="driverId" /> - <result column="source" property="source" /> + <result column="`source`" property="source" /> <result column="agentId" property="agentId" /> <result column="branchOfficeId" property="branchOfficeId" /> <result column="startTime" property="startTime" /> @@ -27,14 +27,81 @@ <result column="couponId" property="couponId" /> <result column="payType" property="payType" /> <result column="payTime" property="payTime" /> - <result column="state" property="state" /> + <result column="`state`" property="state" /> <result column="status" property="status" /> <result column="createTime" property="createTime" /> + <result column="startDistance" property="startLng" /> + <result column="startPrice" property="endAddress" /> + <result column="overDriveDistance" property="endLat" /> + <result column="overDrivePrice" property="endLng" /> + <result column="longDistance" property="boardingTime" /> + <result column="longDistancePrice" property="getoffTime" /> + <result column="overLongDistance" property="estimatedPrice" /> + <result column="overLongDistancePrice" property="orderMoney" /> + <result column="waitTime" property="payMoney" /> + <result column="waitTimePrice" property="discountedPrice" /> + <result column="outWaitTime" property="couponId" /> + <result column="outWaitTimePrice" property="payType" /> + <result column="badWeatherDistance" property="payTime" /> + <result column="badWeatherPrice" property="state" /> + <result column="overBadWeatherDistance" property="status" /> + <result column="overBadWeatherPrice" property="createTime" /> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> - id, code, userId, driverId, source, agentId, branchOfficeId, startTime, startAddress, startLat, startLng, endAddress, endLat, endLng, boardingTime, getoffTime, estimatedPrice, orderMoney, payMoney, discountedPrice, couponId, payType, payTime, state, status, createTime + id, code, userId, driverId, `source`, agentId, branchOfficeId, startTime, startAddress, startLat, startLng, endAddress, endLat, endLng, + boardingTime, getoffTime, estimatedPrice, orderMoney, payMoney, discountedPrice, couponId, payType, payTime, `state`, status, createTime, + startDistance,startPrice,overDriveDistance,overDrivePrice,longDistance,longDistancePrice,overLongDistance,overLongDistancePrice, +waitTime,waitTimePrice,outWaitTime,outWaitTimePrice,badWeatherDistance,badWeatherPrice,overBadWeatherDistance,overBadWeatherPrice </sql> + <sql id="Base_Column_Order"> + o.id, o.code, o.userId, o.driverId, o.`source`, o.agentId, o.branchOfficeId, o.startTime, o.startAddress, o.startLat, o.startLng, o.endAddress, o.endLat, o.endLng, + o.boardingTime, o.getoffTime, o.estimatedPrice, o.orderMoney, o.payMoney, o.discountedPrice, o.couponId, o.payType, o.payTime, o.`state`, o.status, o.createTime, + o.startDistance,o.startPrice,o.overDriveDistance,o.overDrivePrice,o.longDistance,o.longDistancePrice,o.overLongDistance,o.overLongDistancePrice, +o.waitTime,o.waitTimePrice,o.outWaitTime,o.outWaitTimePrice,o.badWeatherDistance,o.badWeatherPrice,o.overBadWeatherDistance,o.overBadWeatherPrice,a.nickname AS userName, + a.phone AS userPhone,a.cancelCount,a.status AS userStatus,d.name AS driverName,d.phone AS driverPhone + </sql> + + <select id="getOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp"> + select <include refid="Base_Column_Order"></include> + from t_order o + left join t_app_user a on o.userId = a.id + left join t_driver d on o.driverId = d.id + <where> + <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> + AND o.createTime between #{startTime} and #{endTime} + </if> + <if test="code != null and code != ''"> + AND o.code LIKE concat('%',#{code},'%') + </if> + <if test="source != null"> + AND o.source = #{source} + </if> + <if test="userName != null and userName != ''"> + AND a.nickname LIKE concat('%',#{userName},'%') + </if> + <if test="userPhone != null and userPhone != ''"> + AND a.phone LIKE concat('%',#{userPhone},'%') + </if> + <if test="state != null"> + AND o.state = #{state} + </if> + <if test="driverName != null and driverName != ''"> + AND d.name LIKE concat('%',#{driverName},'%') + </if> + <if test="isException != null"> + AND a.is_exception = #{isException} + </if> + <if test="roleType != null and roleType == 2"> + AND o.branchOfficeId = #{objectId} + </if> + <if test="roleType != null and roleType == 3"> + AND o.agentId = #{objectId} + </if> + </where> + ORDER BY o.createTime + </select> + </mapper> -- Gitblit v1.7.1