From 2f8e70ad2884d2b6b7443dfae0af11ae9cfc8b99 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 28 二月 2025 17:44:10 +0800 Subject: [PATCH] bug修改 --- manage/src/main/resources/mapping/TLensGoods.xml | 53 ++++++++++++++++++++++++++++------------------------- 1 files changed, 28 insertions(+), 25 deletions(-) diff --git a/manage/src/main/resources/mapping/TLensGoods.xml b/manage/src/main/resources/mapping/TLensGoods.xml index 58027f1..a980d42 100644 --- a/manage/src/main/resources/mapping/TLensGoods.xml +++ b/manage/src/main/resources/mapping/TLensGoods.xml @@ -4,28 +4,28 @@ <select id="lensReceiptList" resultType="com.jilongda.manage.vo.TLensGoodsVO"> - select t1.seriesId, - t1.createTime, - t1.updateTime, - t1.createBy, - t1.updateBy, - t1.isDelete, +select o.* from + + (select t1.seriesId, + t1.id, t1.storeId, - t1.ballMirror, - t1.columnMirror, t1.refractiveIndex, t1.`status`, - t1.lensType,t2.name as series,t4.name as storeName, - t2.sphere as sphere,t2.asphericSurface as asphericSurface,t2.type as type - ,t2.doubleNon as doubleNon - ,t6.name as brand,t7.frameThreshold, - sum(t1.total) as total + t1.lensType, + t2.name as series, + t4.name as storeName, + t2.sphere as sphere, + t2.asphericSurface as asphericSurface, + t2.type as type, + t2.doubleNon as doubleNon, + t6.name as brand,t7.frameThreshold, + sum(t1.total) as total from t_lens_goods t1 - left join t_lens_series t2 on t1.seriesId=t2.id - 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 + inner join t_lens_series t2 on t1.seriesId=t2.id + inner join t_store t4 on t1.storeId = t4.id + inner join t_brand t6 on t2.brandId=t6.id + inner join sec_setting t7 on 1=1 <where> <if test="query.brandId != null "> and t2.brandId = #{query.brandId} @@ -45,18 +45,21 @@ <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 + + and t1.isDelete = 0 </where> group by seriesId, refractiveIndex, lensType - order by t1.id + order by t1.id) o + where 1=1 + <if test="query.isWarning !=null and query.isWarning==1"> + and o.total <= t7.lensThreshold + </if> + <if test="query.isWarning !=null and query.isWarning ==2"> + and o.total >= t7.lensThreshold + </if> + </select> </mapper> -- Gitblit v1.7.1