记得上下班打卡 | git大法好,push需谨慎

Commit 9b0a5610 authored by jiangxiulong's avatar jiangxiulong

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

parents dac9cfb1 2154d769
......@@ -1661,7 +1661,7 @@ public class GoblinMongoUtils {
} else if (filterParam.getType().equals(1)) {
restStock += redisUtils.getSkuAllStatusStockType1(itemVo);
}
stock +=redisUtils.getSkuTotalStock(itemVo);
stock +=redisUtils.getSkuTotalStockShelvesStatus3(itemVo);
}
mgtGoodsSkuListVo.setSurplusStock(restStock);
mgtGoodsSkuListVo.setSkuStock(stock);
......
......@@ -2123,6 +2123,21 @@ public class GoblinRedisUtils {
}
}
// 各种状态下判断藏品总库存
public Integer getSkuTotalStockShelvesStatus3(GoblinGoodsSkuInfoVo info) {
if (
info != null
&& (null == info.getShelvesStatus() || info.getShelvesStatus().equals("3"))
// && LocalDateTime.now().isAfter(info.getSaleStartTime())
// && (null == info.getSoldoutStatus() || info.getSoldoutStatus().equals("0"))
// && (null == info.getHitRatio() || info.getHitRatio().compareTo(BigDecimal.ZERO) > 0)
) {// 可以返回库存
return info.getSkuStock();
} else {// 不计入库存
return 0;
}
}
// 获取盲盒下藏品的库存 各种状态下不能算库存的排除掉
public int getSkuAllStatusStockType1(GoblinGoodsSkuInfoVo info) {
if (
......
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