新增个播礼物类型
This commit is contained in:
@@ -519,6 +519,11 @@ public class Constant {
|
||||
* 涂鸦礼物
|
||||
*/
|
||||
public static final byte DRAW = 10;
|
||||
/**
|
||||
* 个播人气礼物
|
||||
**/
|
||||
public static final byte SINGLE_POPULAR = 11;
|
||||
|
||||
/* 线性福袋 */
|
||||
public static final byte LUCKY_BAG_LINEAR = 15;
|
||||
}
|
||||
|
@@ -118,7 +118,7 @@ public class GiftService extends BaseService {
|
||||
giftVo.setSeqNo(gift.getSeqNo());
|
||||
giftVo.setHasGifPic(gift.getHasGifPic());
|
||||
giftVo.setGifUrl(gift.getGifUrl());
|
||||
giftVo.setGiftType(Constant.GiftType.LUCKY_BAG_LINEAR != gift.getGiftType()?gift.getGiftType(): Constant.GiftType.LUCKY_BAG);
|
||||
giftVo.setGiftType(Constant.GiftType.LUCKY_BAG_LINEAR != gift.getGiftType() ? gift.getGiftType() : Constant.GiftType.LUCKY_BAG);
|
||||
|
||||
giftVo.setHasVggPic(gift.getHasVggPic());
|
||||
giftVo.setVggUrl(gift.getVggUrl());
|
||||
@@ -185,7 +185,7 @@ public class GiftService extends BaseService {
|
||||
String value = entry.getValue();
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
Gift gift = gson.fromJson(value, Gift.class);
|
||||
if (!Constant.status.valid.equals(gift.getGiftStatus())){
|
||||
if (!Constant.status.valid.equals(gift.getGiftStatus())) {
|
||||
continue;
|
||||
}
|
||||
if (consumeType != null) {
|
||||
@@ -221,7 +221,7 @@ public class GiftService extends BaseService {
|
||||
|
||||
public Gift getGiftById(Integer giftId) {
|
||||
String giftStr = jedisService.hget(RedisKey.gift.getKey(), giftId.toString());
|
||||
if (StringUtils.isNotBlank(giftStr)){
|
||||
if (StringUtils.isNotBlank(giftStr)) {
|
||||
return gson.fromJson(giftStr, Gift.class);
|
||||
}
|
||||
|
||||
@@ -462,7 +462,9 @@ public class GiftService extends BaseService {
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
List<GiftVo> drawGiftList = giftVoList.stream().filter(giftVo -> giftVo.getGiftType().equals(Constant.GiftType.DRAW)).collect(Collectors.toList());
|
||||
|
||||
// 个播人气礼物
|
||||
List<GiftVo> singlePopularGiftList = giftVoList.stream().filter(giftVo -> giftVo.getGiftType().equals(Constant.GiftType.SINGLE_POPULAR)).collect(Collectors.toList());
|
||||
giftData.put("singlePopularGift", singlePopularGiftList);
|
||||
// 周星榜礼物
|
||||
boolean isOldVersion = isWeekStarBroadVersion(appVersion);
|
||||
List<GiftVo> weekStarGiftList = getWeekStarGiftVoList(giftVoList);
|
||||
@@ -472,16 +474,13 @@ public class GiftService extends BaseService {
|
||||
normalGiftList.addAll(weekStarGiftList);
|
||||
Collections.sort(normalGiftList);
|
||||
}
|
||||
|
||||
giftData.put("normalGift", normalGiftList);
|
||||
giftData.put("luckyBagGift", luckyBagGiftList);
|
||||
giftData.put("vipGift", vipGiftList);
|
||||
|
||||
// 福袋奖池礼物
|
||||
List<GiftVo> luckyPoolGiftVoList = queryLuckyBagPoolList();
|
||||
giftData.put("luckyPoolGift", luckyPoolGiftVoList);
|
||||
giftData.put("drawGift", drawGiftList);
|
||||
|
||||
return giftData;
|
||||
}
|
||||
|
||||
@@ -553,6 +552,7 @@ public class GiftService extends BaseService {
|
||||
|
||||
/**
|
||||
* 为符合上线时间要求的gift修改数据库status并添加至缓存
|
||||
*
|
||||
* @return 具体执行的礼物个数
|
||||
*/
|
||||
public int onLineAllInTimeGift() {
|
||||
@@ -577,6 +577,7 @@ public class GiftService extends BaseService {
|
||||
|
||||
/**
|
||||
* 为符合下线时间要求的gift修改数据库status并删除缓存
|
||||
*
|
||||
* @return 具体执行的礼物个数
|
||||
*/
|
||||
public int offLineAllOutTimeGift() {
|
||||
|
Reference in New Issue
Block a user