Commit 3f8740d0 by weijiguang

下单时校验订单中sku数量

parent 541843a9
...@@ -299,6 +299,13 @@ public class ShopServiceImpl implements IShopService { ...@@ -299,6 +299,13 @@ public class ShopServiceImpl implements IShopService {
goods.setPreferential("0"); goods.setPreferential("0");
} }
goods.setSalesVolume(orderMapper.selectSalesVolume(shopId, goods.getId())); goods.setSalesVolume(orderMapper.selectSalesVolume(shopId, goods.getId()));
GoodsTag goodsTag = new GoodsTag();
goodsTag.setState("1");
goodsTag.setGoodsId(goods.getId());
List<GoodsTag> goodsTags = goodsTagMapper.selectGoodsTagList(goodsTag);
List<String> tags = goodsTags.stream().map(GoodsTag::getTag).collect(Collectors.toList());
goods.setGoodsTagList(tags);
} }
category.setGoodsList(goodsList); category.setGoodsList(goodsList);
} }
......
...@@ -94,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -94,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
g.code, g.code,
'1' as state, '1' as state,
case when sr.id>0 then 1 else 0 end as isRecommend, case when sr.id>0 then 1 else 0 end as isRecommend,
sr.recommend_price,
sr.recommend_tag sr.recommend_tag
from goods g from goods g
LEFT JOIN shop_goods sg ON g.id = sg.goods_id LEFT JOIN shop_goods sg ON g.id = sg.goods_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment