周星榜-屏蔽魅力榜

This commit is contained in:
khalil
2024-08-29 16:43:11 +08:00
parent 76b546132b
commit 28dd84bca4
4 changed files with 14 additions and 16 deletions

View File

@@ -50,8 +50,6 @@ public class WeekStarService extends BaseService {
@Autowired
private JedisService jedisService;
@Autowired
private GiftService giftService;
@Autowired
private UsersService usersService;
@Autowired
private WeekStarConfigService weekStarConfigService;
@@ -70,7 +68,7 @@ public class WeekStarService extends BaseService {
* @param uid
* @return
*/
public WeekStarParentVo getWeekStarList(Long uid, Byte rankType){
public WeekStarParentVo getWeekStarList(Long uid){
Users u = usersService.getNotNullUsersByUid(uid);
PartitionInfo partitionInfo = partitionInfoService.getById(u.getPartitionId());
String zoneId = null != partitionInfo? partitionInfo.getZoneId(): ZoneId.systemDefault().getId();
@@ -84,9 +82,9 @@ public class WeekStarService extends BaseService {
WeekStarParentVo weekStarParentVo = new WeekStarParentVo();
//获取上周的礼物排行
weekStarParentVo.setLastWeekStar(getWeekStarVo(lastConfig,false, u.getPartitionId(), rankType, u, zoneId));
weekStarParentVo.setLastWeekStar(getWeekStarVo(lastConfig,false, u.getPartitionId(), WeekStarRankTypeEnum.LEVEL.getValue(), u, zoneId));
//获取本周的礼物排行
weekStarParentVo.setWeekStarRank(getWeekStarVo(currentConfig,true, u.getPartitionId(), rankType, u, zoneId));
weekStarParentVo.setWeekStarRank(getWeekStarVo(currentConfig,true, u.getPartitionId(), WeekStarRankTypeEnum.LEVEL.getValue(), u, zoneId));
//获取奖励(礼物图片包含动态图片,暂时写死)
//weekStarParentVo.setAward(getWeekStarAwardVo(currentConfig,rankType));
//本场次结束时间戳
@@ -130,7 +128,7 @@ public class WeekStarService extends BaseService {
String lastWeekStr = now.with(DayOfWeek.MONDAY).minusWeeks(1L).format(DateTimeFormatter.ofPattern(DateTimeUtil.DEFAULT_DATE_PATTERN_));
WeekStarConfig config = weekStarConfigService.getWeekStarConfig(lastWeekStr);
//赠送魅力榜礼物
sendWeekStarAwardByRankType(config,WeekStarRankTypeEnum.CHARM.getValue(),partitionId, partitionInfo.getZoneId());
//sendWeekStarAwardByRankType(config,WeekStarRankTypeEnum.CHARM.getValue(),partitionId, partitionInfo.getZoneId());
//发送豪气榜礼物
sendWeekStarAwardByRankType(config,WeekStarRankTypeEnum.LEVEL.getValue(),partitionId, partitionInfo.getZoneId());
}
@@ -374,12 +372,12 @@ public class WeekStarService extends BaseService {
}
WeekStarVo charmWeekStarVo = getWeekStarVo(lastConfig, false, partitionId, WeekStarRankTypeEnum.CHARM.getValue(), null, zoneId);
//WeekStarVo charmWeekStarVo = getWeekStarVo(lastConfig, false, partitionId, WeekStarRankTypeEnum.CHARM.getValue(), null, zoneId);
WeekStarVo levelWeekStarVo = getWeekStarVo(lastConfig, false, partitionId, WeekStarRankTypeEnum.LEVEL.getValue(), null, zoneId);
if (null != charmWeekStarVo && !CollectionUtils.isEmpty(charmWeekStarVo.getWeekStarRankList())) {
vo.setFirstCharmRankUser(charmWeekStarVo.getWeekStarRankList().get(0));
}
//if (null != charmWeekStarVo && !CollectionUtils.isEmpty(charmWeekStarVo.getWeekStarRankList())) {
// vo.setFirstCharmRankUser(charmWeekStarVo.getWeekStarRankList().get(0));
//}
if (null != levelWeekStarVo && !CollectionUtils.isEmpty(levelWeekStarVo.getWeekStarRankList())) {
vo.setFirstLevelRankUser(levelWeekStarVo.getWeekStarRankList().get(0));
}

View File

@@ -191,7 +191,7 @@ public class GiftTabService implements InitializingBean {
BeanUtils.copyProperties(giftVo, vo);
if (relationVo != null) {
vo.setFirstCharmRankUser(relationVo.getFirstCharmRankUser());
//vo.setFirstCharmRankUser(relationVo.getFirstCharmRankUser());
vo.setFirstLevelRankUser(relationVo.getFirstLevelRankUser());
}

View File

@@ -35,19 +35,19 @@ public class WeekStarController extends BaseController{
@ApiOperation(value = "获取周星榜榜单")
@Authorization
@GetMapping(value = "/getWeekStarList")
public BusiResult<WeekStarParentVo> getWeekStarList(@RequestParam(value = "rankType") Byte rankType){
public BusiResult<WeekStarParentVo> getWeekStarList(){
Long uid = UidContextHolder.get();
WeekStarParentVo vo = weekStarService.getWeekStarList(uid, rankType);
WeekStarParentVo vo = weekStarService.getWeekStarList(uid);
return BusiResult.success(vo);
}
@ApiOperation(value = "获取周星榜奖励列表")
/*@ApiOperation(value = "获取周星榜奖励列表")
@Authorization
@GetMapping(value = "/getWeekStarAward")
public BusiResult<List<WeekStarAwardList>> getWeekStarAward(){
Long uid = UidContextHolder.get();
List<WeekStarAwardList> voList = weekStarService.getWeekStarAward(uid);
return BusiResult.success(voList);
}
}*/
}

View File

@@ -30,7 +30,7 @@ public class WeekStarAwardTask extends BaseTask {
@Scheduled(cron = "0 1 0 ? * MON")
public void sendWeekStarAward(){
log.info("send WeekStar Award begin");
List<Integer> partitionIdList = List.of(PartitionEnum.ENGLISH.getId(), PartitionEnum.CHINESS.getId());
List<Integer> partitionIdList = List.of(PartitionEnum.CHINESS.getId());
weekStarService.sendWeekStarAward(partitionIdList);
log.info("send WeekStar Award end");
}