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

Commit 03a6701c authored by 胡佳晨's avatar 胡佳晨

nft详情vo 添加 第一个分批购的 开始/结束时间

parent 42ff5565
......@@ -113,6 +113,13 @@ public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 72, value = "下个分段购开始时间,如果为null则没有")
private LocalDateTime nextSaleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 73, value = "第一个分批购开始时间")
private LocalDateTime firstSaleStartTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DateUtil.DATE_FULL_STR)
@ApiModelProperty(position = 74, value = "第一个分批购结束时间")
private LocalDateTime firstSaleEndTime;
private static final GoblinNftGoodsSkuInfoVo obj = new GoblinNftGoodsSkuInfoVo();
public static GoblinNftGoodsSkuInfoVo getNew() {
......
......@@ -153,6 +153,8 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
String listId = (String) map.get("listId");
LocalDateTime baseSaleStartTime = (LocalDateTime) map.get("baseSaleStartTime");
LocalDateTime nextSaleStartTime = (LocalDateTime) map.get("nextSaleStartTime");
LocalDateTime firstSaleStartTime = (LocalDateTime) map.get("firstSaleStartTime");
LocalDateTime firstSaleEndTime = (LocalDateTime) map.get("firstSaleEndTime");
if (goblinRedisUtils.getSkuAllStatusShow(skuInfoVo)) {
//获取预约相关
AnticipateValueVo anticipateValueVo = goblinGoodsAnticipateMgService.getAnticipateValueBySkuId(skuId, 1);
......@@ -184,6 +186,8 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
nftGoodsSkuInfoVo.setListId(listId);
nftGoodsSkuInfoVo.setBaseSaleStartTime(baseSaleStartTime);
nftGoodsSkuInfoVo.setNextSaleStartTime(nextSaleStartTime);
nftGoodsSkuInfoVo.setFirstSaleEndTime(firstSaleEndTime);
nftGoodsSkuInfoVo.setFirstSaleStartTime(firstSaleStartTime);
// 是否开启兑换
nftGoodsSkuInfoVo.setIsExchange(goblinRedisUtils.getIsExchange(skuId));
// 待支付订单数量
......
......@@ -840,6 +840,7 @@ public class GoblinRedisUtils {
if (null == vo) {
return null;
}
GoblinListCollectVo firstCollectVo = getCollectByFirst(skuId);
HashMap<String, Object> map = CollectionUtil.mapStringObject();
LocalDateTime nextSaleStartTime = null;
if (null == vo.getSaleStartTime() || now.isAfter(vo.getSaleStartTime())) {//普通商品已开售
......@@ -884,6 +885,13 @@ public class GoblinRedisUtils {
map.put("baseSaleStartTime", baseSaleStartTime);
map.put("nextSaleStartTime", nextSaleStartTime);
}
if (firstCollectVo != null) {
map.put("firstSaleStartTime", firstCollectVo.getTimeStart());
map.put("firstSaleEndTime", firstCollectVo.getTimeEnd());
} else {
map.put("firstSaleStartTime", null);
map.put("firstSaleEndTime", null);
}
return map;
}
......@@ -999,6 +1007,22 @@ public class GoblinRedisUtils {
return collectNext;
}
public GoblinListCollectVo getCollectByFirst(String skuId) {
GoblinListCollectVo vo = null;
List<GoblinListCollectVo> collectVos = getGoblinListCollect(skuId);
for (int i = 0; i < collectVos.size(); i++) {
GoblinListCollectVo collectVoItem = collectVos.get(i);
if (vo == null) {
vo = collectVoItem;
}
if (collectVoItem.getTimeStart().isBefore(vo.getTimeStart())) {
vo = collectVoItem;
}
}
return vo;
}
/**
* 处理上个时间段的库存
*
......@@ -2657,7 +2681,7 @@ public class GoblinRedisUtils {
//保存用户预约
public void setReserveMixByUid(GoblinMixReserveVo goblinMixReserveVo) {
String rdk = GoblinRedisConst.GOBLIN_MIX_RESERVE_UID.concat(goblinMixReserveVo.getMixId()).concat(":").concat(goblinMixReserveVo.getUid());
redisUtil.set(rdk,goblinMixReserveVo);
redisUtil.set(rdk, goblinMixReserveVo);
}
//根据用户uid和混合mixId查询用户预约
......@@ -2685,6 +2709,7 @@ public class GoblinRedisUtils {
/**
* NFT转赠约束配置
* redis未配置默认返回180天对应15552000秒
*
* @return Map<String, Long>
*/
public Map<String, Long> getUserDigitalArtworkTransferConfMap() {
......
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