From ff1be70b35a043a42ef7471c3ed9f10a9a736db0 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 09 一月 2025 14:33:04 +0800
Subject: [PATCH] bug修改
---
manage/src/main/resources/mapping/TOptometristMapper.xml | 41 +++++++++++++++++++++++++++++++++--------
1 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/manage/src/main/resources/mapping/TOptometristMapper.xml b/manage/src/main/resources/mapping/TOptometristMapper.xml
index 8855ca9..3005ab6 100644
--- a/manage/src/main/resources/mapping/TOptometristMapper.xml
+++ b/manage/src/main/resources/mapping/TOptometristMapper.xml
@@ -20,7 +20,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
- id, name, phone, status, storeId, img, registerTime, createTime, updateTime, createBy, updateBy, isDelete
+ id, `name`, phone, status, storeId, img, registerTime, createTime, updateTime, createBy, updateBy, isDelete
</sql>
<select id="pageList" resultType="com.jilongda.manage.vo.TOptometryVO">
select t1.id, t1.code, t1.userId, t1.age, t1.gender,
@@ -37,23 +37,48 @@
<if test="query.name != null and query.name != ''">
and t2.`name` like concat('%',#{query.name},'%')
</if>
+ <if test="query.userId != null and query.userId != ''">
+ and t2.id like concat('%',#{query.userId},'%')
+ </if>
<if test="query.realName != null and query.realName != ''">
- and t1.`name` like concat('%',#{query.realName},'%')
+ and t1.realName like concat('%',#{query.realName},'%')
</if>
<if test="query.phone != null and query.phone != ''">
and t1.phone like concat('%',#{query.phone},'%')
</if>
- <if test="query.storeId != null and query.storeId != ''">
+ <if test="query.storeId != null ">
and t1.storeId = #{query.storeId}
</if>
- <if test="query.optometristId != null and query.optometristId != ''">
+ <if test="query.optometristId != null ">
and t1.optometristId = #{query.optometristId}
</if>
- <if test="req.startTime != null and req.startTime!=''">
- and (t1.createTime between #{req.startTime} and #{req.endTime})
+ <if test="query.userId != null ">
+ and t1.userId = #{query.userId}
</if>
- AND t3.type=1
- AND isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
+ <if test="query.startTime != null and query.startTime!=''">
+ and (t1.createTime between #{query.startTime} and #{query.endTime})
+ </if>
+ AND t1.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
+ </where>
+ ORDER BY t1.createTime DESC
+ </select>
+ <select id="pageList1" resultType="com.jilongda.manage.vo.TOptometristVO">
+ select <include refid="Base_Column_List"></include>
+ from t_optometrist
+ <where>
+ <if test="query.name != null and query.name != ''">
+ and `name` like concat('%',#{query.name},'%')
+ </if>
+ <if test="query.phone != null and query.phone != ''">
+ and phone like concat('%',#{query.phone},'%')
+ </if>
+ <if test="query.status != null">
+ and status = #{query.status}
+ </if>
+ <if test="query.storeId != null">
+ and storeId = #{query.storeId}
+ </if>
+ and isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
</where>
ORDER BY createTime DESC
</select>
--
Gitblit v1.7.1