From 427ff7fa7b91c6efceef529877904e91dfe91c46 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 24 十二月 2024 09:38:01 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/eyes --- manage/src/main/resources/mapping/TLensGoods.xml | 53 +++++++++++++++++++++++++++-------------------------- 1 files changed, 27 insertions(+), 26 deletions(-) diff --git a/manage/src/main/resources/mapping/TLensGoods.xml b/manage/src/main/resources/mapping/TLensGoods.xml index 5237fd1..ced7528 100644 --- a/manage/src/main/resources/mapping/TLensGoods.xml +++ b/manage/src/main/resources/mapping/TLensGoods.xml @@ -14,33 +14,34 @@ left join t_store t4 on t1.storeId = t4.id left join t_brand t6 on t2.brandId=t6.id left join sec_setting t7 on 1=1 - where 1=1 - <if test="query.brandId != null "> - and t2.brandId = #{query.brandId} - </if> - <if test="query.seriesId != null "> - and t2.id = #{query.seriesId} - </if> - <if test="query.lensType != null "> - and t1.lensType = #{query.lensType} - </if> - <if test="query.storeId != null "> - and t1.storeId = #{query.storeId} - </if> - <if test="query.refractiveIndex != null and query.refractiveIndex != ''"> - and t1.refractiveIndex = #{query.refractiveIndex} - </if> - <if test="query.type != null "> - and t2.type = #{query.type} - </if> - <if test="query.isWarning != null and query.isWarning = 1"> - and t1.total < t7.lensThreshold - </if> - <if test="query.isWarning != null and query.isWarning = 2"> - and t1.total >= t7.lensThreshold - </if> - and t1.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} + <where> + <if test="query.brandId != null "> + and t2.brandId = #{query.brandId} + </if> + <if test="query.seriesId != null "> + and t2.id = #{query.seriesId} + </if> + <if test="query.lensType != null "> + and t1.lensType = #{query.lensType} + </if> + <if test="query.storeId != null "> + and t1.storeId = #{query.storeId} + </if> + <if test="query.refractiveIndex != null and query.refractiveIndex != ''"> + and t1.refractiveIndex = #{query.refractiveIndex} + </if> + <if test="query.type != null "> + and t2.type = #{query.type} + </if> + <if test="query.isWarning !=null and query.isWarning==1"> + and t1.total <= t7.lensThreshold + </if> + <if test="query.isWarning !=null and query.isWarning ==2"> + and t1.total >= t7.lensThreshold + </if> + and t1.isDelete = 0 + </where> order by t1.id </select> </mapper> -- Gitblit v1.7.1