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

Commit f538909b authored by 胡佳晨's avatar 胡佳晨

增加 分批购 支持盲盒配置

增加 分批购 盲盒回滚逻辑
增加 nft商品详情 下个分段购开始时间
parent 0d4bd919
...@@ -105,6 +105,9 @@ public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -105,6 +105,9 @@ public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 69, value = "sku正常开售时间") @ApiModelProperty(position = 69, value = "sku正常开售时间")
private LocalDateTime baseSaleStartTime; private LocalDateTime baseSaleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 70, value = "下个分段购开始时间,如果为null则没有")
private LocalDateTime nextSaleStartTime;
private static final GoblinNftGoodsSkuInfoVo obj = new GoblinNftGoodsSkuInfoVo(); private static final GoblinNftGoodsSkuInfoVo obj = new GoblinNftGoodsSkuInfoVo();
......
...@@ -148,6 +148,7 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService { ...@@ -148,6 +148,7 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
Integer tagType = (Integer) map.get("tagType"); Integer tagType = (Integer) map.get("tagType");
String listId = (String) map.get("listId"); String listId = (String) map.get("listId");
LocalDateTime baseSaleStartTime = (LocalDateTime) map.get("baseSaleStartTime"); LocalDateTime baseSaleStartTime = (LocalDateTime) map.get("baseSaleStartTime");
LocalDateTime nextSaleStartTime = (LocalDateTime) map.get("nextSaleStartTime");
if (goblinRedisUtils.getSkuAllStatusShow(skuInfoVo)) { if (goblinRedisUtils.getSkuAllStatusShow(skuInfoVo)) {
//获取预约相关 //获取预约相关
AnticipateValueVo anticipateValueVo = goblinGoodsAnticipateMgService.getAnticipateValueBySkuId(skuId, 1); AnticipateValueVo anticipateValueVo = goblinGoodsAnticipateMgService.getAnticipateValueBySkuId(skuId, 1);
...@@ -178,6 +179,8 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService { ...@@ -178,6 +179,8 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
nftGoodsSkuInfoVo.setTagType(tagType); nftGoodsSkuInfoVo.setTagType(tagType);
nftGoodsSkuInfoVo.setListId(listId); nftGoodsSkuInfoVo.setListId(listId);
nftGoodsSkuInfoVo.setBaseSaleStartTime(baseSaleStartTime); nftGoodsSkuInfoVo.setBaseSaleStartTime(baseSaleStartTime);
nftGoodsSkuInfoVo.setNextSaleStartTime(nextSaleStartTime);
// 是否开启兑换 // 是否开启兑换
nftGoodsSkuInfoVo.setIsExchange(goblinRedisUtils.getIsExchange(skuId)); nftGoodsSkuInfoVo.setIsExchange(goblinRedisUtils.getIsExchange(skuId));
return nftGoodsSkuInfoVo; return nftGoodsSkuInfoVo;
......
...@@ -810,12 +810,14 @@ public class GoblinRedisUtils { ...@@ -810,12 +810,14 @@ public class GoblinRedisUtils {
public HashMap<String, Object> getGoodsSkuInfoVo(LocalDateTime now, String skuId) { public HashMap<String, Object> getGoodsSkuInfoVo(LocalDateTime now, String skuId) {
GoblinGoodsSkuInfoVo vo = getGoodsSkuInfoVo(skuId); GoblinGoodsSkuInfoVo vo = getGoodsSkuInfoVo(skuId);
HashMap<String, Object> map = CollectionUtil.mapStringObject(); HashMap<String, Object> map = CollectionUtil.mapStringObject();
LocalDateTime nextSaleStartTime = null;
if (null == vo.getSaleStartTime() || now.isAfter(vo.getSaleStartTime())) {//普通商品已开售 if (null == vo.getSaleStartTime() || now.isAfter(vo.getSaleStartTime())) {//普通商品已开售
map.put("vo", vo); map.put("vo", vo);
map.put("tagType", null); map.put("tagType", null);
map.put("listId", null); map.put("listId", null);
map.put("whiteType", null); map.put("whiteType", null);
map.put("baseSaleStartTime", vo.getSaleStartTime()); map.put("baseSaleStartTime", vo.getSaleStartTime());
map.put("nextSaleStartTime", null);
} else {//未开售 } else {//未开售
GoblinListCollectVo collectVo = getCollectByNow(now, skuId); GoblinListCollectVo collectVo = getCollectByNow(now, skuId);
Integer tagType = null; Integer tagType = null;
...@@ -830,19 +832,26 @@ public class GoblinRedisUtils { ...@@ -830,19 +832,26 @@ public class GoblinRedisUtils {
vo.setSaleStopTime(collectVo.getTimeEnd()); vo.setSaleStopTime(collectVo.getTimeEnd());
listId = collectVo.getListId(); listId = collectVo.getListId();
whiteType = collectVo.getWhiteType(); whiteType = collectVo.getWhiteType();
tagType = collectVo.getTagType();
} }
GoblinListCollectVo collectNext = getCollectByNowNext(now, skuId); GoblinListCollectVo collectNext = getCollectByNowNext(now, skuId);
if (collectNext != null) { if (collectNext != null) {
if (tagType == null) {
tagType = collectNext.getTagType(); tagType = collectNext.getTagType();
}
//todo 逻辑修改 开售时间 //todo 逻辑修改 开售时间
if (collectVo == null) {
vo.setSaleStartTime(collectNext.getTimeStart()); vo.setSaleStartTime(collectNext.getTimeStart());
vo.setSaleStopTime(collectNext.getTimeEnd()); vo.setSaleStopTime(collectNext.getTimeEnd());
} }
nextSaleStartTime = vo.getSaleStartTime();
}
map.put("vo", vo); map.put("vo", vo);
map.put("tagType", tagType); map.put("tagType", tagType);
map.put("listId", listId); map.put("listId", listId);
map.put("whiteType", whiteType); map.put("whiteType", whiteType);
map.put("baseSaleStartTime", baseSaleStartTime); map.put("baseSaleStartTime", baseSaleStartTime);
map.put("nextSaleStartTime", nextSaleStartTime);
} }
return map; return map;
} }
...@@ -949,9 +958,10 @@ public class GoblinRedisUtils { ...@@ -949,9 +958,10 @@ public class GoblinRedisUtils {
collectTemp = null; collectTemp = null;
} }
} }
if (collectVo == null && collectTemp != null) { // if (collectVo == null && collectTemp != null) {
collectVo = collectTemp; // collectVo = collectTemp;
} else if (collectVo == null) { // } else
if (collectVo == null) {
collectVo = collectNext; collectVo = collectNext;
} }
return collectVo; return collectVo;
......
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