From bf765893039bc7968b8160a70bda778526dca98c Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 31 十二月 2024 15:28:19 +0800 Subject: [PATCH] 定时任务 --- manage/src/main/resources/mapping/TOptometristMapper.xml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 58 insertions(+), 1 deletions(-) diff --git a/manage/src/main/resources/mapping/TOptometristMapper.xml b/manage/src/main/resources/mapping/TOptometristMapper.xml index 3ffe98a..5ba7db0 100644 --- a/manage/src/main/resources/mapping/TOptometristMapper.xml +++ b/manage/src/main/resources/mapping/TOptometristMapper.xml @@ -20,7 +20,64 @@ <!-- 通用查询结果列 --> <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, + t1.realName, t1.phone, t1.optometristId, + t1.storeId, t1.status, t1.registerTime, + t1.createTime, t1.updateTime, t1.createBy, + t1.updateBy, t1.isDelete,t2.`name`, + t3.name as storeName,t4.name as optometristName + from t_optometry t1 + left join t_app_user t2 on t1.userId = t2.id + left join t_store t3 on t1.storeId = t3.id + left join t_optometrist t4 on t1.optometristId = t4.id + <where> + <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.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 != ''"> + and t1.storeId = #{query.storeId} + </if> + <if test="query.optometristId != null and query.optometristId != ''"> + and t1.optometristId = #{query.optometristId} + </if> + <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> </mapper> -- Gitblit v1.7.1