Commit 34c558bf by caiyt

Merge remote-tracking branch 'origin/v2' into v2

parents 6ad67b28 86c0b006
......@@ -66,7 +66,7 @@ public class Goods extends BaseEntity {
* 特惠标签
*/
@Excel(name = "特惠标签")
private BigDecimal recommendTag;
private String recommendTag;
/**
* 制作用时 单位 秒
......@@ -145,6 +145,9 @@ public class Goods extends BaseEntity {
@Excel(name = "商品编码")
private String code;
/** 是否特惠商品 */
private String isRecommend;
private List<String> goodsTagList;
public List<String> getGoodsTagList() {
......
......@@ -26,7 +26,11 @@ public class GoodsVo {
private String specString;
/** 特惠商品 */
private String isRecommend;
/** 特惠标签 */
private String recommendTag;
private String category;
}
......@@ -104,7 +104,7 @@ public class OrderTakingServiceImpl {
// }
// }
//推荐
List<String> recommendGoodsId = new ArrayList<>();
// List<String> recommendGoodsId = new ArrayList<>();
List<RecommendVo> recommendVos = new ArrayList<>();
List<GoodsVo> recommendGoods = shopRecommendMapper.selectShopGoodsByTyepe("1", shopId);
......@@ -125,7 +125,7 @@ public class OrderTakingServiceImpl {
goodsVo.setSpecString(null);
goodsVo.setPics(JSONObject.parseObject(goodsVo.getPictures()));
goodsVo.setPictures(null);
recommendGoodsId.add(goodsVo.getGoodsId());
// recommendGoodsId.add(goodsVo.getGoodsId());
GoodsTag goodsTag = new GoodsTag();
goodsTag.setState("1");
goodsTag.setGoodsId(Long.parseLong(goodsVo.getGoodsId()));
......@@ -174,11 +174,13 @@ public class OrderTakingServiceImpl {
goodsVo.setSpecs(buildGoodsSpec(good.getSpec()));
goodsVo.setCategory(good.getCategory());
goodsVo.setSpecString(null);
if(recommendGoodsId.contains(String.valueOf(good.getId()))){
goodsVo.setIsRecommend("1");
}else{
goodsVo.setIsRecommend("0");
}
goodsVo.setIsRecommend(good.getIsRecommend());
goodsVo.setRecommendTag(good.getRecommendTag());
// if(recommendGoodsId.contains(String.valueOf(good.getId()))){
// goodsVo.setIsRecommend("1");
// }else{
// goodsVo.setIsRecommend("0");
// }
GoodsTag goodsTag = new GoodsTag();
goodsTag.setState("1");
goodsTag.setGoodsId(Long.parseLong(goodsVo.getGoodsId()));
......
......@@ -40,9 +40,9 @@ public class SysBannerServiceImpl implements ISysBannerService {
if (StringUtils.isEmpty(banner.getImage())) {
throw new ServiceException("图片地址不能为空");
}
if (StringUtils.isEmpty(banner.getPage())) {
throw new ServiceException("链接地址不能为空");
}
// if (StringUtils.isEmpty(banner.getPage())) {
// throw new ServiceException("链接地址不能为空");
// }
if (banner.getType() == null || banner.getType() < 1 || banner.getType() > 3) {
throw new ServiceException("类型不正确,1-小程序,2-KDS,3-点单屏");
}
......@@ -71,9 +71,9 @@ public class SysBannerServiceImpl implements ISysBannerService {
if (StringUtils.isEmpty(banner.getImage())) {
throw new ServiceException("图片地址不能为空");
}
if (StringUtils.isEmpty(banner.getPage())) {
throw new ServiceException("链接地址不能为空");
}
// if (StringUtils.isEmpty(banner.getPage())) {
// throw new ServiceException("链接地址不能为空");
// }
if (banner.getType() == null || banner.getType() < 1 || banner.getType() > 3) {
throw new ServiceException("类型不正确,1-小程序,2-KDS,3-点单屏");
}
......
......@@ -92,10 +92,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
g.remarks,
g.shelf_at as shelfAt,
g.code,
'1' as state
from shop_goods sg, goods g where sg.goods_id = g.id and g.state ='3' and g.is_deleted = 0
and shop_id = #{shopId} and category like concat('%,', #{categoryId}, ',%')
order by sg.turn
'1' as state,
case when sr.id>0 then 1 else 0 end as isRecommend,
sr.recommend_tag
from goods g
LEFT JOIN shop_goods sg ON g.id = sg.goods_id
LEFT JOIN shop_recommend sr ON g.id = sr.goods_id and sr.`type` = 2
where g.state ='3' and g.is_deleted = 0 and sg.shop_id = #{shopId} and category like concat('%,', #{categoryId}, ',%')
order by sr.recommend_price DESC,sg.turn
</select>
<select id="selectShopNoAddGoods" resultType="com.soss.system.domain.Goods">
select id, name, category, price, discount, take_time, spec, pics, `desc`, remarks, state, is_deleted, created_at, updated_at, code,shelf_at from goods
......
......@@ -135,8 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and sr.`type` = #{type}
and sr.shop_id =#{shopId}
and sr.state ='1' and g.is_deleted ='0'
order by
sr.recommend_price desc,sr.turn
order by sr.turn
</select>
<select id="selectShopRecommendGoods" resultType="com.soss.system.domain.Goods">
select
......
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