123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- package com.zanxiang.manage.controller;
- import com.zanxiang.common.domain.ResultVO;
- import com.zanxiang.common.enums.*;
- import com.zanxiang.common.utils.bean.BeanUtils;
- import com.zanxiang.erp.security.annotation.PreAuthorize;
- import com.zanxiang.manage.domain.vo.*;
- import com.zanxiang.manage.service.*;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import io.swagger.annotations.ApiResponse;
- import io.swagger.annotations.ApiResponses;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.Arrays;
- import java.util.List;
- /**
- * @author : lingfeng
- * @time : 2022-11-03
- * @description : 条件选择接口
- */
- @Api(tags = {"选择下拉接口"})
- @RestController
- @RequestMapping("/choice")
- @Slf4j
- public class ChoiceController {
- @Autowired
- private ICpService cpService;
- @Autowired
- private IGameService gameService;
- @Autowired
- private IGameCategoryService gameCategoryService;
- @Autowired
- private IPromoChannelService promoChannelService;
- @Autowired
- private IPromoAccountService promoAccountService;
- @Autowired
- private IPayWayService payWayService;
- @Autowired
- private IPayMerchantService payMerchantService;
- @Autowired
- private IGameTagService gameTagService;
- @Autowired
- private IPromoMediaService promoMediaService;
- @Autowired
- private IPromoSiteService promoSiteService;
- @Autowired
- private IPayApplicationService payApplicationService;
- @Autowired
- private IPayDeviceService payDeviceService;
- @Autowired
- private IPayBoxService payBoxService;
- @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));
- }
- @ApiOperation(value = "操作系统选择列表")
- @GetMapping(value = "/os/type/list")
- @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));
- }
- @ApiOperation(value = "cp选择列表")
- @GetMapping(value = "/cp/list")
- @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());
- }
- @ApiOperation(value = "游戏选择列表")
- @GetMapping(value = "/game/list")
- @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());
- }
- @ApiOperation(value = "游戏应用类型选择列表")
- @GetMapping(value = "/game/category/list")
- @PreAuthorize(permissionKey = "sdk:gameCategoryChoice:list")
- @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameCategoryChoiceVO.class, responseContainer = "list")})
- public ResultVO<List<GameCategoryChoiceVO>> gameCategoryChoiceList() {
- return ResultVO.ok(gameCategoryService.gameCategoryChoiceList());
- }
- @ApiOperation(value = "游戏分类标签选择列表")
- @GetMapping(value = "/game/tags/list")
- @PreAuthorize(permissionKey = "sdk:gameTagsChoice:list")
- @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameTagChoiceVO.class, responseContainer = "list")})
- public ResultVO<List<GameTagChoiceVO>> 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 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 = "/pay/way/list")
- @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());
- }
- @ApiOperation(value = "支付类型选择列表")
- @GetMapping(value = "/pay/device/list")
- @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());
- }
- @ApiOperation(value = "商户选择列表")
- @GetMapping(value = "/pay/merchant/list")
- @PreAuthorize(permissionKey = "sdk:payMerchantChoice:list")
- @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PayMerchantChoiceVO.class, responseContainer = "list")})
- public ResultVO<List<PayMerchantChoiceVO>> 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 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));
- }
- @ApiOperation(value = "支付应用选择列表")
- @GetMapping(value = "/pay/application/list")
- @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());
- }
- @ApiOperation(value = "支付盒子选择列表")
- @GetMapping(value = "/pay/box/list")
- @PreAuthorize(permissionKey = "sdk:payBoxChoice:list")
- @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PayBoxChoiceVO.class, responseContainer = "list")})
- public ResultVO<List<PayBoxChoiceVO>> payBoxChoiceList() {
- return ResultVO.ok(payBoxService.payBoxChoiceList());
- }
- @ApiOperation(value = "策略类型选择列表")
- @GetMapping(value = "/game/pay/strategy/list")
- @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));
- }
- }
|