|
@@ -1,11 +1,13 @@
|
|
|
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.*;
|
|
|
+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 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author : lingfeng
|
|
@@ -74,7 +77,9 @@ public class ChoiceController {
|
|
|
@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 +87,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 +97,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 +105,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 = "游戏应用类型选择列表")
|
|
@@ -122,7 +129,7 @@ public class ChoiceController {
|
|
|
@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());
|
|
|
+ return ResultVO.ok(promoChannelService.promoChannelChoiceList());
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "归因推广账号选择列表")
|
|
@@ -130,7 +137,7 @@ public class ChoiceController {
|
|
|
@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());
|
|
|
+ return ResultVO.ok(promoAccountService.promoAccountChoiceList());
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "归因投放人员选择列表")
|
|
@@ -138,7 +145,7 @@ public class ChoiceController {
|
|
|
@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());
|
|
|
+ return ResultVO.ok(promoAccountService.promoPitcherChoiceList());
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "支付方式选择列表")
|
|
@@ -146,7 +153,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 +161,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 = "商户选择列表")
|
|
@@ -170,7 +177,9 @@ public class ChoiceController {
|
|
|
@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));
|
|
|
+ return ResultVO.ok(Arrays.stream(PromoMediaTypeEnum.values())
|
|
|
+ .map(promoMediaTypeEnum -> BeanUtil.copy(promoMediaTypeEnum, PromoMediaTypeChoiceVO.class))
|
|
|
+ .collect(Collectors.toList()));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "推广媒体选择列表")
|
|
@@ -186,7 +195,9 @@ public class ChoiceController {
|
|
|
@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));
|
|
|
+ return ResultVO.ok(Arrays.stream(PromoAccountTypeEnum.values())
|
|
|
+ .map(promoAccountTypeEnum -> BeanUtil.copy(promoAccountTypeEnum, PromoAccountTypeChoiceVO.class))
|
|
|
+ .collect(Collectors.toList()));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "推广账号联动选择列表")
|
|
@@ -194,7 +205,7 @@ public class ChoiceController {
|
|
|
@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());
|
|
|
+ return ResultVO.ok(promoAccountService.promoAccountLinkageChoiceList());
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "推广媒体版位位置联动选择列表")
|
|
@@ -202,7 +213,7 @@ public class ChoiceController {
|
|
|
@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());
|
|
|
+ return ResultVO.ok(promoSiteService.promoSiteLinkageChoiceList());
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "推广服务商选择列表")
|
|
@@ -210,7 +221,9 @@ public class ChoiceController {
|
|
|
@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));
|
|
|
+ return ResultVO.ok(Arrays.stream(PromoProviderEnum.values())
|
|
|
+ .map(promoProviderEnum -> BeanUtil.copy(promoProviderEnum, PromoProviderChoiceVO.class))
|
|
|
+ .collect(Collectors.toList()));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "支付应用类型选择列表")
|
|
@@ -218,7 +231,9 @@ public class ChoiceController {
|
|
|
@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 +241,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 +257,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()));
|
|
|
}
|
|
|
}
|