库存预警功能,预警为0不进行预警
This commit is contained in:
parent
a962939db8
commit
56d9dbee5b
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user