From 05e13dc68b3db44868d9e02a10ccc330366a49c6 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 08 八月 2023 11:58:36 +0800
Subject: [PATCH] 修改bug
---
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRevenueMapper.xml | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRevenueMapper.xml b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRevenueMapper.xml
index 4d42051..4410ba6 100644
--- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRevenueMapper.xml
+++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRevenueMapper.xml
@@ -101,6 +101,7 @@
AND t.agentId = #{objectId}
</if>
</where>
+ ORDER BY t.businessTime DESC
</select>
<select id="commissionOrBalanceDetail" resultType="com.stylefeng.guns.modular.system.controller.resp.RevenueExpenditureResp">
SELECT
@@ -126,9 +127,9 @@
cw.type = 2 AND cw.businessType = #{type} AND cw.code = #{code}
</select>
<select id="getDataStatisticsIncomeOrCommission" resultType="com.stylefeng.guns.modular.system.controller.resp.PerformanceTableResp">
- SELECT date_format(r.createTime, '%Y-%m') AS monthTime,SUM(r.amount) AS amount,d.name AS userName
+ SELECT date_format(r.createTime, '%Y-%m') AS monthTime,SUM(r.amount) AS amount,d.userName
FROM t_revenue r
- LEFT JOIN t_driver d ON r.userId = d.id
+ LEFT JOIN (SELECT id,name AS userName from t_driver) d ON r.userId = d.id
LEFT JOIN t_order o ON r.orderId = o.id
<where>
<if test="agentId != null">
@@ -168,9 +169,9 @@
ORDER BY amount DESC
</select>
<select id="getDataStatisticsIncomeOrCommissionByIds" resultType="com.stylefeng.guns.modular.system.controller.resp.PerformanceTableResp">
- SELECT date_format(r.createTime, '%Y-%m') AS monthTime,SUM(r.amount) AS amount,d.name AS userName
+ SELECT date_format(r.createTime, '%Y-%m') AS monthTime,SUM(r.amount) AS amount,d.userName
FROM t_revenue r
- LEFT JOIN t_driver d ON r.userId = d.id
+ LEFT JOIN (SELECT id,name AS userName from t_driver) d ON r.userId = d.id
LEFT JOIN t_order o ON r.orderId = o.id
<where>
<if test="ids != null and ids.size() > 0">
--
Gitblit v1.7.1