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

Commit b1ea0af6 authored by wanglele's avatar wanglele

修改盲盒生成兑换码逻辑

parent 8d91b01f
......@@ -4,6 +4,7 @@
<resultMap id="BaseResult" type="com.liquidnet.service.goblin.entity.GoblinGoodsSku">
<result column="spu_id" property="spuId" jdbcType="VARCHAR"/>
<result column="sku_id" property="skuId" jdbcType="VARCHAR"/>
<result column="sku_pic" property="skuPic" jdbcType="VARCHAR"/>
<result column="name" property="name" jdbcType="VARCHAR"/>
<result column="unbox" property="unbox" jdbcType="VARCHAR"/>
<result column="hit_ratio" property="hitRatio" jdbcType="DECIMAL"/>
......
......@@ -122,6 +122,11 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
} else if (null != saleStopTime && nowTime.isAfter(saleStopTime)) {
continue;
}
//是否购买
if (!goblinGoodsSku.getSkuCanbuy().equals("1")){
continue;
}
// 不能购买的 没库存的 概率是0的 过滤
if (getSkuAllStatusShow(goblinGoodsSku) && goblinRedisUtils.getSkuAllStatusStock(goblinGoodsSku) > 0 && goblinGoodsSku.getHitRatio() != null) {
countStockNumber += goblinRedisUtils.getSkuStock(goblinGoodsSku.getSkuId());
......@@ -143,6 +148,8 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
List<GoblinNftExCodeTask> goblinNftExCodeTasks = ObjectUtil.getGoblinNftExCodeTaskArrayList();
// 构建对象
for (GoblinNftExSkuParam goblinNftExSkuParam : goblinNftExSkuParams) {
......@@ -284,7 +291,7 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
Map<String, Object> objectMap1 = new HashMap<>();
objectMap1.put("hitRatio", 30);
objectMap1.put("stock", 4);
mapMap.put("2", objectMap1);
// mapMap.put("2", objectMap1);
Map<String, Object> objectMap2 = new HashMap<>();
objectMap2.put("hitRatio", 30);
......@@ -298,7 +305,7 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
Map<String, Integer> stockMap = new HashMap<>();
ArrayList<String> eliminateSkuIdList = CollectionUtil.arrayListString();
getStock(7, new BigDecimal(50), mapMap, stockMap, 1032, eliminateSkuIdList);
getStock(7, new BigDecimal(20), mapMap, stockMap, 1032, eliminateSkuIdList);
for (String key : stockMap.keySet()) {
System.out.println("skuId" + key + "***********数量" + stockMap.get(key));
}
......@@ -404,7 +411,7 @@ public class GoblinNftExSkuServiceImpl implements IGoblinNftExSkuService {
&& info.getShelvesStatus().equals("3")
// && (info.getSkuAppear() == null || info.getSkuAppear().equals("0"))
&& info.getDelFlg().equals("0")
&& info.getSkuCanbuy().equals("1")) {
) {
return true;
} else {
return false;
......
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