From dc22724f61e0b792d327fa812895f6dc4fcf129d Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 08 四月 2026 15:04:11 +0800
Subject: [PATCH] fix:groupBy
---
src/main/resources/mapper/account/AccountIncomeMapper.xml | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/account/AccountIncomeMapper.xml b/src/main/resources/mapper/account/AccountIncomeMapper.xml
index e4f3361..3bb4da1 100644
--- a/src/main/resources/mapper/account/AccountIncomeMapper.xml
+++ b/src/main/resources/mapper/account/AccountIncomeMapper.xml
@@ -45,16 +45,15 @@
sdd.dict_label typeName,
ifnull(sum(income_money),0) account
FROM account_income ai
- left join sys_dict_data sdd on ai.income_type = sdd.dict_value and sdd.dict_type='income_types'
- where
- 1=1
+ LEFT JOIN sys_dict_data sdd ON ai.income_type = sdd.dict_value AND sdd.dict_type = 'income_types'
+ WHERE 1=1
<if test="dateQueryDto.entryDateStart != null and dateQueryDto.entryDateStart != '' ">
AND income_date >= DATE_FORMAT(#{dateQueryDto.entryDateStart},'%Y-%m-%d')
</if>
<if test="dateQueryDto.entryDateEnd != null and dateQueryDto.entryDateEnd != '' ">
AND income_date <= DATE_FORMAT(#{dateQueryDto.entryDateEnd},'%Y-%m-%d')
</if>
- group by income_type
+ GROUP BY sdd.dict_label, ai.income_type
</select>
<select id="report1" resultType="java.math.BigDecimal">
SELECT
--
Gitblit v1.9.3