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

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

增加 分批购 支持盲盒配置

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