Kaynağa Gözat

feat : 选择下拉框统一整理

bilingfeng 2 yıl önce
ebeveyn
işleme
8c60ac07a7
20 değiştirilmiş dosya ile 461 ekleme ve 92 silme
  1. 3 3
      game-module/game-manage/src/main/java/com/zanxiang/manage/controller/ChannelController.java
  2. 125 0
      game-module/game-manage/src/main/java/com/zanxiang/manage/controller/ChoiceController.java
  3. 0 8
      game-module/game-manage/src/main/java/com/zanxiang/manage/controller/CpController.java
  4. 0 8
      game-module/game-manage/src/main/java/com/zanxiang/manage/controller/GameController.java
  5. 9 34
      game-module/game-manage/src/main/java/com/zanxiang/manage/controller/UserController.java
  6. 42 0
      game-module/game-manage/src/main/java/com/zanxiang/manage/controller/UserGameController.java
  7. 55 7
      game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/GameUserListVO.java
  8. 22 0
      game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/PromoAccountChoiceVO.java
  9. 2 2
      game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/PromoChannelChoiceVO.java
  10. 25 0
      game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/PromoPitcherChoiceVO.java
  11. 1 1
      game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/SystemChoiceVO.java
  12. 1 1
      game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/VipLevelChoiceVO.java
  13. 2 2
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/ChannelService.java
  14. 6 6
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/ChannelServiceImpl.java
  15. 0 1
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/GameUserRoleServiceImpl.java
  16. 33 19
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/GameUserServiceImpl.java
  17. 48 0
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/PromoAccountServiceImpl.java
  18. 35 0
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/PromoChannelServiceImpl.java
  19. 30 0
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/PromoAccountService.java
  20. 22 0
      game-module/game-manage/src/main/java/com/zanxiang/manage/service/PromoChannelService.java

+ 3 - 3
game-module/game-manage/src/main/java/com/zanxiang/manage/controller/ChannelController.java

@@ -2,7 +2,7 @@ package com.zanxiang.manage.controller;
 
 import com.zanxiang.common.domain.ResultVO;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.manage.domain.vo.ChannelChoiceVO;
+import com.zanxiang.manage.domain.vo.PromoChannelChoiceVO;
 import com.zanxiang.manage.service.ChannelService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -33,8 +33,8 @@ public class ChannelController {
     @ApiOperation(value = "渠道选择列表查询")
     @GetMapping(value = "/choice/list")
     @PreAuthorize(permissionKey = "sdk:channelChoice:list")
-    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = ChannelChoiceVO.class, responseContainer = "list")})
-    public ResultVO<List<ChannelChoiceVO>> choiceList() {
+    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PromoChannelChoiceVO.class, responseContainer = "list")})
+    public ResultVO<List<PromoChannelChoiceVO>> choiceList() {
         return new ResultVO<>(channelService.choiceList());
     }
 }

+ 125 - 0
game-module/game-manage/src/main/java/com/zanxiang/manage/controller/ChoiceController.java

@@ -0,0 +1,125 @@
+package com.zanxiang.manage.controller;
+
+import com.zanxiang.common.domain.ResultVO;
+import com.zanxiang.common.enums.GameCategoryEnum;
+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 ChannelService channelService;
+
+    @Autowired
+    private GameCategoryService gameCategoryService;
+
+    @Autowired
+    private PromoChannelService promoChannelService;
+
+    @Autowired
+    private PromoAccountService promoAccountService;
+
+    @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 = GameCategoryParentVO.class, responseContainer = "list")})
+    public ResultVO<List<GameCategoryParentVO>> gameCategoryChoiceList() {
+        return ResultVO.ok(gameCategoryService.getGameCategoryParent(GameCategoryEnum.GAME_TYPE.getCategoryType()));
+    }
+
+    @ApiOperation(value = "游戏父标签选择列表")
+    @GetMapping(value = "/game/parent/tags/list")
+    @PreAuthorize(permissionKey = "sdk:gameTagsChoice:list")
+    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameCategoryParentVO.class, responseContainer = "list")})
+    public ResultVO<List<GameCategoryParentVO>> gameTagsChoiceList() {
+        return ResultVO.ok(gameCategoryService.getGameCategoryParent(GameCategoryEnum.GAME_LABEL.getCategoryType()));
+    }
+
+    @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());
+    }
+
+}

+ 0 - 8
game-module/game-manage/src/main/java/com/zanxiang/manage/controller/CpController.java

@@ -33,14 +33,6 @@ public class CpController {
     @Autowired
     private CpService cpService;
 
-    @ApiOperation(value = "cp选择列表查询")
-    @GetMapping(value = "/choice/list")
-    @PreAuthorize(permissionKey = "sdk:cpChoice:list")
-    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = CpChoiceVO.class, responseContainer = "list")})
-    public ResultVO<List<CpChoiceVO>> choiceList() {
-        return new ResultVO<>(cpService.choiceList());
-    }
-
     @ApiOperation(value = "cp新增或者更新")
     @PostMapping(value = "/add/or/update")
     @PreAuthorize(permissionKey = "sdk:cp:addOrUpdate")

+ 0 - 8
game-module/game-manage/src/main/java/com/zanxiang/manage/controller/GameController.java

@@ -103,14 +103,6 @@ public class GameController {
         return new ResultVO<>(gameService.gameList(param));
     }
 
-    @ApiOperation(value = "游戏选择列表查询")
-    @GetMapping(value = "/choice/list")
-    @PreAuthorize(permissionKey = "sdk:gameChoice:list")
-    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameChoiceVO.class, responseContainer = "list")})
-    public ResultVO<List<GameChoiceVO>> choiceList() {
-        return new ResultVO<>(gameService.choiceList());
-    }
-
     @ApiOperation(value = "删除游戏")
     @DeleteMapping(value = "/delete")
     @PreAuthorize(permissionKey = "sdk:game:delete")

+ 9 - 34
game-module/game-manage/src/main/java/com/zanxiang/manage/controller/UserController.java

@@ -2,13 +2,16 @@ package com.zanxiang.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 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.params.*;
+import com.zanxiang.manage.domain.params.UserListParam;
+import com.zanxiang.manage.domain.params.UserLoginLogParam;
+import com.zanxiang.manage.domain.params.UserOrderListParam;
+import com.zanxiang.manage.domain.params.UserUpdateParam;
 import com.zanxiang.manage.domain.vo.*;
-import com.zanxiang.manage.service.*;
+import com.zanxiang.manage.service.OrderService;
+import com.zanxiang.manage.service.UserAddressService;
+import com.zanxiang.manage.service.UserLoginLogService;
+import com.zanxiang.manage.service.UserService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -18,7 +21,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -32,9 +34,6 @@ import java.util.List;
 @Slf4j
 public class UserController {
 
-    @Autowired
-    private GameUserService gameUserService;
-
     @Autowired
     private UserService userService;
 
@@ -47,7 +46,7 @@ public class UserController {
     @Autowired
     private OrderService orderService;
 
-    @ApiOperation(value = "用户列表")
+    @ApiOperation(value = "玩家列表")
     @PostMapping(value = "/list")
     @PreAuthorize(permissionKey = "sdk:user:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = UserListVO.class)})
@@ -94,28 +93,4 @@ public class UserController {
     public ResultVO<List<UserAddressVO>> list(@RequestParam Long userId) {
         return ResultVO.ok(userAddressService.list(userId));
     }
-
-    @ApiOperation(value = "玩家游戏列表")
-    @PostMapping(value = "/game/list")
-    @PreAuthorize(permissionKey = "sdk:user:gameList")
-    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameUserListVO.class)})
-    public ResultVO<IPage<GameUserListVO>> gameUserList(@Validated @RequestBody GameUserListParam param) {
-        return ResultVO.ok(gameUserService.gameUserList(param));
-    }
-
-    @ApiOperation(value = "vip等级选择列表选择列表")
-    @GetMapping(value = "/vip/level/choice/list")
-    @PreAuthorize(permissionKey = "sdk:userVipChoice:list")
-    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = VipLevelVo.class, responseContainer = "list")})
-    public ResultVO<List<VipLevelVo>> vipLevelChoiceList() {
-        return ResultVO.ok(BeanUtils.copyList(Arrays.asList(VipLevelEnum.values()), VipLevelVo.class));
-    }
-
-    @ApiOperation(value = "操作系统选择列表")
-    @GetMapping(value = "/system/type/choice/list")
-    @PreAuthorize(permissionKey = "sdk:userSystemChoice:list")
-    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = SystemTypeVO.class, responseContainer = "list")})
-    public ResultVO<List<SystemTypeVO>> systemTypeChoiceList() {
-        return ResultVO.ok(BeanUtils.copyList(Arrays.asList(OsEnum.values()), SystemTypeVO.class));
-    }
 }

+ 42 - 0
game-module/game-manage/src/main/java/com/zanxiang/manage/controller/UserGameController.java

@@ -0,0 +1,42 @@
+package com.zanxiang.manage.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.zanxiang.common.domain.ResultVO;
+import com.zanxiang.erp.security.annotation.PreAuthorize;
+import com.zanxiang.manage.domain.params.GameUserListParam;
+import com.zanxiang.manage.domain.vo.GameUserListVO;
+import com.zanxiang.manage.service.GameUserService;
+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.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author : lingfeng
+ * @time : 2022-11-03
+ * @description : 玩家游戏
+ */
+@Api(tags = {"玩家管理接口"})
+@RestController
+@RequestMapping("/user")
+@Slf4j
+public class UserGameController {
+
+    @Autowired
+    private GameUserService gameUserService;
+
+    @ApiOperation(value = "玩家游戏列表")
+    @PostMapping(value = "/game/list")
+    @PreAuthorize(permissionKey = "sdk:user:gameList")
+    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameUserListVO.class)})
+    public ResultVO<IPage<GameUserListVO>> gameUserList(@Validated @RequestBody GameUserListParam param) {
+        return ResultVO.ok(gameUserService.gameUserList(param));
+    }
+}

+ 55 - 7
game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/GameUserListVO.java

@@ -42,13 +42,25 @@ public class GameUserListVO {
      * 注册渠道id
      */
     @ApiModelProperty(notes = "注册渠道id")
-    private Long channelId;
+    private Long agentId;
+
+    /**
+     * 注册渠道名称
+     */
+    @ApiModelProperty(notes = "注册渠道名称")
+    private String channel;
+
+    /**
+     * cp标识id
+     */
+    @ApiModelProperty(notes = "cp标识id")
+    private Long cpId;
 
     /**
      * cp名称
      */
     @ApiModelProperty(notes = "cp名称")
-    private Long cpId;
+    private String cpName;
 
     /**
      * 游戏id
@@ -56,6 +68,12 @@ public class GameUserListVO {
     @ApiModelProperty(notes = "游戏id")
     private Long gameId;
 
+    /**
+     * 游戏名称
+     */
+    @ApiModelProperty(notes = "游戏名称")
+    private String gameName;
+
     /**
      * 游戏应用类型id
      */
@@ -63,28 +81,52 @@ public class GameUserListVO {
     private Long gameCategoryId;
 
     /**
-     * 归因投放人员
+     * 游戏应用类型名称
+     */
+    @ApiModelProperty(notes = "游戏应用类型名称")
+    private String gameCategoryName;
+
+    /**
+     * 归因投放人员id
      */
-    @ApiModelProperty(notes = "归因投放人员")
+    @ApiModelProperty(notes = "归因投放人员id")
     private Long pitcherId;
 
+    /**
+     * 归因投放人员名字
+     */
+    @ApiModelProperty(notes = "归因投放人员名字")
+    private String pitcherName;
+
     /**
      * 归因推广账号
      */
     @ApiModelProperty(notes = "归因推广账号")
     private Long accountId;
 
+    /**
+     * 归因推广账号
+     */
+    @ApiModelProperty(notes = "归因推广账号")
+    private String accountName;
+
     /**
      * 归因媒体id
      */
     @ApiModelProperty(notes = "归因媒体id")
     private Long mediaId;
 
+    /**
+     * 归因媒体名称
+     */
+    @ApiModelProperty(notes = "归因媒体名称")
+    private String mediaName;
+
     /**
      * 归因广告id
      */
     @ApiModelProperty(notes = "归因广告id")
-    private Long adId;
+    private String adId;
 
     /**
      * 充值金额
@@ -116,6 +158,12 @@ public class GameUserListVO {
     @ApiModelProperty(notes = "客服id")
     private Long customerId;
 
+    /**
+     * 客服名称
+     */
+    @ApiModelProperty(notes = "客服名称")
+    private String customerName;
+
     /**
      * 是否GS
      */
@@ -131,13 +179,13 @@ public class GameUserListVO {
     /**
      * 开始玩时间(游戏玩家创建时间)
      */
-    @ApiModelProperty(notes = "开始玩时间(游戏玩家创建时间)")
+    @ApiModelProperty(notes = "开始玩时间")
     private LocalDateTime createTime;
 
     /**
      * 最后玩时间(最后登录时间)
      */
-    @ApiModelProperty(notes = "最后玩时间(最后登录时间)")
+    @ApiModelProperty(notes = "最后玩时间")
     private LocalDateTime updateTime;
 
     /**

+ 22 - 0
game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/PromoAccountChoiceVO.java

@@ -0,0 +1,22 @@
+package com.zanxiang.manage.domain.vo;
+
+import lombok.Data;
+
+/**
+ * @author : lingfeng
+ * @time : 2022-11-04
+ * @description : 渠道选择列表
+ */
+@Data
+public class PromoAccountChoiceVO {
+
+    /**
+     * 推广账号id
+     */
+    private String account;
+
+    /**
+     * 推广账号名称
+     */
+    private String name;
+}

+ 2 - 2
game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/ChannelChoiceVO.java → game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/PromoChannelChoiceVO.java

@@ -11,7 +11,7 @@ import lombok.Data;
  */
 @Data
 @Builder
-public class ChannelChoiceVO {
+public class PromoChannelChoiceVO {
 
     /**
      * 渠道id
@@ -23,5 +23,5 @@ public class ChannelChoiceVO {
      * 渠道标识
      */
     @ApiModelProperty(notes = "渠道标识")
-    private String channelSign;
+    private String channel;
 }

+ 25 - 0
game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/PromoPitcherChoiceVO.java

@@ -0,0 +1,25 @@
+package com.zanxiang.manage.domain.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author : lingfeng
+ * @time : 2022-11-04
+ * @description : 投手
+ */
+@Data
+public class PromoPitcherChoiceVO {
+
+    /**
+     * 投手id
+     */
+    @ApiModelProperty(notes = "投手id")
+    private String pitcherId;
+
+    /**
+     * 投手名称
+     */
+    @ApiModelProperty(notes = "投手名称")
+    private String pitcherName;
+}

+ 1 - 1
game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/SystemTypeVO.java → game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/SystemChoiceVO.java

@@ -11,7 +11,7 @@ import lombok.Data;
  */
 @ApiModel
 @Data
-public class SystemTypeVO {
+public class SystemChoiceVO {
 
     /**
      * 操作系统

+ 1 - 1
game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/VipLevelVo.java → game-module/game-manage/src/main/java/com/zanxiang/manage/domain/vo/VipLevelChoiceVO.java

@@ -9,7 +9,7 @@ import lombok.Data;
  * @description : 角色vip等级
  */
 @Data
-public class VipLevelVo {
+public class VipLevelChoiceVO {
 
     /**
      * vip等级

+ 2 - 2
game-module/game-manage/src/main/java/com/zanxiang/manage/service/ChannelService.java

@@ -2,7 +2,7 @@ package com.zanxiang.manage.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.zanxiang.manage.domain.dto.ChannelDTO;
-import com.zanxiang.manage.domain.vo.ChannelChoiceVO;
+import com.zanxiang.manage.domain.vo.PromoChannelChoiceVO;
 import com.zanxiang.mybatis.entity.Channel;
 
 import java.util.List;
@@ -20,7 +20,7 @@ public interface ChannelService extends IService<Channel> {
      *
      * @return : 返回所有cp信息
      */
-    List<ChannelChoiceVO> choiceList();
+    List<PromoChannelChoiceVO> choiceList();
 
     /**
      * 查询渠道选择列表

+ 6 - 6
game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/ChannelServiceImpl.java

@@ -3,7 +3,7 @@ package com.zanxiang.manage.service.Impl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zanxiang.common.utils.bean.BeanUtils;
 import com.zanxiang.manage.domain.dto.ChannelDTO;
-import com.zanxiang.manage.domain.vo.ChannelChoiceVO;
+import com.zanxiang.manage.domain.vo.PromoChannelChoiceVO;
 import com.zanxiang.manage.service.ChannelService;
 import com.zanxiang.mybatis.entity.Channel;
 import com.zanxiang.mybatis.mapper.ChannelMapper;
@@ -30,13 +30,13 @@ public class ChannelServiceImpl extends ServiceImpl<ChannelMapper, Channel> impl
      * @return : 返回所有cp信息
      */
     @Override
-    public List<ChannelChoiceVO> choiceList() {
-        ChannelChoiceVO choice1 = ChannelChoiceVO.builder()
+    public List<PromoChannelChoiceVO> choiceList() {
+        PromoChannelChoiceVO choice1 = PromoChannelChoiceVO.builder()
                 .id(1L)
-                .channelSign("szqremenshouyoubabangtuijianpyq|邵邵-烈火骑士-热门手游霸榜推荐-朋友圈").build();
-        ChannelChoiceVO choice2 = ChannelChoiceVO.builder()
+                .channel("szqremenshouyoubabangtuijianpyq|邵邵-烈火骑士-热门手游霸榜推荐-朋友圈").build();
+        PromoChannelChoiceVO choice2 = PromoChannelChoiceVO.builder()
                 .id(2L)
-                .channelSign("SZQhuoreshouyouxinzhanbaoJL(szq-奇迹战神-火热手游新战报-激励-巨网)").build();
+                .channel("SZQhuoreshouyouxinzhanbaoJL(szq-奇迹战神-火热手游新战报-激励-巨网)").build();
         return Arrays.asList(choice1, choice2);
     }
 

+ 0 - 1
game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/GameUserRoleServiceImpl.java

@@ -129,7 +129,6 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
         if (gameMap != null && gameMap.isEmpty()) {
             return new Page<>();
         }
-        //注册渠道
         Map<Long, String> channelMap = channelService.choiceMap();
         Map<Long, String> cpMap = cpService.choiceMap();
         Map<Long, String> categoryMap = gameCategoryService.choiceMap();

+ 33 - 19
game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/GameUserServiceImpl.java

@@ -13,9 +13,7 @@ import com.zanxiang.manage.domain.dto.UserDTO;
 import com.zanxiang.manage.domain.params.GameUserListParam;
 import com.zanxiang.manage.domain.vo.GameUserListVO;
 import com.zanxiang.manage.domain.vo.GameUserVO;
-import com.zanxiang.manage.service.GameService;
-import com.zanxiang.manage.service.GameUserService;
-import com.zanxiang.manage.service.UserService;
+import com.zanxiang.manage.service.*;
 import com.zanxiang.mybatis.entity.GameUser;
 import com.zanxiang.mybatis.mapper.GameUserMapper;
 import lombok.extern.slf4j.Slf4j;
@@ -24,7 +22,10 @@ import org.springframework.stereotype.Service;
 
 import java.time.LocalDateTime;
 import java.time.LocalTime;
-import java.util.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
 
 /**
  * @author : lingfeng
@@ -41,6 +42,15 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
     @Autowired
     private GameService gameService;
 
+    @Autowired
+    private GameCategoryService gameCategoryService;
+
+    @Autowired
+    private ChannelService channelService;
+
+    @Autowired
+    private CpService cpService;
+
     /**
      * 查询玩家游戏列表
      *
@@ -49,23 +59,23 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
      */
     @Override
     public IPage<GameUserListVO> gameUserList(GameUserListParam param) {
-        //玩家条件处理
-        Map<Long, UserDTO> userMap = userService.userCondition(param.getUserId(), param.getChannelId(), param.getUserName(), param.getNickname(), null);
-        //根据条件, 匹配不到玩家
-        if (userMap != null && userMap.isEmpty()) {
-            return new Page<>();
-        }
-        //玩家信息和拓展信息合并
-        Set<Long> userIdSet = new HashSet<>();
-        if (userMap != null) {
-            userIdSet = userMap.keySet();
-        }
         //游戏条件处理
         Map<Long, GameDTO> gameMap = gameService.gameCondition(param.getCpId(), param.getGameId(), param.getGameCategoryId());
         //根据条件, 匹配不到游戏
         if (gameMap != null && gameMap.isEmpty()) {
             return new Page<>();
         }
+        //玩家条件处理
+        Map<Long, UserDTO> userMap = userService.userCondition(param.getUserId(), param.getChannelId(), param.getUserName(), param.getNickname(), null);
+        //根据条件, 匹配不到玩家
+        if (userMap != null && userMap.isEmpty()) {
+            return new Page<>();
+        }
+        //相关用户id
+        Set<Long> userIdSet = userMap == null ? null : userMap.keySet();
+        Map<Long, String> channelMap = channelService.choiceMap();
+        Map<Long, String> cpMap = cpService.choiceMap();
+        Map<Long, String> categoryMap = gameCategoryService.choiceMap();
         //执行查询
         return page(param.toPage(), new QueryWrapper<GameUser>().lambda()
                 .in(CollectionUtils.isNotEmpty(userIdSet), GameUser::getUserId, userIdSet)
@@ -84,7 +94,7 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
                 .eq(param.getVipLevel() != null && param.getVipLevel() <= 10, GameUser::getRoleVipMax, param.getVipLevel())
                 .gt(param.getVipLevel() != null && param.getVipLevel() > 10, GameUser::getRoleVipMax, param.getVipLevel())
                 .orderByDesc(GameUser::getCreateTime)
-        ).convert(u -> this.toVo(u, userMap, gameMap));
+        ).convert(u -> this.toVo(u, userMap, gameMap, channelMap, cpMap, categoryMap));
     }
 
     /**
@@ -95,7 +105,8 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
      * @param gameMap  : 游戏信息
      * @return : 返回游戏玩家信息
      */
-    private GameUserListVO toVo(GameUser gameUser, Map<Long, UserDTO> userMap, Map<Long, GameDTO> gameMap) {
+    private GameUserListVO toVo(GameUser gameUser, Map<Long, UserDTO> userMap, Map<Long, GameDTO> gameMap,
+                                Map<Long, String> channelMap, Map<Long, String> cpMap, Map<Long, String> categoryMap) {
         GameUserListVO gameUserListVO = BeanUtils.copy(gameUser, GameUserListVO.class);
         if (Objects.isNull(gameUserListVO)) {
             return null;
@@ -107,15 +118,18 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
         if (userDTO != null) {
             gameUserListVO.setNickname(userDTO.getNickname());
             gameUserListVO.setUsername(userDTO.getUsername());
-            gameUserListVO.setChannelId(userDTO.getAgentId());
+            gameUserListVO.setAgentId(userDTO.getAgentId());
+            gameUserListVO.setChannel(channelMap.get(userDTO.getAgentId()));
         }
         GameDTO gameDTO = StringUtils.isEmpty(gameMap) ? null : gameMap.get(gameUserListVO.getGameId());
         if (gameDTO == null) {
             gameDTO = gameService.getById(gameUserListVO.getGameId());
         }
         if (gameDTO != null) {
-            gameUserListVO.setGameCategoryId(gameDTO.getCategory());
             gameUserListVO.setCpId(gameDTO.getCpId());
+            gameUserListVO.setCpName(cpMap.get(gameDTO.getCpId()));
+            gameUserListVO.setGameCategoryId(gameDTO.getCategory());
+            gameUserListVO.setGameCategoryName(categoryMap.get(gameDTO.getCategory()));
         }
         return gameUserListVO;
     }

+ 48 - 0
game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/PromoAccountServiceImpl.java

@@ -0,0 +1,48 @@
+package com.zanxiang.manage.service.Impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.common.utils.bean.BeanUtils;
+import com.zanxiang.manage.domain.vo.PromoAccountChoiceVO;
+import com.zanxiang.manage.domain.vo.PromoPitcherChoiceVO;
+import com.zanxiang.manage.service.PromoAccountService;
+import com.zanxiang.mybatis.entity.PromoAccount;
+import com.zanxiang.mybatis.mapper.PromoAccountMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author : lingfeng
+ * @time : 2022-11-03
+ * @description : 推广账号
+ */
+@Slf4j
+@Service
+public class PromoAccountServiceImpl extends ServiceImpl<PromoAccountMapper, PromoAccount> implements PromoAccountService {
+
+    /**
+     * 推广账号选择列表查询
+     *
+     * @return : 返回所有推广账号信息
+     */
+    @Override
+    public List<PromoAccountChoiceVO> promoAccountChoiceList() {
+        List<PromoAccount> promoAccountList = super.list(new LambdaQueryWrapper<PromoAccount>().
+                select(PromoAccount::getAccount, PromoAccount::getName));
+        return BeanUtils.copyList(promoAccountList, PromoAccountChoiceVO.class);
+    }
+
+    /**
+     * 投手选择列表查询
+     *
+     * @return : 返回所有投手信息
+     */
+    @Override
+    public List<PromoPitcherChoiceVO> promoPitcherChoiceList() {
+        List<PromoAccount> promoAccountList = super.list(new LambdaQueryWrapper<PromoAccount>().
+                select(PromoAccount::getPitcherId, PromoAccount::getPitcherName));
+        return BeanUtils.copyList(promoAccountList, PromoPitcherChoiceVO.class);
+    }
+}

+ 35 - 0
game-module/game-manage/src/main/java/com/zanxiang/manage/service/Impl/PromoChannelServiceImpl.java

@@ -0,0 +1,35 @@
+package com.zanxiang.manage.service.Impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.common.utils.bean.BeanUtils;
+import com.zanxiang.manage.domain.vo.PromoChannelChoiceVO;
+import com.zanxiang.manage.service.PromoChannelService;
+import com.zanxiang.mybatis.entity.PromoChannel;
+import com.zanxiang.mybatis.mapper.PromoChannelMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author : lingfeng
+ * @time : 2022-10-31
+ * @description : 推广渠道
+ */
+@Slf4j
+@Service
+public class PromoChannelServiceImpl extends ServiceImpl<PromoChannelMapper, PromoChannel> implements PromoChannelService {
+
+    /**
+     * 注册渠道选择列表查询
+     *
+     * @return : 返回所有注册渠道信息
+     */
+    @Override
+    public List<PromoChannelChoiceVO> promoChannelChoiceList() {
+        List<PromoChannel> promoChannelList = super.list(new LambdaQueryWrapper<PromoChannel>().
+                select(PromoChannel::getId, PromoChannel::getChannel));
+        return BeanUtils.copyList(promoChannelList, PromoChannelChoiceVO.class);
+    }
+}

+ 30 - 0
game-module/game-manage/src/main/java/com/zanxiang/manage/service/PromoAccountService.java

@@ -0,0 +1,30 @@
+package com.zanxiang.manage.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.manage.domain.vo.PromoAccountChoiceVO;
+import com.zanxiang.manage.domain.vo.PromoPitcherChoiceVO;
+import com.zanxiang.mybatis.entity.PromoAccount;
+
+import java.util.List;
+
+/**
+ * @author : lingfeng
+ * @time : 2022-11-04
+ * @description : 推广账号
+ */
+public interface PromoAccountService extends IService<PromoAccount> {
+
+    /**
+     * 推广账号选择列表查询
+     *
+     * @return : 返回所有推广账号信息
+     */
+    List<PromoAccountChoiceVO> promoAccountChoiceList();
+
+    /**
+     * 投手选择列表查询
+     *
+     * @return : 返回所有投手信息
+     */
+    List<PromoPitcherChoiceVO> promoPitcherChoiceList();
+}

+ 22 - 0
game-module/game-manage/src/main/java/com/zanxiang/manage/service/PromoChannelService.java

@@ -0,0 +1,22 @@
+package com.zanxiang.manage.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.manage.domain.vo.PromoChannelChoiceVO;
+import com.zanxiang.mybatis.entity.PromoChannel;
+
+import java.util.List;
+
+/**
+ * @author : lingfeng
+ * @time : 2022-10-31
+ * @description : 推广渠道
+ */
+public interface PromoChannelService extends IService<PromoChannel> {
+
+    /**
+     * 注册渠道选择列表查询
+     *
+     * @return : 返回所有注册渠道信息
+     */
+    List<PromoChannelChoiceVO> promoChannelChoiceList();
+}