From c0f0b2825ed3dbef86b381c2490277164446dc10 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期六, 18 三月 2023 17:28:01 +0800 Subject: [PATCH] 新增加司机端接口 --- driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml index f465499..719eb48 100644 --- a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml +++ b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/dao/mapping/OrderMapper.xml @@ -116,4 +116,60 @@ left join t_app_user b on (a.userId = b.id) where a.id = #{orderId} </select> + + + <select id="queryDriverOrderList" resultType="com.supersavedriving.driver.modular.system.warpper.DriverOrderListWarpper"> + select + id, + '超省新代驾订单' as title, + UNIX_TIMESTAMP(createTime) * 1000 as createTime, + startAddress, + endAddress, + state, + source + from t_order where status = 1 and driverId = #{driverId} + <if test="null != state and 107 == state"> + and state = #{state} + </if> + <if test="null != state and 109 == state"> + and state in (108, 109) + </if> + <if test="null != state and 301 == state"> + and state = #{state} + </if> + order by createTime desc limit #{pageNum}, #{pageSize} + </select> + + + <select id="queryInviteList" resultType="com.supersavedriving.driver.modular.system.warpper.InviteListWarpper"> + select * from ( + select + a.id, + a.nickname, + min(UNIX_TIMESTAMP(b.createTime) * 1000) as time, + 1 as type + from t_app_user a + left join t_order b on (a.id = b.userId) + where a.`status` = 1 and a.inviterType = 2 and a.inviterId = #{driverId} + <if test="null != time and '' != time"> + and DATE_FORMAT(b.createTime, '%Y年%m月') = #{time} + </if> + group by a.id, a.nickname + + union all + + select + a.id, + a.`name`, + min(UNIX_TIMESTAMP(b.createTime) * 1000) as time, + 2 as type + from t_driver a + left join t_order b on (a.id = b.driverId) + where a.`status` = 1 and a.approvalStatus = 2 and a.inviterType = 2 and a.inviterId = #{driverId} + <if test="null != time and '' != time"> + and DATE_FORMAT(b.createTime, '%Y年%m月') = #{time} + </if> + group by a.id, a.`name` + ) as aa where aa.time is not null order by aa.time desc limit #{pageNum}, #{pageSize} + </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1