123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- package com.zanxiang.manage.controller;
- import com.zanxiang.common.domain.ResultVO;
- import com.zanxiang.common.enums.OsEnum;
- import com.zanxiang.common.enums.VipLevelEnum;
- 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 CpService cpService;
- @Autowired
- private GameService gameService;
- @Autowired
- private GameCategoryService gameCategoryService;
- @Autowired
- private PromoChannelService promoChannelService;
- @Autowired
- private PromoAccountService promoAccountService;
- @Autowired
- private PayWayService payWayService;
- @Autowired
- private PayMerchantService payMerchantService;
- @Autowired
- private GameTagService gameTagService;
- @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/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());
- }
- }
|