资源位-小游戏-代理可见开关
This commit is contained in:
@@ -1451,6 +1451,8 @@ public class Constant {
|
||||
|
||||
public static final String CHARGE_TREASURE_ACT_CONFIG = "charge_treasure_act_config";
|
||||
|
||||
public static final String GAME_PLAY_DISPLAY_TO_RECHARGE_USER_CONFIG = "game_play_display_to_recharge_user_config";
|
||||
|
||||
}
|
||||
|
||||
public static class WithDrawStatus {
|
||||
|
@@ -15,17 +15,20 @@ import com.accompany.business.service.game.MiniGameForBaiShunService;
|
||||
import com.accompany.business.service.give.GiveUserService;
|
||||
import com.accompany.business.service.resource.ResourceService;
|
||||
import com.accompany.common.annotation.Authorization;
|
||||
import com.accompany.common.constant.Constant;
|
||||
import com.accompany.common.device.DeviceInfo;
|
||||
import com.accompany.common.result.BusiResult;
|
||||
import com.accompany.common.status.BusiStatus;
|
||||
import com.accompany.core.base.UidContextHolder;
|
||||
import com.accompany.core.exception.ServiceException;
|
||||
import com.accompany.core.service.SysConfService;
|
||||
import com.accompany.payment.service.RechargeUserService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
@@ -46,13 +49,10 @@ public class ResourceController {
|
||||
|
||||
@Autowired
|
||||
private ResourceService resourceService;
|
||||
|
||||
@Autowired
|
||||
private FirstChargeRewardService firstChargeRewardService;
|
||||
|
||||
@Autowired
|
||||
private MiniGameForBaiShunService miniGameForBaiShunService;
|
||||
|
||||
@Autowired
|
||||
private GameService gameService;
|
||||
@Autowired
|
||||
@@ -63,6 +63,8 @@ public class ResourceController {
|
||||
private JoyGameService joyGameService;
|
||||
@Autowired
|
||||
private JoyGameConfig joyGameConfig;
|
||||
@Autowired
|
||||
private SysConfService sysConfService;
|
||||
|
||||
/**
|
||||
* 房间内轮播icon列表
|
||||
@@ -103,8 +105,10 @@ public class ResourceController {
|
||||
}).collect(Collectors.toList());
|
||||
List<Long> giveUidList = giveUserService.getGiveUidList();
|
||||
boolean isRechargeUser = rechargeUserService.isRechargeUser(pubUid) || giveUidList.contains(pubUid);
|
||||
boolean rechargeUserSwitch = getGamePlayDisplayToRechargeUserSwitch();
|
||||
resources = resources.stream()
|
||||
.filter(x -> !(isRechargeUser && ResourceCodeEnum.LUCKY_BAG.name().equals(x.getCode())))
|
||||
.filter(x -> !rechargeUserSwitch && isRechargeUser && ResourceTypeEnum.GAMEPLAY.ordinal() == x.getType())
|
||||
.collect(Collectors.toList());
|
||||
return BusiResult.success(resources);
|
||||
}
|
||||
@@ -159,4 +163,12 @@ public class ResourceController {
|
||||
log.error("ResourceController.covertGameVo,Resource:{},e:{}", JSONObject.toJSONString(v), e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean getGamePlayDisplayToRechargeUserSwitch(){
|
||||
String configStr = sysConfService.getSysConfValueById(Constant.SysConfId.GAME_PLAY_DISPLAY_TO_RECHARGE_USER_CONFIG);
|
||||
if (!StringUtils.hasText(configStr)){
|
||||
return true;
|
||||
}
|
||||
return Boolean.parseBoolean(configStr);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user