年度庆典-RoundActivityRankVo-用byte代替round序列化

This commit is contained in:
khalil
2024-01-03 18:28:22 +08:00
parent 757aa9cc54
commit f2701db866
2 changed files with 6 additions and 8 deletions

View File

@@ -1,7 +1,5 @@
package com.accompany.business.common.vo;
import com.accompany.business.common.constant.RankRoundEnum;
import com.accompany.business.common.dto.RoundRankActConfigDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
@@ -18,19 +16,19 @@ import java.util.List;
public class RoundActivityRankVo extends ActivityRankVo {
@ApiModelProperty
private RankRoundEnum curRound;
private Byte curRound;
@ApiModelProperty("轮次")
private List<RoundConfig> roundList;
@Data
public static class RoundConfig {
private RankRoundEnum round;
private Byte round;
private Date startTime;
private Date endTime;
}
public RoundActivityRankVo(Date startTime, Date endTime, Byte rankType, List<ActivityRankItemVo> rankList, ActivityRankItemVo meRank,
RankRoundEnum curRound, List<RoundConfig> roundList) {
Byte curRound, List<RoundConfig> roundList) {
super(startTime, endTime, rankType, rankList, meRank);
this.curRound = curRound;
this.roundList = roundList;

View File

@@ -138,7 +138,7 @@ public abstract class BaseRoundRankActService<Provider extends RankObjectProvide
.sorted(Map.Entry.comparingByKey())
.map(entry->{
RoundActivityRankVo.RoundConfig roundConfigVo = new RoundActivityRankVo.RoundConfig();
roundConfigVo.setRound(entry.getKey());
roundConfigVo.setRound(entry.getKey().getRound());
RoundRankActConfigDto.RoundRankConfig roundConfig = entry.getValue();
Date roundStartTime = DateTimeUtil.localDateTime2Date(roundConfig.getStartTime());
@@ -148,9 +148,9 @@ public abstract class BaseRoundRankActService<Provider extends RankObjectProvide
return roundConfigVo;
}).collect(Collectors.toList());
return new RoundActivityRankVo(startTime, endTime, round.getRound(), rankItemVoList, meRankVo, curRound, roundConfigList);
return new RoundActivityRankVo(startTime, endTime, round.getRound(), rankItemVoList, meRankVo, curRound.getRound(), roundConfigList);
}
return new RoundActivityRankVo(startTime, endTime, round.getRound(), rankItemVoList, meRankVo, curRound, null);
return new RoundActivityRankVo(startTime, endTime, round.getRound(), rankItemVoList, meRankVo, curRound.getRound(), null);
}
public boolean updateRank(Long uid, RoundRankActConfigDto config, Integer giftId, Integer giftNum, Long totalGoldNum, Date sendGiftTime) {