Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop
This commit is contained in:
@@ -23,7 +23,7 @@ public enum PromotionTypeEnum {
|
||||
/**
|
||||
* 有促销库存的活动类型
|
||||
*/
|
||||
static final PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{PINTUAN, SECKILL, KANJIA, POINTS_GOODS};
|
||||
public static final PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{PINTUAN, SECKILL, KANJIA, POINTS_GOODS};
|
||||
|
||||
private final String description;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ public class GoodsSearchParams extends PageVO {
|
||||
queryWrapper.le("quantity", leQuantity);
|
||||
}
|
||||
if (geQuantity != null) {
|
||||
queryWrapper.ge("quantity", geQuantity);
|
||||
queryWrapper.gt("quantity", geQuantity);
|
||||
}
|
||||
if (recommend != null) {
|
||||
queryWrapper.le("recommend", recommend);
|
||||
@@ -145,6 +145,7 @@ public class GoodsSearchParams extends PageVO {
|
||||
}
|
||||
if(alertQuantity != null && alertQuantity){
|
||||
queryWrapper.apply("quantity <= alert_quantity");
|
||||
queryWrapper.ge("alert_quantity", 0);
|
||||
}
|
||||
queryWrapper.in(CollUtil.isNotEmpty(ids), "id", ids);
|
||||
|
||||
|
||||
@@ -328,7 +328,11 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i
|
||||
}
|
||||
|
||||
}
|
||||
goodsSkuDetail.getGoodsGalleryList().addAll(goodsVO.getGoodsGalleryList());
|
||||
if (goodsSkuDetail.getGoodsGalleryList() == null || goodsSkuDetail.getGoodsGalleryList().isEmpty()) {
|
||||
goodsSkuDetail.setGoodsGalleryList(goodsVO.getGoodsGalleryList());
|
||||
} else {
|
||||
goodsSkuDetail.getGoodsGalleryList().addAll(goodsVO.getGoodsGalleryList());
|
||||
}
|
||||
map.put("data", goodsSkuDetail);
|
||||
|
||||
//获取分类
|
||||
|
||||
@@ -399,6 +399,8 @@ public class SeckillApplyServiceImpl extends ServiceImpl<SeckillApplyMapper, Sec
|
||||
Object quantity = cache.get(promotionGoodsStockCacheKey);
|
||||
if (quantity != null) {
|
||||
goodsVO.setQuantity((Integer) quantity);
|
||||
} else {
|
||||
cache.put(promotionGoodsStockCacheKey, seckillApply.getQuantity());
|
||||
}
|
||||
seckillGoodsVoS.add(goodsVO);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,10 @@ public interface GoodsStatisticsService extends IService<Goods> {
|
||||
*/
|
||||
long todayUpperNum();
|
||||
|
||||
/**
|
||||
* 预警库存数
|
||||
* @return
|
||||
*/
|
||||
long alertQuantityNum();
|
||||
|
||||
}
|
||||
@@ -68,6 +68,7 @@ public class GoodsStatisticsServiceImpl extends ServiceImpl<GoodsStatisticsMappe
|
||||
"store_id", currentUser.getStoreId());
|
||||
queryWrapper.eq("market_enable",GoodsStatusEnum.UPPER.name());
|
||||
queryWrapper.apply("quantity < alert_quantity");
|
||||
queryWrapper.gt("alert_quantity",0);
|
||||
return goodsSkuService.count(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user