From db628292cb9b69b901b44b146ac88c5f68e38389 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 08 十月 2026 14:52:54 +0800
Subject: [PATCH] 财务管理系统模块优化
---
src/main/resources/mapper/account/AccountMapper.xml | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/account/AccountMapper.xml b/src/main/resources/mapper/account/AccountMapper.xml
index f276627..ae5dd4c 100644
--- a/src/main/resources/mapper/account/AccountMapper.xml
+++ b/src/main/resources/mapper/account/AccountMapper.xml
@@ -2,13 +2,28 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ruoyi.account.mapper.AccountMapper">
<select id="accountListPage" resultType="com.ruoyi.account.pojo.Account">
- select * from account
+ select a.*, fa.account_name as accountName
+ from account a
+ left join finance_account fa on a.account_id = fa.id
where 1=1
<if test="c.counterparty !='' and c.counterparty!=null">
- and counterparty = #{c.counterparty}
+ and a.counterparty like concat('%', #{c.counterparty}, '%')
</if>
<if test="c.typeText !='' and c.typeText!=null">
- and type_text = #{c.typeText}
+ and a.type_text = #{c.typeText}
</if>
+ <if test="c.accountId != null">
+ and a.account_id = #{c.accountId}
+ </if>
+ <if test="c.flowType !='' and c.flowType!=null">
+ and a.flow_type = #{c.flowType}
+ </if>
+ <if test="c.entryDateStart != null and c.entryDateStart != ''">
+ and a.account_date >= DATE_FORMAT(#{c.entryDateStart},'%Y-%m-%d')
+ </if>
+ <if test="c.entryDateEnd != null and c.entryDateEnd != ''">
+ and a.account_date <= DATE_FORMAT(#{c.entryDateEnd},'%Y-%m-%d')
+ </if>
+ order by a.account_date desc, a.id desc
</select>
</mapper>
--
Gitblit v1.9.3