From 352f7504b8e340996b37718950635a674d0045b0 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期一, 27 二月 2023 18:16:26 +0800 Subject: [PATCH] 订单管理 --- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 46 insertions(+), 4 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 1bdd71a..7d7635d 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,7 +27,7 @@ <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" /> @@ -50,10 +50,52 @@ <!-- 通用查询结果列 --> <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> + </where> + ORDER BY o.createTime + </select> + </mapper> -- Gitblit v1.7.1