|
@@ -1,10 +1,13 @@
|
|
package com.zanxiang.game.module.manage.controller;
|
|
package com.zanxiang.game.module.manage.controller;
|
|
|
|
|
|
import com.zanxiang.erp.security.annotation.PreAuthorize;
|
|
import com.zanxiang.erp.security.annotation.PreAuthorize;
|
|
-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.pojo.vo.*;
|
|
import com.zanxiang.game.module.manage.service.*;
|
|
import com.zanxiang.game.module.manage.service.*;
|
|
|
|
+import com.zanxiang.module.util.bean.BeanUtil;
|
|
import com.zanxiang.module.util.pojo.ResultVO;
|
|
import com.zanxiang.module.util.pojo.ResultVO;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -18,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author : lingfeng
|
|
* @author : lingfeng
|
|
@@ -39,12 +43,6 @@ public class ChoiceController {
|
|
@Autowired
|
|
@Autowired
|
|
private IGameCategoryService gameCategoryService;
|
|
private IGameCategoryService gameCategoryService;
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private IPromoChannelService promoChannelService;
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- private IPromoAccountService promoAccountService;
|
|
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private IPayWayService payWayService;
|
|
private IPayWayService payWayService;
|
|
|
|
|
|
@@ -54,12 +52,6 @@ public class ChoiceController {
|
|
@Autowired
|
|
@Autowired
|
|
private IGameTagService gameTagService;
|
|
private IGameTagService gameTagService;
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private IPromoMediaService promoMediaService;
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- private IPromoSiteService promoSiteService;
|
|
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private IPayApplicationService payApplicationService;
|
|
private IPayApplicationService payApplicationService;
|
|
|
|
|
|
@@ -69,12 +61,17 @@ public class ChoiceController {
|
|
@Autowired
|
|
@Autowired
|
|
private IPayBoxService payBoxService;
|
|
private IPayBoxService payBoxService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IAgentService agentService;
|
|
|
|
+
|
|
@ApiOperation(value = "vip等级选择列表")
|
|
@ApiOperation(value = "vip等级选择列表")
|
|
@GetMapping(value = "/vip/level/list")
|
|
@GetMapping(value = "/vip/level/list")
|
|
@PreAuthorize(permissionKey = "sdk:choiceVipLevel:list")
|
|
@PreAuthorize(permissionKey = "sdk:choiceVipLevel:list")
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = VipLevelChoiceVO.class, responseContainer = "list")})
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = VipLevelChoiceVO.class, responseContainer = "list")})
|
|
public ResultVO<List<VipLevelChoiceVO>> vipLevelChoiceList() {
|
|
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 = "操作系统选择列表")
|
|
@ApiOperation(value = "操作系统选择列表")
|
|
@@ -82,7 +79,9 @@ public class ChoiceController {
|
|
@PreAuthorize(permissionKey = "sdk:choiceOsType:list")
|
|
@PreAuthorize(permissionKey = "sdk:choiceOsType:list")
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = SystemChoiceVO.class, responseContainer = "list")})
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = SystemChoiceVO.class, responseContainer = "list")})
|
|
public ResultVO<List<SystemChoiceVO>> systemChoiceList() {
|
|
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选择列表")
|
|
@ApiOperation(value = "cp选择列表")
|
|
@@ -117,28 +116,12 @@ public class ChoiceController {
|
|
return ResultVO.ok(gameTagService.gameTagsChoiceList());
|
|
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 ResultVO.ok(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 ResultVO.ok(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 ResultVO.ok(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 = "支付方式选择列表")
|
|
@ApiOperation(value = "支付方式选择列表")
|
|
@@ -165,60 +148,14 @@ public class ChoiceController {
|
|
return ResultVO.ok(payMerchantService.payMerchantChoiceList());
|
|
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 ResultVO.ok(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 ResultVO.ok(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 = "支付应用类型选择列表")
|
|
@ApiOperation(value = "支付应用类型选择列表")
|
|
@GetMapping(value = "/application/type/list")
|
|
@GetMapping(value = "/application/type/list")
|
|
@PreAuthorize(permissionKey = "sdk:payApplicationTypeChoice:list")
|
|
@PreAuthorize(permissionKey = "sdk:payApplicationTypeChoice:list")
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = ApplicationTypeChoiceVO.class, responseContainer = "list")})
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = ApplicationTypeChoiceVO.class, responseContainer = "list")})
|
|
public ResultVO<List<ApplicationTypeChoiceVO>> applicationTypeChoiceList() {
|
|
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 = "支付应用选择列表")
|
|
@ApiOperation(value = "支付应用选择列表")
|
|
@@ -242,6 +179,8 @@ public class ChoiceController {
|
|
@PreAuthorize(permissionKey = "sdk:gamePayStrategyChoice:list")
|
|
@PreAuthorize(permissionKey = "sdk:gamePayStrategyChoice:list")
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GamePayStrategyChoiceVO.class, responseContainer = "list")})
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GamePayStrategyChoiceVO.class, responseContainer = "list")})
|
|
public ResultVO<List<GamePayStrategyChoiceVO>> gamePayStrategyChoiceList() {
|
|
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()));
|
|
}
|
|
}
|
|
}
|
|
}
|