From 74f10367c4bb507d086cbdc7fd11528582addfb9 Mon Sep 17 00:00:00 2001 From: jyy <935090232@qq.com> Date: Mon, 11 Jan 2021 13:23:48 +0800 Subject: [PATCH] 修改跟进bug --- zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml index 53c7a77..849f191 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml @@ -1236,14 +1236,15 @@ seal_pice price, is_present isPresent, unit unit, - measure measure - from shopping_goods - where 1=1 + measure measure, + a.good_type goodsType + from shopping_goods a + where 1=1 and staus = '上架' <if test="record.queryKey != null and record.queryKey != ''"> and (instr(name,#{record.queryKey}) or instr(code ,#{record.queryKey}) or instr(zjm ,#{record.queryKey})) </if> <if test="record.cateId!=null"> - and cate_id=#{record.cateId} + and a.cate_id in ( select b.id from shopping_goods_category b where (b.id=#{record.cateId} or b.parent_id=#{record.cateId})) </if> <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> <if test="pageVo.sort !=null and pageVo.order !=null"> @@ -1257,13 +1258,13 @@ <select id="selectShopppingGoodsAipTotal" resultType="java.lang.Integer"> select count(1) - from shopping_goods - where 1=1 + from shopping_goods a + where 1=1 and staus = '上架' <if test="record.queryKey != null and record.queryKey != ''"> and (instr(name,#{record.queryKey}) or instr(code ,#{record.queryKey}) or instr(zjm ,#{record.queryKey})) </if> <if test="record.cateId!=null"> - and cate_id=#{record.cateId} + and a.cate_id in ( select b.id from shopping_goods_category b where (b.id=#{record.cateId} or b.parent_id=#{record.cateId})) </if> </select> </mapper> -- Gitblit v1.9.1