|  | @@ -1,11 +1,14 @@
 | 
	
		
			
				|  |  |  package com.zanxiang.game.module.manage.controller;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import com.zanxiang.erp.security.annotation.PreAuthorize;
 | 
	
		
			
				|  |  | -import com.zanxiang.game.module.base.domain.ResultVO;
 | 
	
		
			
				|  |  | -import com.zanxiang.game.module.base.enums.*;
 | 
	
		
			
				|  |  | -import com.zanxiang.game.module.base.utils.BeanUtils;
 | 
	
		
			
				|  |  | +import com.zanxiang.game.module.base.pojo.enums.OsEnum;
 | 
	
		
			
				|  |  | +import com.zanxiang.game.module.base.pojo.enums.PayApplicationTypeEnum;
 | 
	
		
			
				|  |  | +import com.zanxiang.game.module.manage.enums.GameStrategyTypeEnum;
 | 
	
		
			
				|  |  | +import com.zanxiang.game.module.manage.enums.VipLevelEnum;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.manage.pojo.vo.*;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.manage.service.*;
 | 
	
		
			
				|  |  | +import com.zanxiang.module.util.bean.BeanUtil;
 | 
	
		
			
				|  |  | +import com.zanxiang.module.util.pojo.ResultVO;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiResponse;
 | 
	
	
		
			
				|  | @@ -18,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.util.Arrays;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  | +import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * @author : lingfeng
 | 
	
	
		
			
				|  | @@ -39,12 +43,6 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private IGameCategoryService gameCategoryService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private IPromoChannelService promoChannelService;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private IPromoAccountService promoAccountService;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private IPayWayService payWayService;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -54,12 +52,6 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private IGameTagService gameTagService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private IPromoMediaService promoMediaService;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private IPromoSiteService promoSiteService;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private IPayApplicationService payApplicationService;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -69,12 +61,17 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private IPayBoxService payBoxService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private IAgentService agentService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      @ApiOperation(value = "vip等级选择列表")
 | 
	
		
			
				|  |  |      @GetMapping(value = "/vip/level/list")
 | 
	
		
			
				|  |  |      @PreAuthorize(permissionKey = "sdk:choiceVipLevel:list")
 | 
	
		
			
				|  |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = VipLevelChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  |      public ResultVO<List<VipLevelChoiceVO>> vipLevelChoiceList() {
 | 
	
		
			
				|  |  | -        return ResultVO.ok(BeanUtils.copyList(Arrays.asList(VipLevelEnum.values()), VipLevelChoiceVO.class));
 | 
	
		
			
				|  |  | +        return ResultVO.ok(Arrays.stream(VipLevelEnum.values())
 | 
	
		
			
				|  |  | +                .map(vipLevelEnum -> BeanUtil.copy(vipLevelEnum, VipLevelChoiceVO.class))
 | 
	
		
			
				|  |  | +                .collect(Collectors.toList()));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "操作系统选择列表")
 | 
	
	
		
			
				|  | @@ -82,7 +79,9 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @PreAuthorize(permissionKey = "sdk:choiceOsType:list")
 | 
	
		
			
				|  |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = SystemChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  |      public ResultVO<List<SystemChoiceVO>> systemChoiceList() {
 | 
	
		
			
				|  |  | -        return ResultVO.ok(BeanUtils.copyList(Arrays.asList(OsEnum.values()), SystemChoiceVO.class));
 | 
	
		
			
				|  |  | +        return ResultVO.ok(Arrays.stream(OsEnum.values())
 | 
	
		
			
				|  |  | +                .map(osEnum -> BeanUtil.copy(osEnum, SystemChoiceVO.class))
 | 
	
		
			
				|  |  | +                .collect(Collectors.toList()));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "cp选择列表")
 | 
	
	
		
			
				|  | @@ -90,7 +89,7 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @PreAuthorize(permissionKey = "sdk:choiceCp:list")
 | 
	
		
			
				|  |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = CpChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  |      public ResultVO<List<CpChoiceVO>> cpChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(cpService.choiceList());
 | 
	
		
			
				|  |  | +        return ResultVO.ok(cpService.choiceList());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "游戏选择列表")
 | 
	
	
		
			
				|  | @@ -98,7 +97,7 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @PreAuthorize(permissionKey = "sdk:gameChoice:list")
 | 
	
		
			
				|  |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  |      public ResultVO<List<GameChoiceVO>> gameChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(gameService.choiceList());
 | 
	
		
			
				|  |  | +        return ResultVO.ok(gameService.choiceList());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "游戏应用类型选择列表")
 | 
	
	
		
			
				|  | @@ -117,28 +116,12 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |          return ResultVO.ok(gameTagService.gameTagsChoiceList());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "注册渠道选择列表")
 | 
	
		
			
				|  |  | -    @GetMapping(value = "/promo/channel/list")
 | 
	
		
			
				|  |  | -    @PreAuthorize(permissionKey = "sdk:promoChannelChoice:list")
 | 
	
		
			
				|  |  | -    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoChannelChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | -    public ResultVO<List<PromoChannelChoiceVO>> promoChannelChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(promoChannelService.promoChannelChoiceList());
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "归因推广账号选择列表")
 | 
	
		
			
				|  |  | -    @GetMapping(value = "/promo/account/list")
 | 
	
		
			
				|  |  | -    @PreAuthorize(permissionKey = "sdk:promoAccountChoice:list")
 | 
	
		
			
				|  |  | -    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoAccountChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | -    public ResultVO<List<PromoAccountChoiceVO>> promoAccountChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(promoAccountService.promoAccountChoiceList());
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "归因投放人员选择列表")
 | 
	
		
			
				|  |  | -    @GetMapping(value = "/promo/pitcher/list")
 | 
	
		
			
				|  |  | -    @PreAuthorize(permissionKey = "sdk:promoPitcherChoice:list")
 | 
	
		
			
				|  |  | -    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoPitcherChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | -    public ResultVO<List<PromoPitcherChoiceVO>> promoPitcherChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(promoAccountService.promoPitcherChoiceList());
 | 
	
		
			
				|  |  | +    @ApiOperation(value = "注册渠道-账号选择列表")
 | 
	
		
			
				|  |  | +    @GetMapping(value = "/agent/account/list")
 | 
	
		
			
				|  |  | +    @PreAuthorize(permissionKey = "sdk:agentAccountChoice:list")
 | 
	
		
			
				|  |  | +    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = AgentAccountChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | +    public ResultVO<List<AgentAccountChoiceVO>> agentAccountChoiceList() {
 | 
	
		
			
				|  |  | +        return ResultVO.ok(agentService.agentAccountChoiceList());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "支付方式选择列表")
 | 
	
	
		
			
				|  | @@ -146,7 +129,7 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @PreAuthorize(permissionKey = "sdk:payWayChoice:list")
 | 
	
		
			
				|  |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PayWayChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  |      public ResultVO<List<PayWayChoiceVO>> payWayChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(payWayService.payWayChoiceList());
 | 
	
		
			
				|  |  | +        return ResultVO.ok(payWayService.payWayChoiceList());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "支付类型选择列表")
 | 
	
	
		
			
				|  | @@ -154,7 +137,7 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @PreAuthorize(permissionKey = "sdk:payDeviceChoice:list")
 | 
	
		
			
				|  |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PayDeviceChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  |      public ResultVO<List<PayDeviceChoiceVO>> payDeviceChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(payDeviceService.payDeviceChoiceList());
 | 
	
		
			
				|  |  | +        return ResultVO.ok(payDeviceService.payDeviceChoiceList());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "商户选择列表")
 | 
	
	
		
			
				|  | @@ -165,60 +148,14 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |          return ResultVO.ok(payMerchantService.payMerchantChoiceList());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "推广媒体类型选择列表")
 | 
	
		
			
				|  |  | -    @GetMapping(value = "/promo/media/type/list")
 | 
	
		
			
				|  |  | -    @PreAuthorize(permissionKey = "sdk:promoMediaTypeChoice:list")
 | 
	
		
			
				|  |  | -    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoMediaTypeChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | -    public ResultVO<List<PromoMediaTypeChoiceVO>> promoMediaTypeChoiceList() {
 | 
	
		
			
				|  |  | -        return ResultVO.ok(BeanUtils.copyList(Arrays.asList(PromoMediaTypeEnum.values()), PromoMediaTypeChoiceVO.class));
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "推广媒体选择列表")
 | 
	
		
			
				|  |  | -    @GetMapping(value = "/promo/media/list")
 | 
	
		
			
				|  |  | -    @PreAuthorize(permissionKey = "sdk:promoMediaChoice:list")
 | 
	
		
			
				|  |  | -    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoMediaChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | -    public ResultVO<List<PromoMediaChoiceVO>> promoMediaChoiceList() {
 | 
	
		
			
				|  |  | -        return ResultVO.ok(promoMediaService.promoMediaChoiceList());
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "推广账号类型选择列表")
 | 
	
		
			
				|  |  | -    @GetMapping(value = "/promo/account/type/list")
 | 
	
		
			
				|  |  | -    @PreAuthorize(permissionKey = "sdk:promoAccountTypeChoice:list")
 | 
	
		
			
				|  |  | -    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoMediaChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | -    public ResultVO<List<PromoAccountTypeChoiceVO>> promoAccountTypeChoiceList() {
 | 
	
		
			
				|  |  | -        return ResultVO.ok(BeanUtils.copyList(Arrays.asList(PromoAccountTypeEnum.values()), PromoAccountTypeChoiceVO.class));
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "推广账号联动选择列表")
 | 
	
		
			
				|  |  | -    @GetMapping(value = "/promo/account/linkage/list")
 | 
	
		
			
				|  |  | -    @PreAuthorize(permissionKey = "sdk:promoAccountLinkageChoice:list")
 | 
	
		
			
				|  |  | -    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoAccountLinkageChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | -    public ResultVO<List<PromoAccountLinkageChoiceVO>> promoAccountLinkageChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(promoAccountService.promoAccountLinkageChoiceList());
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "推广媒体版位位置联动选择列表")
 | 
	
		
			
				|  |  | -    @GetMapping(value = "/promo/site/linkage/list")
 | 
	
		
			
				|  |  | -    @PreAuthorize(permissionKey = "sdk:promoSiteLinkageChoice:list")
 | 
	
		
			
				|  |  | -    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoSiteLinkageChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | -    public ResultVO<List<PromoSiteLinkageChoiceVO>> promoSiteLinkageChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(promoSiteService.promoSiteLinkageChoiceList());
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    @ApiOperation(value = "推广服务商选择列表")
 | 
	
		
			
				|  |  | -    @GetMapping(value = "/promo/provider/list")
 | 
	
		
			
				|  |  | -    @PreAuthorize(permissionKey = "sdk:promoProviderChoice:list")
 | 
	
		
			
				|  |  | -    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoProviderChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  | -    public ResultVO<List<PromoProviderChoiceVO>> promoProviderChoiceList() {
 | 
	
		
			
				|  |  | -        return ResultVO.ok(BeanUtils.copyList(Arrays.asList(PromoProviderEnum.values()), PromoProviderChoiceVO.class));
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      @ApiOperation(value = "支付应用类型选择列表")
 | 
	
		
			
				|  |  |      @GetMapping(value = "/application/type/list")
 | 
	
		
			
				|  |  |      @PreAuthorize(permissionKey = "sdk:payApplicationTypeChoice:list")
 | 
	
		
			
				|  |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = ApplicationTypeChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  |      public ResultVO<List<ApplicationTypeChoiceVO>> applicationTypeChoiceList() {
 | 
	
		
			
				|  |  | -        return ResultVO.ok(BeanUtils.copyList(Arrays.asList(PayApplicationTypeEnum.values()), ApplicationTypeChoiceVO.class));
 | 
	
		
			
				|  |  | +        return ResultVO.ok(Arrays.stream(PayApplicationTypeEnum.values())
 | 
	
		
			
				|  |  | +                .map(payApplicationTypeEnum -> BeanUtil.copy(payApplicationTypeEnum, ApplicationTypeChoiceVO.class))
 | 
	
		
			
				|  |  | +                .collect(Collectors.toList()));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "支付应用选择列表")
 | 
	
	
		
			
				|  | @@ -226,7 +163,7 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @PreAuthorize(permissionKey = "sdk:payApplicationChoice:list")
 | 
	
		
			
				|  |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PayApplicationChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  |      public ResultVO<List<PayApplicationChoiceVO>> payApplicationChoiceList() {
 | 
	
		
			
				|  |  | -        return new ResultVO<>(payApplicationService.payApplicationChoiceList());
 | 
	
		
			
				|  |  | +        return ResultVO.ok(payApplicationService.payApplicationChoiceList());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @ApiOperation(value = "支付盒子选择列表")
 | 
	
	
		
			
				|  | @@ -242,6 +179,8 @@ public class ChoiceController {
 | 
	
		
			
				|  |  |      @PreAuthorize(permissionKey = "sdk:gamePayStrategyChoice:list")
 | 
	
		
			
				|  |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GamePayStrategyChoiceVO.class, responseContainer = "list")})
 | 
	
		
			
				|  |  |      public ResultVO<List<GamePayStrategyChoiceVO>> gamePayStrategyChoiceList() {
 | 
	
		
			
				|  |  | -        return ResultVO.ok(BeanUtils.copyList(Arrays.asList(GameStrategyTypeEnum.values()), GamePayStrategyChoiceVO.class));
 | 
	
		
			
				|  |  | +        return ResultVO.ok(Arrays.stream(GameStrategyTypeEnum.values())
 | 
	
		
			
				|  |  | +                .map(gameStrategyTypeEnum -> BeanUtil.copy(gameStrategyTypeEnum, GamePayStrategyChoiceVO.class))
 | 
	
		
			
				|  |  | +                .collect(Collectors.toList()));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 |