From 67593f1dc3c4cd78de6ad911e870a2a5b1d5411d Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 20 十二月 2024 11:30:51 +0800 Subject: [PATCH] 代码 --- manage/src/main/resources/mapping/TLensGoods.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/manage/src/main/resources/mapping/TLensGoods.xml b/manage/src/main/resources/mapping/TLensGoods.xml index bbdb16b..f34ad05 100644 --- a/manage/src/main/resources/mapping/TLensGoods.xml +++ b/manage/src/main/resources/mapping/TLensGoods.xml @@ -3,4 +3,40 @@ <mapper namespace="com.jilongda.manage.mapper.TLensGoodsMapper"> + <select id="lensReceiptList" resultType="com.jilongda.manage.vo.TLensGoodsVO"> + select t1.*,t2.name as series,t4.name as store, + t2.sale as sale,t2.cost as cost,t6.name as brand,t7.frameThreshold + 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 + 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> + order by t1.id + </select> </mapper> -- Gitblit v1.7.1