Parcourir la source

Merge remote-tracking branch 'origin/package' into package

shishaosong il y a 1 an
Parent
commit
192b446278
100 fichiers modifiés avec 1206 ajouts et 1292 suppressions
  1. 7 0
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/ServerInfo.java
  2. 0 64
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/base/BasePage.java
  3. 0 79
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/domain/ResultMap.java
  4. 0 111
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/domain/ResultVO.java
  5. 0 39
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/AppletStoreEnum.java
  6. 0 33
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/MaxPayLock.java
  7. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/BanStatusEnum.java
  8. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/CpStatusEnum.java
  9. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/DeleteEnum.java
  10. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/HttpStatusEnum.java
  11. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/OsEnum.java
  12. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PayApplicationTypeEnum.java
  13. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PayDeviceEnum.java
  14. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PayWayEnum.java
  15. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PromoAccountTypeEnum.java
  16. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PromoMediaTypeEnum.java
  17. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PromoProviderEnum.java
  18. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/StatusEnum.java
  19. 0 144
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/utils/BeanUtils.java
  20. 0 97
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/utils/StringUtils.java
  21. 0 149
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/utils/URIUtil.java
  22. 9 3
      game-module/game-module-manage/pom.xml
  23. 7 8
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/ManageApplication.java
  24. 54 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/AgentController.java
  25. 37 20
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/ChoiceController.java
  26. 4 4
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/CpController.java
  27. 5 5
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GameAppletController.java
  28. 12 12
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GameController.java
  29. 5 5
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GamePayStrategyController.java
  30. 5 5
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GamePayWayController.java
  31. 3 3
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GamePictureController.java
  32. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GameTagController.java
  33. 5 10
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/OrderController.java
  34. 3 3
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/OssController.java
  35. 6 6
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PayApplicationController.java
  36. 5 5
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PayBoxController.java
  37. 6 6
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PayMerchantController.java
  38. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PromoAccountController.java
  39. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PromoChannelController.java
  40. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PromoMediaController.java
  41. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PromoSiteController.java
  42. 6 6
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/UserBanController.java
  43. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/UserController.java
  44. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/FileTypeEnum.java
  45. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/GameCategoryEnum.java
  46. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/GameStatusEnum.java
  47. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/GameStrategyTypeEnum.java
  48. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/VipLevelEnum.java
  49. 82 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/AgentDTO.java
  50. 0 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/AgentListDTO.java
  51. 31 41
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/UserDTO.java
  52. 27 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/enums/AccountTypeEnum.java
  53. 55 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/AgentAddParam.java
  54. 74 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/AgentListParam.java
  55. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/CpListParam.java
  56. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameListParam.java
  57. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GamePayStrategyListParam.java
  58. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GamePayWayListParam.java
  59. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameTagListParam.java
  60. 20 26
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameUserListParam.java
  61. 18 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameUserRoleListParam.java
  62. 22 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/IpBanListParam.java
  63. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/LogPayCpParam.java
  64. 18 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/OrderParam.java
  65. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PayApplicationListParam.java
  66. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PayBoxListParam.java
  67. 2 3
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PayMerchantListParam.java
  68. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PromoAccountListParam.java
  69. 22 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PromoChannelListParam.java
  70. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PromoMediaListParam.java
  71. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PromoSiteListParam.java
  72. 18 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserBanListParam.java
  73. 18 8
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserListParam.java
  74. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserLoginLogParam.java
  75. 22 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserNameAuthListParam.java
  76. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserOrderListParam.java
  77. 64 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/AgentVO.java
  78. 4 28
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameUserListVO.java
  79. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameUserRoleListVO.java
  80. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameUserRoleVO.java
  81. 5 14
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/OrderVO.java
  82. 9 51
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/UserListVO.java
  83. 3 9
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/UserVO.java
  84. 54 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IAgentService.java
  85. 11 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IGameAppletService.java
  86. 2 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IGameService.java
  87. 0 8
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IGameUserService.java
  88. 0 8
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IOrderService.java
  89. 1 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IUserService.java
  90. 0 127
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/api/MiniAppletApiService.java
  91. 180 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/AgentServiceImpl.java
  92. 6 6
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/CpServiceImpl.java
  93. 112 7
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameAppletServiceImpl.java
  94. 8 5
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameCategoryServiceImpl.java
  95. 5 5
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePayStrategyServiceImpl.java
  96. 10 8
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePayWayServiceImpl.java
  97. 3 3
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePictureServiceImpl.java
  98. 28 18
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameServiceImpl.java
  99. 9 9
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameTagServiceImpl.java
  100. 29 19
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameUserRoleServiceImpl.java

+ 7 - 0
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/ServerInfo.java

@@ -0,0 +1,7 @@
+package com.zanxiang.game.module.base;
+
+public class ServerInfo {
+
+    public static final String SERVER_NAME = "game-module";
+    public static final String SERVER_DUBBO_NAME = "game-module-dubbo";
+}

+ 0 - 64
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/base/BasePage.java

@@ -1,64 +0,0 @@
-package com.zanxiang.game.module.base.base;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import java.time.LocalDate;
-
-/**
- * @author : lingfeng
- * @time : 2022-06-22
- * @description : 分页通用参数
- */
-@Data
-public class BasePage<T> {
-
-    /**
-     * 当前记录起始索引
-     */
-    @NotNull(message = "当前页数不可为空")
-    @Min(value = 1, message = "起始页最小为 1")
-    @ApiModelProperty(value = "当前记录起始索引")
-    private Integer pageNum;
-
-    /**
-     * 每页显示记录数
-     */
-    @NotNull(message = "单页数量不可为空")
-    @Min(value = 1, message = "页面大小(2~200)之间")
-    @Max(value = 200, message = "页面大小(2~200)之间")
-    @ApiModelProperty(value = "每页显示记录数")
-    private Integer pageSize;
-
-    /**
-     * 开始时间
-     */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    @ApiModelProperty(value = "开始时间")
-    private LocalDate beginDate;
-
-    /**
-     * 结束时间
-     */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    @ApiModelProperty(value = "结束时间")
-    private LocalDate endDate;
-
-    /**
-     * 构造方法
-     *
-     * @return : 返回分页对象
-     */
-    public IPage<T> toPage() {
-        return new Page<>(pageNum, pageSize);
-    }
-}

+ 0 - 79
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/domain/ResultMap.java

@@ -1,79 +0,0 @@
-package com.zanxiang.game.module.base.domain;
-
-import com.zanxiang.game.module.base.enums.HttpStatusEnum;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 返回对象
- *
- * @author xufeng
- * @date 2022/6/9 10:41
- */
-public class ResultMap extends HashMap<String, Object> {
-
-    private static final long serialVersionUID = 1L;
-
-    public ResultMap() {
-        put("code", 0);
-    }
-
-    public static ResultMap error() {
-        return error(500, "未知异常,请联系管理员");
-    }
-
-    public static ResultMap error(String msg) {
-        return error(500, msg);
-    }
-
-    public static ResultMap error(int code, String msg) {
-        ResultMap r = new ResultMap();
-        r.put("code", code);
-        r.put("msg", msg);
-        return r;
-    }
-
-    public static ResultMap ok() {
-        ResultMap r = new ResultMap();
-        r.put("code", HttpStatusEnum.SUCCESS.getCode());
-        r.put("msg", HttpStatusEnum.SUCCESS.getMsg());
-        return r;
-    }
-
-    public static ResultMap ok(Object data) {
-        ResultMap r = new ResultMap();
-        r.put("code", HttpStatusEnum.SUCCESS.getCode());
-        r.put("msg", HttpStatusEnum.SUCCESS.getMsg());
-        r.put("data", data);
-        return r;
-    }
-
-    public static ResultMap ok(Long deviceType, Object data, String orderId) {
-        ResultMap r = new ResultMap();
-        r.put("code", HttpStatusEnum.SUCCESS.getCode());
-        r.put("msg", HttpStatusEnum.SUCCESS.getMsg());
-        HashMap<String, Object> dataMap = new HashMap<>(2);
-        dataMap.put("data", data);
-        dataMap.put("deviceType", deviceType);
-        dataMap.put("orderId", orderId);
-        r.put("data", dataMap);
-        return r;
-    }
-
-    public static ResultMap ok(Map<String, Object> map) {
-        ResultMap r = new ResultMap();
-        r.put("code", HttpStatusEnum.SUCCESS.getCode());
-        r.put("msg", HttpStatusEnum.SUCCESS.getMsg());
-        HashMap<String, Object> dataMap = new HashMap<>(2);
-        dataMap.putAll(map);
-        r.put("data", dataMap);
-        return r;
-    }
-
-    @Override
-    public ResultMap put(String key, Object value) {
-        super.put(key, value);
-        return this;
-    }
-}

+ 0 - 111
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/domain/ResultVO.java

@@ -1,111 +0,0 @@
-package com.zanxiang.game.module.base.domain;
-
-import com.zanxiang.game.module.base.enums.HttpStatusEnum;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-/**
- * @author : lingfeng
- * @time : 2022-06-07
- * @description : http响应消息
- */
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class ResultVO<T> implements Serializable {
-
-    /**
-     * 序列化
-     */
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 错误码
-     */
-    private Integer code;
-
-    /**
-     * 错误信息
-     */
-    private String msg;
-
-    /**
-     * 返回内容
-     */
-    private T data;
-
-    /**
-     * 错误消息返回构造
-     *
-     * @param httpStatusEnum : http响应消息枚举
-     */
-    public ResultVO(HttpStatusEnum httpStatusEnum) {
-        this.code = httpStatusEnum.getCode();
-        this.msg = httpStatusEnum.getMsg();
-    }
-
-    /**
-     * 默认返回成功构造
-     *
-     * @param data : 返回的内容
-     */
-    public ResultVO(T data) {
-        this.code = HttpStatusEnum.SUCCESS.getCode();
-        this.msg = HttpStatusEnum.SUCCESS.getMsg();
-        this.data = data;
-    }
-
-    /**
-     * 消息返回构造
-     *
-     * @param httpStatusEnum : http响应消息枚举
-     * @param data           : 返回的内容
-     */
-    public ResultVO(HttpStatusEnum httpStatusEnum, T data) {
-        this.code = httpStatusEnum.getCode();
-        this.msg = httpStatusEnum.getMsg();
-        this.data = data;
-    }
-
-    /**
-     * 自定义消息异常
-     *
-     * @param code : 错误码
-     * @param msg  : 错误消息
-     */
-    public ResultVO(int code, String msg) {
-        this.code = code;
-        this.msg = msg;
-    }
-
-    /**
-     * 判断是否成功
-     */
-    public boolean isSuccess() {
-        return Objects.equals(HttpStatusEnum.SUCCESS.getCode(), this.code);
-    }
-
-    public static <T> ResultVO<T> fail(String msg) {
-        return new ResultVO<>(HttpStatusEnum.ERROR.getCode(), msg);
-    }
-
-    public static <T> ResultVO<T> ok(int code, String msg, T data) {
-        return new ResultVO<>(code, msg, data);
-    }
-
-    public static <T> ResultVO<T> ok(int code, String msg) {
-        return new ResultVO<>(code, msg);
-    }
-
-    public static <T> ResultVO<T> ok() {
-        return new ResultVO<>(HttpStatusEnum.SUCCESS.getCode(), HttpStatusEnum.SUCCESS.getMsg());
-    }
-
-    public static <T> ResultVO<T> ok(T data) {
-        return new ResultVO<>(HttpStatusEnum.SUCCESS.getCode(), HttpStatusEnum.SUCCESS.getMsg(), data);
-    }
-}

+ 0 - 39
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/AppletStoreEnum.java

@@ -1,39 +0,0 @@
-package com.zanxiang.game.module.base.enums;
-
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * @author : lingfeng
- * @time : 2023-01-15
- * @description : 商城小程序枚举类型
- */
-@Getter
-@AllArgsConstructor
-public enum AppletStoreEnum {
-
-    /**
-     * 商城百货
-     */
-    STORE_GOODS(1, "商城百货"),
-
-    /**
-     * 商城美妆
-     */
-    STORE_BEAUTY(2, "商城美妆"),
-
-    /**
-     * 商城内容
-     */
-    STORE_CONTENT(3, "商城内容");
-
-    /**
-     * 账号类型
-     */
-    private Integer type;
-
-    /**
-     * 账号类型名称
-     */
-    private String name;
-}

+ 0 - 33
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/MaxPayLock.java

@@ -1,33 +0,0 @@
-package com.zanxiang.game.module.base.enums;
-
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-/**
- * @author xufeng
- * @date 2022/6/13 13:39
- */
-@Getter
-@AllArgsConstructor
-public enum MaxPayLock {
-
-    /**
-     * 已锁定
-     */
-    LOCK(1, "已锁定"),
-
-    /**
-     * 未锁定
-     */
-    UNLOCK(0, "未锁定");
-
-    /**
-     * 状态
-     */
-    private Integer code;
-
-    /**
-     * 描述
-     */
-    private String name;
-}

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/BanStatusEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/BanStatusEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/CpStatusEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/CpStatusEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/DeleteEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/DeleteEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/HttpStatusEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/HttpStatusEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/OsEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/OsEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/PayApplicationTypeEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PayApplicationTypeEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/PayDeviceEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PayDeviceEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/PayWayEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PayWayEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/PromoAccountTypeEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PromoAccountTypeEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/PromoMediaTypeEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PromoMediaTypeEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/PromoProviderEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PromoProviderEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/StatusEnum.java → game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/StatusEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.base.pojo.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 0 - 144
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/utils/BeanUtils.java

@@ -1,144 +0,0 @@
-package com.zanxiang.game.module.base.utils;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Bean 工具类
- *
- * @author ruoyi
- */
-public class BeanUtils extends org.springframework.beans.BeanUtils {
-    /**
-     * Bean方法名中属性名开始的下标
-     */
-    private static final int BEAN_METHOD_PROP_INDEX = 3;
-
-    /**
-     * 匹配getter方法的正则表达式
-     */
-    private static final Pattern GET_PATTERN = Pattern.compile("get(\\p{javaUpperCase}\\w*)");
-
-    /**
-     * 匹配setter方法的正则表达式
-     */
-    private static final Pattern SET_PATTERN = Pattern.compile("set(\\p{javaUpperCase}\\w*)");
-
-    /**
-     * 对象浅拷贝
-     *
-     * @param source
-     * @param target
-     * @param <T>
-     * @return
-     */
-    public static <T> T copy(Object source, Class<T> target) {
-        if (source == null) {
-            return null;
-        }
-        T obj = instantiateClass(target);
-        copyProperties(source, obj);
-        return obj;
-    }
-
-    /**
-     * 对象浅拷贝
-     *
-     * @param sourceList
-     * @param target
-     * @param <T>
-     * @return
-     */
-    public static <T> List<T> copyList(Collection sourceList, Class<T> target) {
-        if (sourceList == null || sourceList.isEmpty()) {
-            return Collections.emptyList();
-        }
-        List<T> objs = new ArrayList<>(sourceList.size());
-        for (Object source : sourceList) {
-            objs.add(copy(source, target));
-        }
-        return objs;
-    }
-
-    /**
-     * 获取对象的setter方法。
-     *
-     * @param obj 对象
-     * @return 对象的setter方法列表
-     */
-    public static List<Method> getSetterMethods(Object obj) {
-        // setter方法列表
-        List<Method> setterMethods = new ArrayList<Method>();
-
-        // 获取所有方法
-        Method[] methods = obj.getClass().getMethods();
-
-        // 查找setter方法
-
-        for (Method method : methods) {
-            Matcher m = SET_PATTERN.matcher(method.getName());
-            if (m.matches() && (method.getParameterTypes().length == 1)) {
-                setterMethods.add(method);
-            }
-        }
-        // 返回setter方法列表
-        return setterMethods;
-    }
-
-    /**
-     * 获取对象的getter方法。
-     *
-     * @param obj 对象
-     * @return 对象的getter方法列表
-     */
-
-    public static List<Method> getGetterMethods(Object obj) {
-        // getter方法列表
-        List<Method> getterMethods = new ArrayList<Method>();
-        // 获取所有方法
-        Method[] methods = obj.getClass().getMethods();
-        // 查找getter方法
-        for (Method method : methods) {
-            Matcher m = GET_PATTERN.matcher(method.getName());
-            if (m.matches() && (method.getParameterTypes().length == 0)) {
-                getterMethods.add(method);
-            }
-        }
-        // 返回getter方法列表
-        return getterMethods;
-    }
-
-    /**
-     * 检查Bean方法名中的属性名是否相等。<br>
-     * 如getName()和setName()属性名一样,getName()和setAge()属性名不一样。
-     *
-     * @param m1 方法名1
-     * @param m2 方法名2
-     * @return 属性名一样返回true,否则返回false
-     */
-
-    public static boolean isMethodPropEquals(String m1, String m2) {
-        return m1.substring(BEAN_METHOD_PROP_INDEX).equals(m2.substring(BEAN_METHOD_PROP_INDEX));
-    }
-
-    /**
-     * 将对象转为map
-     *
-     * @param obj
-     * @return
-     */
-    public static Map<String, String> parseObj2Map(Object obj) throws IllegalAccessException {
-        Map<String, String> map = new HashMap();
-        Field[] declaredFields = obj.getClass().getDeclaredFields();
-        for (Field field : declaredFields) {
-            field.setAccessible(true);
-            if (Objects.nonNull(field.get(obj))) {
-                map.put(field.getName(), field.get(obj).toString());
-            }
-        }
-        return map;
-    }
-}

+ 0 - 97
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/utils/StringUtils.java

@@ -1,97 +0,0 @@
-package com.zanxiang.game.module.base.utils;
-
-import org.apache.commons.lang3.ArrayUtils;
-
-import java.util.Collection;
-import java.util.Map;
-
-/**
- * 字符串工具类
- *
- * @author ruoyi
- */
-public class StringUtils extends org.apache.commons.lang3.StringUtils {
-
-    /**
-     * 空字符串
-     */
-    private static final String NULLSTR = "";
-
-    /**
-     * * 判断一个Collection是否为空, 包含List,Set,Queue
-     *
-     * @param coll 要判断的Collection
-     * @return true:为空 false:非空
-     */
-    public static boolean isEmpty(Collection<?> coll) {
-        return isNull(coll) || coll.isEmpty();
-    }
-
-    /**
-     * * 判断一个对象数组是否为空
-     *
-     * @param objects 要判断的对象数组
-     *                * @return true:为空 false:非空
-     */
-    public static boolean isEmpty(Object[] objects) {
-        return isNull(objects) || (objects.length == 0);
-    }
-
-    /**
-     * * 判断一个Map是否为空
-     *
-     * @param map 要判断的Map
-     * @return true:为空 false:非空
-     */
-    public static boolean isEmpty(Map<?, ?> map) {
-        return isNull(map) || map.isEmpty();
-    }
-
-    /**
-     * * 判断一个字符串是否为空串
-     *
-     * @param str String
-     * @return true:为空 false:非空
-     */
-    public static boolean isEmpty(String str) {
-        return isNull(str) || NULLSTR.equals(str.trim());
-    }
-
-    /**
-     * * 判断一个字符串是否为非空串
-     *
-     * @param str String
-     * @return true:非空串 false:空串
-     */
-    public static boolean isNotEmpty(String str) {
-        return !isEmpty(str);
-    }
-
-    /**
-     * * 判断一个对象是否为空
-     *
-     * @param object Object
-     * @return true:为空 false:非空
-     */
-    public static boolean isNull(Object object) {
-        return object == null;
-    }
-
-    /**
-     * 判断数组里的字符串是否存在空值
-     *
-     * @param css : 需要判断的参数
-     * @return : 返回判断结果
-     */
-    public static boolean isAnyEmpty(final String... css) {
-        if (ArrayUtils.isEmpty(css)) {
-            return false;
-        }
-        for (final String cs : css) {
-            if (isEmpty(cs)) {
-                return true;
-            }
-        }
-        return false;
-    }
-}

+ 0 - 149
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/utils/URIUtil.java

@@ -1,149 +0,0 @@
-package com.zanxiang.game.module.base.utils;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.util.Assert;
-
-import java.io.UnsupportedEncodingException;
-import java.net.InetSocketAddress;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-import java.util.Map;
-
-/**
- * @Author wcc
- * @Date 2020/12/28 11:36
- * @Version 1.0
- * @Description
- */
-@Slf4j
-public class URIUtil {
-
-    /**
-     * 填充 url的请求参数,如果 params的值为空,不会写在 url上
-     *
-     * @param url
-     * @param params
-     * @return
-     */
-    public static String fillUrlParams(String url, Map<String, String> params, boolean ignoreBlank) {
-        if (params == null || params.isEmpty()) {
-            return url;
-        }
-        boolean first = !url.contains("?");
-        StringBuilder urlBuilder = new StringBuilder(url);
-        for (Map.Entry<String, String> param : params.entrySet()) {
-            if (ignoreBlank && StringUtils.isBlank(param.getValue())) {
-                continue;
-            }
-            if (first) {
-                urlBuilder.append("?");
-                first = false;
-            } else {
-                urlBuilder.append("&");
-            }
-            urlBuilder.append(param.getKey()).append("=").append(StringUtils.isBlank(param.getValue()) ? "" : param.getValue());
-        }
-        url = urlBuilder.toString();
-        return url;
-    }
-
-    /**
-     * 对应 js中的 encodeURIComponent
-     *
-     * @param uri
-     * @return
-     */
-    public static String encodeURIComponent(String uri) {
-        return encodeURIComponent(uri, "UTF-8");
-    }
-
-    /**
-     * 对应 js中的 encodeURIComponent
-     *
-     * @param uri
-     * @return
-     */
-    public static String encodeURIComponent(String uri, String enc) {
-        try {
-            return URLEncoder.encode(uri, enc)
-                    .replaceAll("\\+", "%20")
-                    .replaceAll("\\!", "%21")
-                    .replaceAll("\\'", "%27")
-                    .replaceAll("\\(", "%28")
-                    .replaceAll("\\)", "%29")
-                    .replaceAll("\\~", "%7E");
-        } catch (UnsupportedEncodingException e) {
-            log.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    /**
-     * 对应 js的 decodeURIComponent
-     *
-     * @param uri
-     * @return
-     */
-    public static String decodeURIComponent(String uri) {
-        return decodeURIComponent(uri, "UTF-8");
-    }
-
-    /**
-     * 对应 js的 decodeURIComponent
-     *
-     * @param uri
-     * @return
-     */
-    public static String decodeURIComponent(String uri, String enc) {
-        try {
-            return URLDecoder.decode(uri.replaceAll("%20", "+")
-                    .replaceAll("%21", "!")
-                    .replaceAll("%27", "'")
-                    .replaceAll("%28", "(")
-                    .replaceAll("%29", ")")
-                    .replaceAll("%7E", "~"), enc);
-        } catch (UnsupportedEncodingException e) {
-            log.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static InetSocketAddress parseURI(String uri, int defaultPort) {
-        Assert.notNull(uri, "uri must not be null");
-        String host;
-        String portString = null;
-
-        int colonPos = uri.indexOf(':');
-        if (colonPos >= 0 && uri.indexOf(':', colonPos + 1) == -1) {
-            // Exactly 1 colon. Split into host:port.
-            host = uri.substring(0, colonPos);
-            portString = uri.substring(colonPos + 1);
-        } else {
-            // 0 or 2+ colons. Bare hostname or IPv6 literal.
-            host = uri;
-        }
-
-        int port = defaultPort;
-        if (StringUtils.isNotBlank(portString)) {
-            // Try to parse the whole port string as a number.
-            Assert.isTrue(!portString.startsWith("+"), String.format("Cannot parse port number: %s", uri));
-            try {
-                port = Integer.parseInt(portString);
-            } catch (NumberFormatException e) {
-                throw new IllegalArgumentException(String.format("Cannot parse port number: %s", uri));
-            }
-
-            Assert.isTrue(isValidPort(port), String.format("Port number out of range: %s", uri));
-        }
-
-        return InetSocketAddress.createUnresolved(host, port);
-    }
-
-    /**
-     * @param port the port number
-     * @return {@literal true} for valid port numbers.
-     */
-    private static boolean isValidPort(int port) {
-        return port >= 0 && port <= 65535;
-    }
-}

+ 9 - 3
game-module/game-module-manage/pom.xml

@@ -97,10 +97,16 @@
             <groupId>org.apache.dubbo</groupId>
             <artifactId>dubbo-metadata-definition-protobuf</artifactId>
         </dependency>
-        <!-- 头条回传api -->
+        <!-- 腾讯广告服务 -->
         <dependency>
-            <groupId>com.zanxiang.advertising.oceanengine</groupId>
-            <artifactId>advertising-oceanengine-track-base</artifactId>
+            <groupId>com.zanxiang.advertising.tencent</groupId>
+            <artifactId>advertising-tencent-base</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <!-- 广告回传 -->
+        <dependency>
+            <groupId>com.zanxiang.game</groupId>
+            <artifactId>game-back-base</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>

+ 7 - 8
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/ManageApplication.java

@@ -21,14 +21,13 @@ public class ManageApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功_0003 ( ´・・)ノ(._.`) \n" +
-                " ______  __     __     \n" +
-                "/_____/\\/__/\\ /__/\\    \n" +
-                "\\:::__\\/\\ \\::\\\\:.\\ \\   \n" +
-                "   /: /  \\_\\::_\\:_\\/   \n" +
-                "  /::/___  _\\/__\\_\\_/\\ \n" +
-                " /_:/____/\\\\ \\ \\ \\::\\ \\\n" +
-                " \\_______\\/ \\_\\/  \\__\\/\n");
+        System.out.println("赞象Manage服务启动成功 ( ´・・)ノ(._.`) \n" +
+                "___  ___  ___   _   _   ___  _____  _____ \n" +
+                "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
+                "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +
+                "| |\\/| ||  _  || . ` ||  _  | | __ |  __| \n" +
+                "| |  | || | | || |\\  || | | | |_\\ \\| |___ \n" +
+                "\\_|  |_/\\_| |_/\\_| \\_/\\_| |_/\\____/\\____/ \n");
     }
 
 }

+ 54 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/AgentController.java

@@ -0,0 +1,54 @@
+package com.zanxiang.game.module.manage.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.zanxiang.erp.security.annotation.PreAuthorize;
+import com.zanxiang.game.module.manage.pojo.params.AgentAddParam;
+import com.zanxiang.game.module.manage.pojo.params.AgentListParam;
+import com.zanxiang.game.module.manage.pojo.vo.AgentVO;
+import com.zanxiang.game.module.manage.service.IAgentService;
+import com.zanxiang.module.util.pojo.ResultVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/agent")
+public class AgentController {
+
+    @Autowired
+    private IAgentService agentService;
+
+    @PreAuthorize(permissionKey = "sdk:agent:list")
+    @PostMapping("/list")
+    public ResultVO<IPage<AgentVO>> listOfPage(@Validated @RequestBody AgentListParam dto) {
+        return ResultVO.ok(agentService.listOfPage(dto));
+    }
+
+    @PreAuthorize(permissionKey = "sdk:agent:add")
+    @PostMapping
+    public ResultVO<Boolean> add(AgentAddParam dto) {
+        return ResultVO.ok(agentService.add(dto));
+    }
+
+
+    @PreAuthorize(permissionKey = "sdk:agent:configPutStatus")
+    @PutMapping("/configPutStatus/{agentIds}/{putStatus}")
+    public ResultVO<Boolean> configPutStatus(@PathVariable("agentIds") List<Long> agentIds, @PathVariable("putStatus") Integer putStatus) {
+        return ResultVO.ok(agentService.configPutStatus(agentIds, putStatus));
+    }
+
+    @PreAuthorize(permissionKey = "sdk:agent:configBackPolicy")
+    @PutMapping("/configBackPolicy/{agentIds}/{backPolicyId}")
+    public ResultVO<Boolean> configBackPolicy(@PathVariable("agentIds") List<Long> agentIds, @PathVariable("backPolicyId") Long backPolicyId) {
+        return ResultVO.ok(agentService.configBackPolicy(agentIds, backPolicyId));
+    }
+}

+ 37 - 20
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/ChoiceController.java

@@ -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()));
     }
 }

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

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.CpAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.CpListParam;
 import com.zanxiang.game.module.manage.pojo.vo.CpVO;
 import com.zanxiang.game.module.manage.service.ICpService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -35,7 +35,7 @@ public class CpController {
     @PreAuthorize(permissionKey = "sdk:cp:addOrUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> addOrUpdate(@Validated @RequestBody CpAddUpdateParam param) {
-        return new ResultVO<>(cpService.addOrUpdate(param));
+        return ResultVO.ok(cpService.addOrUpdate(param));
     }
 
     @ApiOperation(value = "cp列表查询")
@@ -43,7 +43,7 @@ public class CpController {
     @PreAuthorize(permissionKey = "sdk:cp:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = CpVO.class)})
     public ResultVO<IPage<CpVO>> list(@Validated @RequestBody CpListParam param) {
-        return new ResultVO<>(cpService.list(param));
+        return ResultVO.ok(cpService.list(param));
     }
 
     @ApiOperation(value = "cp删除")
@@ -51,6 +51,6 @@ public class CpController {
     @PreAuthorize(permissionKey = "sdk:cp:delete")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> deleteById(@RequestParam Long id) {
-        return new ResultVO<>(cpService.deleteById(id));
+        return ResultVO.ok(cpService.deleteById(id));
     }
 }

+ 5 - 5
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GameAppletController.java

@@ -1,10 +1,10 @@
 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.manage.pojo.params.GameAccountUpdateParam;
 import com.zanxiang.game.module.manage.pojo.vo.GameAccountVO;
 import com.zanxiang.game.module.manage.service.IGameAppletService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -33,7 +33,7 @@ public class GameAppletController {
     @PreAuthorize(permissionKey = "sdk:gameApplet:info")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameAccountVO.class)})
     public ResultVO<GameAccountVO> getGameAccount(@RequestParam Long id) {
-        return new ResultVO<>(gameAppletService.getGameAccount(id));
+        return ResultVO.ok(gameAppletService.getGameAccount(id));
     }
 
     @ApiOperation(value = "账号信息配置添加或者更新")
@@ -41,14 +41,14 @@ public class GameAppletController {
     @PreAuthorize(permissionKey = "sdk:gameApplet:addOrUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> gameAccountAddOrUpdate(@Validated @RequestBody GameAccountUpdateParam param) {
-        return new ResultVO<>(gameAppletService.gameAccountAddOrUpdate(param));
+        return ResultVO.ok(gameAppletService.gameAccountAddOrUpdate(param));
     }
 
     @ApiOperation(value = "获取小游戏二维码")
     @GetMapping(value = "/qr/code")
     @PreAuthorize(permissionKey = "sdk:gameApplet:qrCode")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = String.class)})
-    public ResultVO<String> getQrCode(@RequestParam Long gameId) {
-        return new ResultVO<>(gameAppletService.getQrCod(gameId));
+    public ResultVO<String> getQrCodByGameId(@RequestParam Long gameId) {
+        return ResultVO.ok(gameAppletService.getQrCodByGameId(gameId));
     }
 }

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

@@ -2,13 +2,13 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.*;
 import com.zanxiang.game.module.manage.pojo.vo.GameDockVO;
 import com.zanxiang.game.module.manage.pojo.vo.GameInfoVO;
 import com.zanxiang.game.module.manage.pojo.vo.GameListVO;
 import com.zanxiang.game.module.manage.pojo.vo.GameRelationVO;
 import com.zanxiang.game.module.manage.service.IGameService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -37,7 +37,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:add")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameListVO.class)})
     public ResultVO<Boolean> gameAddOrUpdate(@Validated @RequestBody GameAddParam param) {
-        return new ResultVO<>(gameService.gameAddOrUpdate(param));
+        return ResultVO.ok(gameService.gameAddOrUpdate(param));
     }
 
     @ApiOperation(value = "游戏基本信息查询")
@@ -45,7 +45,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:detailInfo")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameInfoVO.class)})
     public ResultVO<GameInfoVO> getGameInfo(@RequestParam Long id) {
-        return new ResultVO<>(gameService.getGameInfo(id));
+        return ResultVO.ok(gameService.getGameInfo(id));
     }
 
     @ApiOperation(value = "游戏基本信息更新")
@@ -53,7 +53,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:detailUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> gameUpdate(@Validated @RequestBody GameUpdateParam param) {
-        return new ResultVO<>(gameService.updateGameInfo(param));
+        return ResultVO.ok(gameService.updateGameInfo(param));
     }
 
     @ApiOperation(value = "游戏对接参数获取展示")
@@ -61,7 +61,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:dockInfo")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameDockVO.class)})
     public ResultVO<GameDockVO> getGameDock(@RequestParam Long id) {
-        return new ResultVO<>(gameService.getGameDock(id));
+        return ResultVO.ok(gameService.getGameDock(id));
     }
 
     @ApiOperation(value = "游戏对接参数更新更新")
@@ -69,7 +69,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:dockUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> gameDockUpdate(@Validated @RequestBody GameDockParam param) {
-        return new ResultVO<>(gameService.gameDockUpdate(param));
+        return ResultVO.ok(gameService.gameDockUpdate(param));
     }
 
     @ApiOperation(value = "获取游戏关联信息")
@@ -77,7 +77,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:relationInfo")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameRelationVO.class)})
     public ResultVO<GameRelationVO> getGameRelation(@RequestParam Long id) {
-        return new ResultVO<>(gameService.getGameRelation(id));
+        return ResultVO.ok(gameService.getGameRelation(id));
     }
 
     @ApiOperation(value = "关联游戏更新")
@@ -85,7 +85,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:relationUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> relationGameUpdate(@Validated @RequestBody RelationGameUpdateParam param) {
-        return new ResultVO<>(gameService.relationGameUpdate(param));
+        return ResultVO.ok(gameService.relationGameUpdate(param));
     }
 
     @ApiOperation(value = "导量游戏更新")
@@ -93,7 +93,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:guideUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameListVO.class)})
     public ResultVO<Boolean> guideGameUpdateUpdate(@Validated @RequestBody GuideGameUpdateParam param) {
-        return new ResultVO<>(gameService.guideGameUpdateUpdate(param));
+        return ResultVO.ok(gameService.guideGameUpdateUpdate(param));
     }
 
     @ApiOperation(value = "游戏列表查询")
@@ -101,7 +101,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameListVO.class)})
     public ResultVO<IPage<GameListVO>> gameList(@Validated @RequestBody GameListParam param) {
-        return new ResultVO<>(gameService.gameList(param));
+        return ResultVO.ok(gameService.gameList(param));
     }
 
     @ApiOperation(value = "删除游戏")
@@ -109,7 +109,7 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:delete")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameListVO.class)})
     public ResultVO<Boolean> deleteById(@RequestParam Long id) {
-        return new ResultVO<>(gameService.deleteById(id));
+        return ResultVO.ok(gameService.deleteById(id));
     }
 
     @ApiOperation(value = "游戏状态变更")
@@ -117,6 +117,6 @@ public class GameController {
     @PreAuthorize(permissionKey = "sdk:game:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameListVO.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(gameService.statusUpdate(id, status));
+        return ResultVO.ok(gameService.statusUpdate(id, status));
     }
 }

+ 5 - 5
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GamePayStrategyController.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.GamePayStrategyAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.GamePayStrategyListParam;
 import com.zanxiang.game.module.manage.pojo.vo.GamePayStrategyListVO;
 import com.zanxiang.game.module.manage.service.IGamePayStrategyService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -33,7 +33,7 @@ public class GamePayStrategyController {
     @PreAuthorize(permissionKey = "manage:gamePayStrategy:addOrUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> addOrUpdate(@Validated @RequestBody GamePayStrategyAddUpdateParam param) {
-        return new ResultVO<>(gamePayStrategyService.addOrUpdate(param));
+        return ResultVO.ok(gamePayStrategyService.addOrUpdate(param));
     }
 
     @ApiOperation(value = "游戏支付策略列表查询")
@@ -41,7 +41,7 @@ public class GamePayStrategyController {
     @PreAuthorize(permissionKey = "manage:gamePayStrategy:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GamePayStrategyListVO.class)})
     public ResultVO<IPage<GamePayStrategyListVO>> pageList(@Validated @RequestBody GamePayStrategyListParam param) {
-        return new ResultVO<>(gamePayStrategyService.pageList(param));
+        return ResultVO.ok(gamePayStrategyService.pageList(param));
     }
 
     @ApiOperation(value = "游戏支付策略删除")
@@ -49,7 +49,7 @@ public class GamePayStrategyController {
     @PreAuthorize(permissionKey = "manage:gamePayStrategy:delete")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> deleteById(@RequestParam Long id) {
-        return new ResultVO<>(gamePayStrategyService.deleteById(id));
+        return ResultVO.ok(gamePayStrategyService.deleteById(id));
     }
 
     @ApiOperation(value = "游戏支付策略状态变更")
@@ -57,6 +57,6 @@ public class GamePayStrategyController {
     @PreAuthorize(permissionKey = "manage:gamePayStrategy:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(gamePayStrategyService.statusUpdate(id, status));
+        return ResultVO.ok(gamePayStrategyService.statusUpdate(id, status));
     }
 }

+ 5 - 5
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GamePayWayController.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.GamePayWayAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.GamePayWayListParam;
 import com.zanxiang.game.module.manage.pojo.vo.GamePayWayListVO;
 import com.zanxiang.game.module.manage.service.IGamePayWayService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -33,7 +33,7 @@ public class GamePayWayController {
     @PreAuthorize(permissionKey = "manage:gamePayWay:addOrUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> addOrUpdate(@Validated @RequestBody GamePayWayAddUpdateParam param) {
-        return new ResultVO<>(gamePayWayService.addOrUpdate(param));
+        return ResultVO.ok(gamePayWayService.addOrUpdate(param));
     }
 
     @ApiOperation(value = "游戏支付配置列表查询")
@@ -41,7 +41,7 @@ public class GamePayWayController {
     @PreAuthorize(permissionKey = "manage:gamePayWay:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GamePayWayListVO.class)})
     public ResultVO<IPage<GamePayWayListVO>> pageList(@Validated @RequestBody GamePayWayListParam param) {
-        return new ResultVO<>(gamePayWayService.pageList(param));
+        return ResultVO.ok(gamePayWayService.pageList(param));
     }
 
     @ApiOperation(value = "游戏支付配置删除")
@@ -49,7 +49,7 @@ public class GamePayWayController {
     @PreAuthorize(permissionKey = "manage:gamePayWay:delete")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> deleteById(@RequestParam Long id) {
-        return new ResultVO<>(gamePayWayService.deleteById(id));
+        return ResultVO.ok(gamePayWayService.deleteById(id));
     }
 
     @ApiOperation(value = "游戏支付配置状态变更")
@@ -57,6 +57,6 @@ public class GamePayWayController {
     @PreAuthorize(permissionKey = "manage:gamePayWay:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(gamePayWayService.statusUpdate(id, status));
+        return ResultVO.ok(gamePayWayService.statusUpdate(id, status));
     }
 }

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

@@ -1,10 +1,10 @@
 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.manage.pojo.params.GamePictureParam;
 import com.zanxiang.game.module.manage.pojo.vo.GamePictureVO;
 import com.zanxiang.game.module.manage.service.IGamePictureService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -33,7 +33,7 @@ public class GamePictureController {
     @PreAuthorize(permissionKey = "sdk:gamePicture:info")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GamePictureVO.class)})
     public ResultVO<GamePictureVO> getByGameId(@RequestParam Long id) {
-        return new ResultVO<>(gamePictureService.getByGameId(id));
+        return ResultVO.ok(gamePictureService.getByGameId(id));
     }
 
     @ApiOperation(value = "游戏图片配置添加或者更新")
@@ -41,7 +41,7 @@ public class GamePictureController {
     @PreAuthorize(permissionKey = "sdk:gamePicture:addOrUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> addOrUpdate(@Validated @RequestBody GamePictureParam param) {
-        return new ResultVO<>(gamePictureService.addOrUpdate(param));
+        return ResultVO.ok(gamePictureService.addOrUpdate(param));
     }
 
 }

+ 1 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/GameTagController.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.GameTagAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.GameTagListParam;
 import com.zanxiang.game.module.manage.pojo.vo.GameTagVO;
 import com.zanxiang.game.module.manage.service.IGameTagService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;

+ 5 - 10
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/OrderController.java

@@ -2,20 +2,23 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.LogPayCpParam;
 import com.zanxiang.game.module.manage.pojo.params.OrderParam;
 import com.zanxiang.game.module.manage.pojo.vo.LogPayCpVO;
 import com.zanxiang.game.module.manage.pojo.vo.OrderListVO;
 import com.zanxiang.game.module.manage.service.ILogPayCpService;
 import com.zanxiang.game.module.manage.service.IOrderService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
 import io.swagger.annotations.ApiResponses;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
+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
@@ -48,12 +51,4 @@ public class OrderController {
     public ResultVO<IPage<LogPayCpVO>> callCpList(@Validated @RequestBody LogPayCpParam param) {
         return ResultVO.ok(logPayCpService.callCpList(param));
     }
-
-    @ApiOperation(value = "订单上报")
-    @PutMapping(value = "/call/back")
-    @PreAuthorize(permissionKey = "sdk:order:callBack")
-    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
-    public ResultVO<Boolean> callBack(@RequestParam String orderId) {
-        return ResultVO.ok(orderService.callBack(orderId));
-    }
 }

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

@@ -1,12 +1,12 @@
 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.FileTypeEnum;
+import com.zanxiang.game.module.manage.enums.FileTypeEnum;
 import com.zanxiang.module.oss.pojo.OssUploadCallback;
 import com.zanxiang.module.oss.pojo.dto.OssUploadDTO;
 import com.zanxiang.module.oss.service.IOssService;
 import com.zanxiang.module.util.exception.BaseException;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -40,7 +40,7 @@ public class OssController {
         if (fileTypeEnum == null) {
             throw new BaseException("错误的文件类型");
         }
-        return new ResultVO<>(ossService.formUpload(fileTypeEnum.getFilePath(), type));
+        return ResultVO.ok(ossService.formUpload(fileTypeEnum.getFilePath(), type));
     }
 
     @ApiOperation(value = "oss回传接口")

+ 6 - 6
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PayApplicationController.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.PayApplicationAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PayApplicationListParam;
 import com.zanxiang.game.module.manage.pojo.vo.PayApplicationVO;
 import com.zanxiang.game.module.manage.service.IPayApplicationService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -33,7 +33,7 @@ public class PayApplicationController {
     @PreAuthorize(permissionKey = "manage:payApplication:addOrUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> addOrUpdate(@Validated @RequestBody PayApplicationAddUpdateParam param) {
-        return new ResultVO<>(payApplicationService.addOrUpdate(param));
+        return ResultVO.ok(payApplicationService.addOrUpdate(param));
     }
 
     @ApiOperation(value = "应用列表查询")
@@ -41,7 +41,7 @@ public class PayApplicationController {
     @PreAuthorize(permissionKey = "manage:payApplication:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PayApplicationVO.class)})
     public ResultVO<IPage<PayApplicationVO>> list(@Validated @RequestBody PayApplicationListParam param) {
-        return new ResultVO<>(payApplicationService.pageList(param));
+        return ResultVO.ok(payApplicationService.pageList(param));
     }
 
     @ApiOperation(value = "应用删除")
@@ -49,7 +49,7 @@ public class PayApplicationController {
     @PreAuthorize(permissionKey = "manage:payApplication:delete")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> deleteById(@RequestParam Long id) {
-        return new ResultVO<>(payApplicationService.deleteById(id));
+        return ResultVO.ok(payApplicationService.deleteById(id));
     }
 
     @ApiOperation(value = "应用状态变更")
@@ -57,7 +57,7 @@ public class PayApplicationController {
     @PreAuthorize(permissionKey = "manage:payApplication:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(payApplicationService.statusUpdate(id, status));
+        return ResultVO.ok(payApplicationService.statusUpdate(id, status));
     }
 
     @ApiOperation(value = "获取小程序二维码")
@@ -65,7 +65,7 @@ public class PayApplicationController {
     @PreAuthorize(permissionKey = "manage:payApplication:qrCode")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = String.class)})
     public ResultVO<String> getQrCode(@RequestParam Long id) {
-        return new ResultVO<>(payApplicationService.getQrCode(id));
+        return ResultVO.ok(payApplicationService.getQrCode(id));
     }
 
 }

+ 5 - 5
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PayBoxController.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.PayBoxAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PayBoxListParam;
 import com.zanxiang.game.module.manage.pojo.vo.PayBoxListVO;
 import com.zanxiang.game.module.manage.service.IPayBoxService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -33,7 +33,7 @@ public class PayBoxController {
     @PreAuthorize(permissionKey = "manage:payBox:addOrUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> addOrUpdate(@Validated @RequestBody PayBoxAddUpdateParam param) {
-        return new ResultVO<>(payBoxService.addOrUpdate(param));
+        return ResultVO.ok(payBoxService.addOrUpdate(param));
     }
 
     @ApiOperation(value = "支付盒子列表查询")
@@ -41,7 +41,7 @@ public class PayBoxController {
     @PreAuthorize(permissionKey = "manage:payBox:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PayBoxListVO.class)})
     public ResultVO<IPage<PayBoxListVO>> list(@Validated @RequestBody PayBoxListParam param) {
-        return new ResultVO<>(payBoxService.pageList(param));
+        return ResultVO.ok(payBoxService.pageList(param));
     }
 
     @ApiOperation(value = "支付盒子删除")
@@ -49,7 +49,7 @@ public class PayBoxController {
     @PreAuthorize(permissionKey = "manage:payBox:delete")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> deleteById(@RequestParam Long id) {
-        return new ResultVO<>(payBoxService.deleteById(id));
+        return ResultVO.ok(payBoxService.deleteById(id));
     }
 
     @ApiOperation(value = "支付盒子状态变更")
@@ -57,6 +57,6 @@ public class PayBoxController {
     @PreAuthorize(permissionKey = "manage:payBox:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(payBoxService.statusUpdate(id, status));
+        return ResultVO.ok(payBoxService.statusUpdate(id, status));
     }
 }

+ 6 - 6
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PayMerchantController.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.PayMerchantAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PayMerchantListParam;
 import com.zanxiang.game.module.manage.pojo.vo.PayMerchantListVO;
 import com.zanxiang.game.module.manage.service.IPayMerchantService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -33,7 +33,7 @@ public class PayMerchantController {
     @PreAuthorize(permissionKey = "manage:payMerchant:addOrUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> list(@Validated @RequestBody PayMerchantAddUpdateParam param) {
-        return new ResultVO<>(payMerchantService.addOrUpdate(param));
+        return ResultVO.ok(payMerchantService.addOrUpdate(param));
     }
 
     @ApiOperation(value = "商户列表查询")
@@ -41,7 +41,7 @@ public class PayMerchantController {
     @PreAuthorize(permissionKey = "manage:payMerchant:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = PayMerchantListVO.class)})
     public ResultVO<IPage<PayMerchantListVO>> list(@Validated @RequestBody PayMerchantListParam param) {
-        return new ResultVO<>(payMerchantService.pageList(param));
+        return ResultVO.ok(payMerchantService.pageList(param));
     }
 
     @ApiOperation(value = "商户删除")
@@ -49,7 +49,7 @@ public class PayMerchantController {
     @PreAuthorize(permissionKey = "manage:payMerchant:delete")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> deleteById(@RequestParam Long id) {
-        return new ResultVO<>(payMerchantService.deleteById(id));
+        return ResultVO.ok(payMerchantService.deleteById(id));
     }
 
     @ApiOperation(value = "商户状态变更")
@@ -57,7 +57,7 @@ public class PayMerchantController {
     @PreAuthorize(permissionKey = "manage:payMerchant:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(payMerchantService.statusUpdate(id, status));
+        return ResultVO.ok(payMerchantService.statusUpdate(id, status));
     }
 
     @ApiOperation(value = "商户密钥变更")
@@ -65,6 +65,6 @@ public class PayMerchantController {
     @PreAuthorize(permissionKey = "manage:payMerchant:secretKeyUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> secretKeyUpdate(@RequestParam Long id, @RequestParam String secretKey) {
-        return new ResultVO<>(payMerchantService.secretKeyUpdate(id, secretKey));
+        return ResultVO.ok(payMerchantService.secretKeyUpdate(id, secretKey));
     }
 }

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PromoAccountController.java

@@ -2,12 +2,12 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.PromoAccountAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PromoAccountAssignParam;
 import com.zanxiang.game.module.manage.pojo.params.PromoAccountListParam;
 import com.zanxiang.game.module.manage.pojo.vo.PromoAccountListVO;
 import com.zanxiang.game.module.manage.service.IPromoAccountService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -50,7 +50,7 @@ public class PromoAccountController {
     @PreAuthorize(permissionKey = "manage:promoAccount:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(promoAccountService.statusUpdate(id, status));
+        return ResultVO.ok(promoAccountService.statusUpdate(id, status));
     }
 
     @ApiOperation(value = "推广账号指派")

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PromoChannelController.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.PromoChannelAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PromoChannelListParam;
 import com.zanxiang.game.module.manage.pojo.vo.PromoChannelListVO;
 import com.zanxiang.game.module.manage.service.IPromoChannelService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -49,6 +49,6 @@ public class PromoChannelController {
     @PreAuthorize(permissionKey = "manage:promoChannel:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(promoChannelService.statusUpdate(id, status));
+        return ResultVO.ok(promoChannelService.statusUpdate(id, status));
     }
 }

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PromoMediaController.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.PromoMediaAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PromoMediaListParam;
 import com.zanxiang.game.module.manage.pojo.vo.PromoMediaListVO;
 import com.zanxiang.game.module.manage.service.IPromoMediaService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -49,6 +49,6 @@ public class PromoMediaController {
     @PreAuthorize(permissionKey = "manage:promoMedia:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(promoMediaService.statusUpdate(id, status));
+        return ResultVO.ok(promoMediaService.statusUpdate(id, status));
     }
 }

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/PromoSiteController.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.PromoSiteAddOrUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PromoSiteListParam;
 import com.zanxiang.game.module.manage.pojo.vo.PromoSiteListVO;
 import com.zanxiang.game.module.manage.service.IPromoSiteService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -49,6 +49,6 @@ public class PromoSiteController {
     @PreAuthorize(permissionKey = "manage:promoSite:statusUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
-        return new ResultVO<>(promoSiteService.statusUpdate(id, status));
+        return ResultVO.ok(promoSiteService.statusUpdate(id, status));
     }
 }

+ 6 - 6
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/UserBanController.java

@@ -2,12 +2,12 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.*;
 import com.zanxiang.game.module.manage.pojo.vo.IpBanVO;
 import com.zanxiang.game.module.manage.pojo.vo.UserBanVO;
 import com.zanxiang.game.module.manage.service.IIpBanService;
 import com.zanxiang.game.module.manage.service.IUserBanService;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -42,7 +42,7 @@ public class UserBanController {
     @PreAuthorize(permissionKey = "sdk:ipBan:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = IpBanVO.class)})
     public ResultVO<IPage<IpBanVO>> list(@Validated @RequestBody IpBanListParam param) {
-        return new ResultVO<>(ipBanService.list(param));
+        return ResultVO.ok(ipBanService.list(param));
     }
 
     @ApiOperation(value = "添加封禁ip")
@@ -50,7 +50,7 @@ public class UserBanController {
     @PreAuthorize(permissionKey = "sdk:ipBan:add")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> addIp(@Validated @RequestBody IpBanAddParam param) {
-        return new ResultVO<>(ipBanService.addIp(param));
+        return ResultVO.ok(ipBanService.addIp(param));
     }
 
     @ApiOperation(value = "ip封禁或者解封")
@@ -58,7 +58,7 @@ public class UserBanController {
     @PreAuthorize(permissionKey = "sdk:ipBan:update")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> ipBanOrRemove(@Validated @RequestBody IpBanUpdateParam param) {
-        return new ResultVO<>(ipBanService.ipBanOrRemove(param));
+        return ResultVO.ok(ipBanService.ipBanOrRemove(param));
     }
 
     @ApiOperation(value = "查询玩家封禁列表")
@@ -66,7 +66,7 @@ public class UserBanController {
     @PreAuthorize(permissionKey = "sdk:userBan:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = UserBanVO.class)})
     public ResultVO<IPage<UserBanVO>> list(@Validated @RequestBody UserBanListParam param) {
-        return new ResultVO<>(userBanService.list(param));
+        return ResultVO.ok(userBanService.list(param));
     }
 
     @ApiOperation(value = "玩家封禁添加或者更新")
@@ -74,6 +74,6 @@ public class UserBanController {
     @PreAuthorize(permissionKey = "sdk:userBan:addOrUpdate")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
     public ResultVO<Boolean> addOrUpdate(@Validated @RequestBody UserBanUpdateParam param) {
-        return new ResultVO<>(userBanService.addOrUpdate(param));
+        return ResultVO.ok(userBanService.addOrUpdate(param));
     }
 }

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

@@ -2,10 +2,10 @@ package com.zanxiang.game.module.manage.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.module.base.domain.ResultVO;
 import com.zanxiang.game.module.manage.pojo.params.*;
 import com.zanxiang.game.module.manage.pojo.vo.*;
 import com.zanxiang.game.module.manage.service.*;
+import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/FileTypeEnum.java → game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/FileTypeEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.manage.enums;
 
 import lombok.Getter;
 

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/GameCategoryEnum.java → game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/GameCategoryEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.manage.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/GameStatusEnum.java → game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/GameStatusEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.manage.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/GameStrategyTypeEnum.java → game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/GameStrategyTypeEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.manage.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/VipLevelEnum.java → game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/VipLevelEnum.java

@@ -1,4 +1,4 @@
-package com.zanxiang.game.module.base.enums;
+package com.zanxiang.game.module.manage.enums;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 82 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/AgentDTO.java

@@ -0,0 +1,82 @@
+package com.zanxiang.game.module.manage.pojo.dto;
+
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * @author wcc
+ */
+@Data
+public class AgentDTO {
+
+    /**
+     * 主键id
+     */
+    private Long id;
+
+    /**
+     * 渠道名称
+     */
+    private String agentName;
+
+    /**
+     * 渠道唯一标识
+     */
+    private String agentKey;
+
+    /**
+     * 推广账号类型(1:腾讯、2:头条)
+     */
+    private Integer accountType;
+
+    /**
+     * 账号类型
+     */
+    private Long accountId;
+
+    /**
+     * 游戏id
+     */
+    private Long gameId;
+
+    /**
+     * 腾讯用户行为数据源 id
+     */
+    private Long userActionSetId;
+
+    /**
+     * 回传策略 id
+     */
+    private Long backPolicyId;
+
+    /**
+     * 投放状态
+     */
+    private Integer putStatus;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    /**
+     * 创建归属人id
+     */
+    private Long createBy;
+
+    /**
+     * 创建归属人名称
+     */
+    private String createByName;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateTime;
+
+    /**
+     * 更新者
+     */
+    private Long updateBy;
+}

+ 0 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/AgentListDTO.java


+ 31 - 41
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/UserDTO.java

@@ -19,7 +19,12 @@ public class UserDTO {
     private Long id;
 
     /**
-     * 所属渠道ID
+     * 注册渠道id
+     */
+    private Long regAgentId;
+
+    /**
+     * 最新渠道id
      */
     private Long agentId;
 
@@ -43,28 +48,23 @@ public class UserDTO {
      */
     private String password;
 
-    /**
-     * 绑定邮箱
-     */
-    private String email;
-
     /**
      * 绑定手机号码
      */
     private String mobile;
 
     /**
-     * 绑定支付宝账号
+     * 微信用户openId
      */
-    private String aliPay;
+    private String openId;
 
     /**
-     * 客户端类型, 1 : 安卓app
+     * 微信用户会话密钥
      */
-    private Integer deviceType;
+    private String sessionKey;
 
     /**
-     * 用户状态, -1 : 为冻结状态, 0 : 为正常状态
+     * 状态, 0 正常 1 封禁
      */
     private Integer status;
 
@@ -73,6 +73,16 @@ public class UserDTO {
      */
     private String avatar;
 
+    /**
+     * 绑定支付宝账号
+     */
+    private String aliPay;
+
+    /**
+     * 绑定邮箱
+     */
+    private String email;
+
     /**
      * 充值次数
      */
@@ -88,50 +98,30 @@ public class UserDTO {
      */
     private LocalDateTime lastRechargeTime;
 
-    /**
-     * 平台币余额
-     */
-    private BigDecimal platformCoin;
-
     /**
      * 创角数
      */
     private Integer roleCount;
 
-    /**
-     * 是否GS
-     */
-    private Boolean isGs;
-
-    /**
-     * 客服id
-     */
-    private Long customerId;
-
-    /**
-     * 拥有角色最高vip等级
-     */
-    private Integer vipMax;
-
     /**
      * 是否实名认证,0未实名认证,1成年人,2未成年人
      */
     private Integer authentication;
 
     /**
-     * 注册时间
+     * 客户端类型, 1:安卓app, 2: 苹果iosApp, 3: h5网页, 4 : 小程序(小游戏)
      */
-    private LocalDateTime createTime;
+    private Integer deviceType;
 
     /**
-     * 更改时间
+     * 客户端操作系统, android, ios, windows, mac
      */
-    private LocalDateTime updateTime;
+    private String deviceSystem;
 
     /**
-     * 客户端操作系统, android, ios, windows, mac
+     * 用户注册ip
      */
-    private String deviceSystem;
+    private String ip;
 
     /**
      * 用户设备mac地址
@@ -149,12 +139,12 @@ public class UserDTO {
     private String androidId;
 
     /**
-     * 用户注册ip
+     * 注册时间
      */
-    private String ip;
+    private LocalDateTime createTime;
 
     /**
-     * 广告id
+     * 更改时间
      */
-    private String adId;
+    private LocalDateTime updateTime;
 }

+ 27 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/enums/AccountTypeEnum.java

@@ -0,0 +1,27 @@
+package com.zanxiang.game.module.manage.pojo.enums;
+
+import lombok.Getter;
+
+@Getter
+public enum AccountTypeEnum {
+    TENCENT(1),
+    BYTE(2);
+
+    private final Integer value;
+
+    AccountTypeEnum(Integer value) {
+        this.value = value;
+    }
+
+    public static AccountTypeEnum getByValue(Integer value) {
+        if (value == null) {
+            return null;
+        }
+        for (AccountTypeEnum accountType : AccountTypeEnum.values()) {
+            if (accountType.getValue().equals(value)) {
+                return accountType;
+            }
+        }
+        return null;
+    }
+}

+ 55 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/AgentAddParam.java

@@ -0,0 +1,55 @@
+package com.zanxiang.game.module.manage.pojo.params;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-06-09
+ * @description : 添加渠道
+ */
+@Data
+public class AgentAddParam {
+
+    /**
+     * 渠道名称
+     */
+    @ApiModelProperty(notes = "渠道名称")
+    private String agentName;
+
+    /**
+     * 推广账号类型(1:腾讯、2:头条)
+     */
+    @ApiModelProperty(notes = "推广账号类型(1:腾讯、2:头条)")
+    private Integer accountType;
+
+    /**
+     * 账号类型
+     */
+    @ApiModelProperty(notes = "账号类型")
+    private Long accountId;
+
+    /**
+     * 游戏id
+     */
+    @ApiModelProperty(notes = "游戏id")
+    private Long gameId;
+
+    /**
+     * 腾讯用户行为数据源 id
+     */
+    @ApiModelProperty(notes = "腾讯用户行为数据源 id")
+    private Long userActionSetId;
+
+    /**
+     * 回传策略 id
+     */
+    @ApiModelProperty(notes = "回传策略 id")
+    private Long backPolicyId;
+
+    /**
+     * 投放状态
+     */
+    @ApiModelProperty(notes = "投放状态")
+    private Integer putStatus;
+}

+ 74 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/AgentListParam.java

@@ -0,0 +1,74 @@
+package com.zanxiang.game.module.manage.pojo.params;
+
+import com.zanxiang.game.module.mybatis.entity.Agent;
+import com.zanxiang.module.web.pojo.BaseListDTO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-06-09
+ * @description : 渠道列表查询
+ */
+@Data
+public class AgentListParam extends BaseListDTO<Agent> {
+
+    /**
+     * 渠道名称
+     */
+    @ApiModelProperty(notes = "渠道名称")
+    private String agentName;
+
+    @ApiModelProperty(notes = "渠道标识")
+    private String agentKey;
+
+    /**
+     * 账号类型
+     */
+    @ApiModelProperty(notes = "账号类型")
+    private Integer accountType;
+
+    /**
+     * 账号id
+     */
+    @ApiModelProperty(notes = "账号id")
+    private Long accountId;
+
+    /**
+     * 游戏id
+     */
+    @ApiModelProperty(notes = "游戏id")
+    private Long gameId;
+
+    /**
+     * 回传策略 id
+     */
+    @ApiModelProperty(notes = "回传策略 id")
+    private Long backPolicyId;
+
+    /**
+     * 投放状态
+     */
+    @ApiModelProperty(notes = "投放状态")
+    private Integer putStatus;
+
+    /**
+     * 投手
+     */
+    @ApiModelProperty(notes = "投手")
+    private Long putUserId;
+
+    /**
+     * 创建开始时间
+     */
+    @ApiModelProperty(notes = "创建开始时间")
+    private LocalDate createBeginTime;
+
+    /**
+     * 创建结束时间
+     */
+    @ApiModelProperty(notes = "创建结束时间")
+    private LocalDate createEndTime;
+}

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/CpListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.Cp;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class CpListParam extends BasePage<Cp> {
+public class CpListParam extends BaseListDTO<Cp> {
 
     /**
      * cp名称

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.Game;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class GameListParam extends BasePage<Game> {
+public class GameListParam extends BaseListDTO<Game> {
 
     /**
      * cp名称对应的id

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GamePayStrategyListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.GamePayStrategy;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -11,7 +11,7 @@ import lombok.Data;
  * @description : 游戏策略查询
  */
 @Data
-public class GamePayStrategyListParam extends BasePage<GamePayStrategy> {
+public class GamePayStrategyListParam extends BaseListDTO<GamePayStrategy> {
 
     /**
      * 策略名称

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GamePayWayListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.GamePayWay;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -11,7 +11,7 @@ import lombok.Data;
  * @description : 游戏支付配置表
  */
 @Data
-public class GamePayWayListParam extends BasePage<GamePayWay> {
+public class GamePayWayListParam extends BaseListDTO<GamePayWay> {
 
     /**
      * 游戏id

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameTagListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.GameTag;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class GameTagListParam extends BasePage<GameTag> {
+public class GameTagListParam extends BaseListDTO<GameTag> {
 
     /**
      * 标签名称

+ 20 - 26
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameUserListParam.java

@@ -1,11 +1,13 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zanxiang.game.module.mybatis.entity.GameUser;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDate;
 
@@ -17,7 +19,7 @@ import java.time.LocalDate;
 @ApiModel
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class GameUserListParam extends BasePage<GameUser> {
+public class GameUserListParam extends BaseListDTO<GameUser> {
 
     /**
      * 玩家id
@@ -73,6 +75,12 @@ public class GameUserListParam extends BasePage<GameUser> {
     @ApiModelProperty(notes = "归因投放人员")
     private String pitcherId;
 
+    /**
+     * 是否充值
+     */
+    @ApiModelProperty(notes = "是否充值, true : 是, false : 否, 全部 : null或者不传")
+    private Boolean isRecharge;
+
     /**
      * 最近充值开始时间(开始玩开始时间请使用beginDate参数)
      */
@@ -86,32 +94,18 @@ public class GameUserListParam extends BasePage<GameUser> {
     private LocalDate rechargeEndDate;
 
     /**
-     * 客服id
-     */
-    @ApiModelProperty(notes = "客服id")
-    private Long customerId;
-
-    /**
-     * 归因广告id
+     * 开始时间
      */
-    @ApiModelProperty(notes = "归因广告id")
-    private String adId;
-
-    /**
-     * 是否GS
-     */
-    @ApiModelProperty(notes = "是否GS")
-    private Boolean isGs;
-
-    /**
-     * 是否充值
-     */
-    @ApiModelProperty(notes = "是否充值, true : 是, false : 否, 全部 : null或者不传")
-    private Boolean isRecharge;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "开始时间")
+    private LocalDate beginDate;
 
     /**
-     * 角色vip
+     * 结束时间
      */
-    @ApiModelProperty(notes = "角色vip, 全部 : null或者不传")
-    private Integer vipLevel;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "结束时间")
+    private LocalDate endDate;
 }

+ 18 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameUserRoleListParam.java

@@ -1,11 +1,13 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zanxiang.game.module.mybatis.entity.GameUserRole;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDate;
 
@@ -17,7 +19,7 @@ import java.time.LocalDate;
 @ApiModel
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class GameUserRoleListParam extends BasePage<GameUserRole> {
+public class GameUserRoleListParam extends BaseListDTO<GameUserRole> {
 
     /**
      * 玩家id
@@ -109,5 +111,19 @@ public class GameUserRoleListParam extends BasePage<GameUserRole> {
     @ApiModelProperty(notes = "最近充值结束时间(注册结束时间请使用endDate参数)")
     private LocalDate rechargeEndDate;
 
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "开始时间")
+    private LocalDate beginDate;
 
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "结束时间")
+    private LocalDate endDate;
 }

+ 22 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/IpBanListParam.java

@@ -1,10 +1,14 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zanxiang.game.module.mybatis.entity.IpBan;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDate;
 
 /**
  * @author : lingfeng
@@ -13,7 +17,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class IpBanListParam extends BasePage<IpBan> {
+public class IpBanListParam extends BaseListDTO<IpBan> {
 
     /**
      * 查询ip
@@ -26,4 +30,20 @@ public class IpBanListParam extends BasePage<IpBan> {
      */
     @ApiModelProperty(notes = "封禁状态")
     private Integer status;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "开始时间")
+    private LocalDate beginDate;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "结束时间")
+    private LocalDate endDate;
 }

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/LogPayCpParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.LogPayCp;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
 import lombok.Data;
@@ -20,7 +20,7 @@ import javax.validation.constraints.NotBlank;
 @NoArgsConstructor
 @AllArgsConstructor
 @EqualsAndHashCode(callSuper = true)
-public class LogPayCpParam extends BasePage<LogPayCp> {
+public class LogPayCpParam extends BaseListDTO<LogPayCp> {
 
     /**
      * 商户订单号

+ 18 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/OrderParam.java

@@ -1,8 +1,8 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.Order;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -15,7 +15,7 @@ import java.time.LocalDate;
  * @description : 订单
  */
 @Data
-public class OrderParam extends BasePage<Order> {
+public class OrderParam extends BaseListDTO<Order> {
 
     @ApiModelProperty(notes = "订单ID:订单号")
     private String orderId;
@@ -89,4 +89,20 @@ public class OrderParam extends BasePage<Order> {
 
     @ApiModelProperty(notes = "广告上报状态")
     private Integer callBackStatus;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "开始时间")
+    private LocalDate beginDate;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "结束时间")
+    private LocalDate endDate;
 }

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PayApplicationListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.PayApplication;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
 import lombok.Data;
@@ -18,7 +18,7 @@ import lombok.NoArgsConstructor;
 @NoArgsConstructor
 @AllArgsConstructor
 @EqualsAndHashCode(callSuper = true)
-public class PayApplicationListParam extends BasePage<PayApplication> {
+public class PayApplicationListParam extends BaseListDTO<PayApplication> {
 
     /**
      * 应用名称

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PayBoxListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.PayBox;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class PayBoxListParam extends BasePage<PayBox> {
+public class PayBoxListParam extends BaseListDTO<PayBox> {
 
     /**
      * 盒子名称

+ 2 - 3
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PayMerchantListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.PayMerchant;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class PayMerchantListParam extends BasePage<PayMerchant> {
+public class PayMerchantListParam extends BaseListDTO<PayMerchant> {
 
     /**
      * 商户号
@@ -37,5 +37,4 @@ public class PayMerchantListParam extends BasePage<PayMerchant> {
      */
     @ApiModelProperty(notes = "状态, 0 : 正常, 1 : 不可用")
     private Integer status;
-
 }

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PromoAccountListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.PromoAccount;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -11,7 +11,7 @@ import lombok.Data;
  * @description : 推广账号查询参数
  */
 @Data
-public class PromoAccountListParam extends BasePage<PromoAccount> {
+public class PromoAccountListParam extends BaseListDTO<PromoAccount> {
 
     /**
      * 推广媒体id

+ 22 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PromoChannelListParam.java

@@ -1,9 +1,13 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zanxiang.game.module.mybatis.entity.PromoChannel;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDate;
 
 /**
  * @author : lingfeng
@@ -11,7 +15,7 @@ import lombok.Data;
  * @description : 推广列表参数
  */
 @Data
-public class PromoChannelListParam extends BasePage<PromoChannel> {
+public class PromoChannelListParam extends BaseListDTO<PromoChannel> {
 
     /**
      * 推广游戏id
@@ -78,4 +82,20 @@ public class PromoChannelListParam extends BasePage<PromoChannel> {
     @ApiModelProperty(notes = "状态, 0 : 可用, 1: 禁用")
     private Integer status;
 
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "开始时间")
+    private LocalDate beginDate;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "结束时间")
+    private LocalDate endDate;
+
 }

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PromoMediaListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.PromoMedia;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class PromoMediaListParam extends BasePage<PromoMedia> {
+public class PromoMediaListParam extends BaseListDTO<PromoMedia> {
 
     /**
      * 推广媒体

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/PromoSiteListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.PromoSite;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class PromoSiteListParam extends BasePage<PromoSite> {
+public class PromoSiteListParam extends BaseListDTO<PromoSite> {
 
     /**
      * 推广媒体id

+ 18 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserBanListParam.java

@@ -1,8 +1,8 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.UserBan;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -17,7 +17,7 @@ import java.time.LocalDate;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class UserBanListParam extends BasePage<UserBan> {
+public class UserBanListParam extends BaseListDTO<UserBan> {
 
     /**
      * 玩家id
@@ -52,4 +52,20 @@ public class UserBanListParam extends BasePage<UserBan> {
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @ApiModelProperty(notes = "注册结束时间")
     private LocalDate regEndTime;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "开始时间")
+    private LocalDate beginDate;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "结束时间")
+    private LocalDate endDate;
 }

+ 18 - 8
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserListParam.java

@@ -1,11 +1,13 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zanxiang.game.module.mybatis.entity.User;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDate;
 
@@ -17,7 +19,7 @@ import java.time.LocalDate;
 @ApiModel
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class UserListParam extends BasePage<User> {
+public class UserListParam extends BaseListDTO<User> {
 
     /**
      * 玩家id
@@ -145,17 +147,25 @@ public class UserListParam extends BasePage<User> {
     @ApiModelProperty(notes = "归因广告id")
     private String adId;
 
-    /**
-     * 是否GS
-     */
-    @ApiModelProperty(notes = "是否GS")
-    private Boolean isGs;
-
     /**
      * 是否切量
      */
     @ApiModelProperty(notes = "是否切量")
     private Boolean isCutCount;
 
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "开始时间")
+    private LocalDate beginDate;
 
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "结束时间")
+    private LocalDate endDate;
 }

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserLoginLogParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.UserLoginLog;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -15,7 +15,7 @@ import javax.validation.constraints.NotNull;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class UserLoginLogParam extends BasePage<UserLoginLog> {
+public class UserLoginLogParam extends BaseListDTO<UserLoginLog> {
 
     /**
      * 用户id

+ 22 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserNameAuthListParam.java

@@ -1,10 +1,14 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zanxiang.game.module.mybatis.entity.UserCard;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDate;
 
 /**
  * @author : lingfeng
@@ -13,7 +17,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class UserNameAuthListParam extends BasePage<UserCard> {
+public class UserNameAuthListParam extends BaseListDTO<UserCard> {
 
     /**
      * 玩家id
@@ -38,4 +42,20 @@ public class UserNameAuthListParam extends BasePage<UserCard> {
      */
     @ApiModelProperty(notes = "真实姓名")
     private String realName;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "开始时间")
+    private LocalDate beginDate;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "结束时间")
+    private LocalDate endDate;
 }

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserOrderListParam.java

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.pojo.params;
 
-import com.zanxiang.game.module.base.base.BasePage;
 import com.zanxiang.game.module.mybatis.entity.Order;
+import com.zanxiang.module.web.pojo.BaseListDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -15,7 +15,7 @@ import javax.validation.constraints.NotNull;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class UserOrderListParam extends BasePage<Order> {
+public class UserOrderListParam extends BaseListDTO<Order> {
 
     /**
      * 用户id

+ 64 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/AgentVO.java

@@ -0,0 +1,64 @@
+package com.zanxiang.game.module.manage.pojo.vo;
+
+import com.zanxiang.advertising.tencent.base.pojo.vo.UserActionSetRpcVO;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+public class AgentVO {
+
+    /**
+     * 主键
+     */
+    private Long id;
+    /**
+     * 渠道名称
+     */
+    private String agentName;
+    /**
+     * 渠道唯一标识
+     */
+    private String agentKey;
+    /**
+     * 推广账号类型(1:腾讯、2:头条)
+     */
+    private Integer accountType;
+    /**
+     * 账号类型
+     */
+    private Long accountId;
+    /**
+     * 游戏id
+     */
+    private Long gameId;
+    /**
+     * 腾讯用户行为数据源 id
+     */
+    private Long userActionSetId;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    /**
+     * 归属投手id
+     */
+    private Long createBy;
+
+    /**
+     * 归属投手名称
+     */
+    private String createByName;
+
+    /**
+     * 游戏信息
+     */
+    private GameInfoVO gameInfo;
+
+    /**
+     * 数据源信息
+     */
+    private UserActionSetRpcVO userActionSet;
+}

+ 4 - 28
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameUserListVO.java

@@ -39,16 +39,16 @@ public class GameUserListVO {
     private String nickname;
 
     /**
-     * 注册渠道id
+     * 归属渠道id
      */
     @ApiModelProperty(notes = "注册渠道id")
     private Long agentId;
 
     /**
-     * 注册渠道名称
+     * 归属渠道名称
      */
     @ApiModelProperty(notes = "注册渠道名称")
-    private String channel;
+    private String agentName;
 
     /**
      * cp标识id
@@ -90,7 +90,7 @@ public class GameUserListVO {
      * 归因投放人员id
      */
     @ApiModelProperty(notes = "归因投放人员id")
-    private String pitcherId;
+    private Long pitcherId;
 
     /**
      * 归因投放人员名字
@@ -104,30 +104,6 @@ public class GameUserListVO {
     @ApiModelProperty(notes = "归因推广账号id")
     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 String adId;
-
     /**
      * 充值金额
      */

+ 1 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameUserRoleListVO.java

@@ -62,7 +62,7 @@ public class GameUserRoleListVO {
      * 注册渠道名称
      */
     @ApiModelProperty(notes = "注册渠道名称")
-    private String channel;
+    private String agentName;
 
     /**
      * cp标识id

+ 1 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameUserRoleVO.java

@@ -48,7 +48,7 @@ public class GameUserRoleVO {
      * 渠道名称
      */
     @ApiModelProperty(notes = "渠道名称")
-    private String channelName;
+    private String agentName;
 
     /**
      * 所在服务器名称

+ 5 - 14
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/OrderVO.java

@@ -43,13 +43,13 @@ public class OrderVO {
     private Long agentId;
 
     @ApiModelProperty(notes = "充值渠道名称")
-    private String channel;
+    private String agentName;
 
     @ApiModelProperty(notes = "注册渠道id")
     private Long regAgentId;
 
     @ApiModelProperty(notes = "注册渠道名称")
-    private String regChannel;
+    private String regAgentName;
 
     @ApiModelProperty(notes = "注册游戏id")
     private Long regGameId;
@@ -70,7 +70,7 @@ public class OrderVO {
     private String regGameCategoryName;
 
     @ApiModelProperty(notes = "归因投放人员id")
-    private String pitcherId;
+    private Long pitcherId;
 
     @ApiModelProperty(notes = "归因投放人员名字")
     private String pitcherName;
@@ -78,17 +78,8 @@ public class OrderVO {
     @ApiModelProperty(notes = "归因推广账号id")
     private Long accountId;
 
-    @ApiModelProperty(notes = "归因推广账号")
-    private String accountName;
-
-    @ApiModelProperty(notes = "归因媒体id")
-    private Long mediaId;
-
-    @ApiModelProperty(notes = "归因媒体名称")
-    private String mediaName;
-
-    @ApiModelProperty(notes = "归因广告id")
-    private String adId;
+    @ApiModelProperty(notes = "推广账号类型(1:腾讯、2:头条)")
+    private Integer accountType;
 
     @ApiModelProperty(notes = "充值游戏id")
     private Long gameId;

+ 9 - 51
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/UserListVO.java

@@ -51,16 +51,16 @@ public class UserListVO {
     private LocalDateTime createTime;
 
     /**
-     * 注册渠道id
+     * 渠道id
      */
-    @ApiModelProperty(notes = "注册渠道id")
+    @ApiModelProperty(notes = "渠道id")
     private Long agentId;
 
     /**
-     * 注册渠道名称
+     * 渠道名称
      */
-    @ApiModelProperty(notes = "注册渠道名称")
-    private String channel;
+    @ApiModelProperty(notes = "渠道名称")
+    private String agentName;
 
     /**
      * cpId
@@ -102,7 +102,7 @@ public class UserListVO {
      * 归因投放人员id
      */
     @ApiModelProperty(notes = "归因投放人员id")
-    private String pitcherId;
+    private Long pitcherId;
 
     /**
      * 归因投放人员名字
@@ -117,28 +117,10 @@ public class UserListVO {
     private Long accountId;
 
     /**
-     * 归因推广账号
+     * 归因推广账号类型(1:腾讯、2:头条)
      */
-    @ApiModelProperty(notes = "归因推广账号")
-    private String accountName;
-
-    /**
-     * 归因媒体id
-     */
-    @ApiModelProperty(notes = "归因媒体id")
-    private Long mediaId;
-
-    /**
-     * 归因媒体名称
-     */
-    @ApiModelProperty(notes = "归因媒体名称")
-    private String mediaName;
-
-    /**
-     * 归因广告id
-     */
-    @ApiModelProperty(notes = "归因广告id")
-    private String adId;
+    @ApiModelProperty(notes = "归因推广账号类型(1:腾讯、2:头条)")
+    private Integer accountType;
 
     /**
      * 真实姓名
@@ -170,12 +152,6 @@ public class UserListVO {
     @ApiModelProperty(notes = "充值金额")
     private BigDecimal rechargeMoney;
 
-    /**
-     * 平台币余额
-     */
-    @ApiModelProperty(notes = "平台币余额")
-    private BigDecimal platformCoin;
-
     /**
      * 充值次数
      */
@@ -188,24 +164,6 @@ public class UserListVO {
     @ApiModelProperty(notes = "创角色数")
     private Integer roleCount;
 
-    /**
-     * 客服id
-     */
-    @ApiModelProperty(notes = "客服id")
-    private Long customerId;
-
-    /**
-     * 是否GS
-     */
-    @ApiModelProperty(notes = "是否GS")
-    private Boolean isGs;
-
-    /**
-     * 玩家vip(所有角色中的最高vip等级)
-     */
-    @ApiModelProperty(notes = "角色vip")
-    private Integer vipMax;
-
     /**
      * 最近登录时间
      */

+ 3 - 9
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/UserVO.java

@@ -33,12 +33,6 @@ public class UserVO {
     @ApiModelProperty(notes = "密码")
     private String password;
 
-    /**
-     * 最高vip
-     */
-    @ApiModelProperty(notes = "最高vip")
-    private Integer vipMax;
-
     /**
      * 昵称
      */
@@ -100,10 +94,10 @@ public class UserVO {
     private String address;
 
     /**
-     * 注册来源
+     * 注册来源, 1:腾讯、2:头条
      */
-    @ApiModelProperty(notes = "注册来源")
-    private String regFrom;
+    @ApiModelProperty(notes = "注册来源, 1:腾讯、2:头条")
+    private Integer regFrom;
 
     /**
      * 渠道

+ 54 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IAgentService.java

@@ -1,7 +1,61 @@
 package com.zanxiang.game.module.manage.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.game.module.manage.pojo.dto.AgentDTO;
+import com.zanxiang.game.module.manage.pojo.params.AgentAddParam;
+import com.zanxiang.game.module.manage.pojo.params.AgentListParam;
+import com.zanxiang.game.module.manage.pojo.vo.AgentVO;
 import com.zanxiang.game.module.mybatis.entity.Agent;
 
+import java.util.List;
+
+/**
+ * @author wcc
+ */
 public interface IAgentService extends IService<Agent> {
+
+    /**
+     * 列表页面
+     *
+     * @param param 参数
+     * @return {@link IPage}<{@link AgentVO}>
+     */
+    IPage<AgentVO> listOfPage(AgentListParam param);
+
+    /**
+     * 建渠道
+     *
+     * @param param 参数
+     * @return boolean
+     */
+    boolean add(AgentAddParam param);
+
+    /**
+     * 通过账户和投手id查询渠道id列表
+     *
+     * @param account   账户
+     * @param pitcherId 投手id
+     * @param agentId   代理人身份证
+     * @return {@link List}<{@link AgentDTO}>
+     */
+    List<AgentDTO> listUserAgent(String account, String pitcherId, Long agentId);
+
+    /**
+     * 配置将状态
+     *
+     * @param agentIdList 代理id列表
+     * @param putStatus   把状态
+     * @return boolean
+     */
+    boolean configPutStatus(List<Long> agentIdList, Integer putStatus);
+
+    /**
+     * 配置支持政策
+     *
+     * @param agentIdList  代理id列表
+     * @param backPolicyId 返回政策id
+     * @return boolean
+     */
+    boolean configBackPolicy(List<Long> agentIdList, Long backPolicyId);
 }

+ 11 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IGameAppletService.java

@@ -43,5 +43,15 @@ public interface IGameAppletService extends IService<GameApplet> {
      * @param gameId : 游戏id
      * @return {@link String}
      */
-    String getQrCod(Long gameId);
+    String getQrCodByGameId(Long gameId);
+
+    /**
+     * 获取小游戏二维码
+     *
+     * @param appId       应用程序id
+     * @param appSecret   应用程序秘密
+     * @param ossFileName oss文件名
+     * @return {@link String}
+     */
+    String getQrCode(String appId, String appSecret, String ossFileName);
 }

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

@@ -97,6 +97,8 @@ public interface IGameService extends IService<Game> {
      */
     List<GameChoiceVO> choiceList();
 
+    List<GameInfoVO> infoByIds(Collection<Long>  gameIds);
+
     /**
      * 根据id查询游戏信息
      *

+ 0 - 8
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IGameUserService.java

@@ -20,14 +20,6 @@ public interface IGameUserService {
      */
     IPage<GameUserListVO> gameUserList(GameUserListParam param);
 
-    /**
-     * 获取指定用户对应vip等级最高的用户信息
-     *
-     * @param userId : 用户信息
-     * @return {@link GameUserVO}
-     */
-    GameUserVO getMaxVipGameUser(Long userId);
-
     /**
      * 获取指定用户对应vip等级最高的用户信息
      *

+ 0 - 8
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IOrderService.java

@@ -15,14 +15,6 @@ import com.zanxiang.game.module.mybatis.entity.Order;
  */
 public interface IOrderService extends IService<Order> {
 
-    /**
-     * 订单上报
-     *
-     * @param orderId : 订单id
-     * @return {@link Boolean}
-     */
-    Boolean callBack(String orderId);
-
     /**
      * 获取用户下单记录
      *

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

@@ -51,10 +51,9 @@ public interface IUserService extends IService<User> {
      * @param userName    : 用户名称
      * @param nickname    : 用户昵称
      * @param regIp       : 用户注册ip
-     * @param adId        : 广告id
      * @return {@link Map}<{@link Long}, {@link UserDTO}>
      */
-    Map<Long, UserDTO> userCondition(Long userId, List<Long> agentIdList, String userName, String nickname, String regIp, String adId);
+    Map<Long, UserDTO> userCondition(Long userId, List<Long> agentIdList, String userName, String nickname, String regIp);
 
     /**
      * 根据用户id查询信息

+ 0 - 127
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/api/MiniAppletApiService.java

@@ -1,127 +0,0 @@
-package com.zanxiang.game.module.manage.service.api;
-
-import cn.hutool.http.HttpUtil;
-import cn.hutool.json.JSONObject;
-import com.zanxiang.game.module.base.utils.URIUtil;
-import com.zanxiang.module.oss.service.IOssService;
-import com.zanxiang.module.util.JsonUtil;
-import com.zanxiang.module.util.exception.BaseException;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.logging.log4j.util.Strings;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.io.BufferedInputStream;
-import java.io.PrintWriter;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-/**
- * @author : lingfeng
- * @time : 2022-07-13
- * @description : 微信小程序相关接口
- */
-@Slf4j
-@Service
-public class MiniAppletApiService {
-
-    @Autowired
-    private IOssService ossService;
-
-    /**
-     * 获取游戏小程序二维码
-     *
-     * @param appId       : 小程序appId
-     * @param appSecret   : 小程序密钥
-     * @param ossFileName : oss文件名
-     * @return : 返回oss二维码图片地址
-     */
-    public String getQrCode(String appId, String appSecret, String ossFileName) {
-        if (Strings.isBlank(appId) || Strings.isBlank(appSecret)) {
-            throw new BaseException("参数错误, 缺少小程序信息");
-        }
-        //oss文件名
-        ossFileName = Strings.isBlank(ossFileName) ? UUID.randomUUID().toString() + ".jpg" : ossFileName + ".jpg";
-        //获取小程序token
-        String token = this.getAppletTokenApi(appId, appSecret);
-        //获取小程序二维码
-        BufferedInputStream inputStream = this.getQrCodeApi(null, token);
-        //二维码上传到oss, 返回网络地址
-        return ossService.upload(ossFileName, inputStream);
-    }
-
-    /**
-     * 获取小程序token
-     *
-     * @param appId  : 小程序appId
-     * @param secret : 小程序密钥
-     * @return : 返回小程token
-     */
-    private String getAppletTokenApi(String appId, String secret) {
-        Map<String, String> paramMap = new HashMap<>(3);
-        paramMap.put("grant_type", "client_credential");
-        paramMap.put("appid", appId);
-        paramMap.put("secret", secret);
-        String url = "https://api.weixin.qq.com/cgi-bin/token";
-        //拼接url请求参数
-        String uri = URIUtil.fillUrlParams(url, paramMap, Boolean.TRUE);
-        // 带参GET请求
-        Map<String, String> resultMap = new HashMap<>(4);
-        try {
-            String result = HttpUtil.get(uri);
-            if (Strings.isNotBlank(result)) {
-                resultMap = JsonUtil.toMap(result, Map.class, String.class, String.class);
-            }
-        } catch (Exception e) {
-            log.error("获取小程序token出现异常, appId : {},secret: {} e : {}", appId, secret, e.getMessage());
-            throw new BaseException("获取小程序token出现异常");
-        }
-        //返回token
-        if (resultMap.containsKey("access_token")) {
-            return resultMap.get("access_token");
-        }
-        //没有拿到token
-        log.error("获取token发生错误, appId : {}, secret: {}, errcode : {}, errmsg : {}", appId, secret,
-                resultMap.get("errcode"), resultMap.get("errmsg"));
-        throw new BaseException("http状态正确, 获取token发生错误");
-    }
-
-    /**
-     * 生成微信小程序二维码
-     *
-     * @param scene       : 二维码携带的参数
-     * @param accessToken : 小程序密钥
-     * @return : 返回二维码文件流
-     */
-    private BufferedInputStream getQrCodeApi(String scene, String accessToken) {
-        try {
-            //调用微信接口生成二维码
-            URL url = new URL("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + accessToken);
-            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
-            connection.setRequestMethod("POST");
-            //连接超时 单位毫秒
-            connection.setConnectTimeout(10000);
-            //读取超时 单位毫秒
-            connection.setReadTimeout(2000);
-            // 发送POST请求必须设置如下两行
-            connection.setDoOutput(true);
-            connection.setDoInput(true);
-            // 获取URLConnection对象对应的输出流
-            PrintWriter printWriter = new PrintWriter(connection.getOutputStream());
-            // 发送请求参数
-            JSONObject paramJson = new JSONObject();
-            //这就是你二维码里携带的参数 String型  名称不可变
-            paramJson.set("scene", Strings.isBlank(scene) ? "a=1" : scene);
-            printWriter.write(paramJson.toString());
-            // flush输出流的缓冲
-            printWriter.flush();
-            //返回数据流
-            return new BufferedInputStream(connection.getInputStream());
-        } catch (Exception e) {
-            throw new BaseException("获取小程序二维码异常");
-        }
-    }
-}

+ 180 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/AgentServiceImpl.java

@@ -1,14 +1,192 @@
 package com.zanxiang.game.module.manage.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.advertising.tencent.base.AdvertisingTencentServer;
+import com.zanxiang.advertising.tencent.base.pojo.vo.UserActionSetRpcVO;
+import com.zanxiang.advertising.tencent.base.rpc.IAdAccountRpc;
+import com.zanxiang.advertising.tencent.base.rpc.IUserActionSetRpc;
+import com.zanxiang.erp.base.ErpServer;
+import com.zanxiang.erp.base.rpc.ISysUserRpc;
+import com.zanxiang.erp.security.util.SecurityUtil;
+import com.zanxiang.game.module.manage.pojo.dto.AgentDTO;
+import com.zanxiang.game.module.manage.pojo.enums.AccountTypeEnum;
+import com.zanxiang.game.module.manage.pojo.params.AgentAddParam;
+import com.zanxiang.game.module.manage.pojo.params.AgentListParam;
+import com.zanxiang.game.module.manage.pojo.vo.AgentVO;
+import com.zanxiang.game.module.manage.pojo.vo.GameInfoVO;
 import com.zanxiang.game.module.manage.service.IAgentService;
+import com.zanxiang.game.module.manage.service.IGameService;
 import com.zanxiang.game.module.mybatis.entity.Agent;
 import com.zanxiang.game.module.mybatis.mapper.AgentMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
+import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.apache.logging.log4j.util.Strings;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * @author wcc
+ */
 @Slf4j
 @Service
-public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent>
-        implements IAgentService {
+public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements IAgentService {
+
+    @Autowired
+    private IGameService gameService;
+
+    @DubboReference(providedBy = AdvertisingTencentServer.SERVER_DUBBO_NAME)
+    private IAdAccountRpc adAccountRpc;
+
+    @DubboReference(providedBy = AdvertisingTencentServer.SERVER_DUBBO_NAME)
+    private IUserActionSetRpc userActionSetRpc;
+
+    @DubboReference(providedBy = ErpServer.SERVER_DUBBO_NAME)
+    private ISysUserRpc sysUserRpc;
+
+    @Override
+    public IPage<AgentVO> listOfPage(AgentListParam param) {
+        IPage<Agent> agentIPage = page(param.toPage(), new LambdaQueryWrapper<Agent>()
+                .like(StringUtils.isNotEmpty(param.getAgentName()), Agent::getAgentName, param.getAgentName())
+                .eq(StringUtils.isNoneBlank(param.getAgentKey()), Agent::getAgentKey, param.getAgentKey())
+                .eq(param.getAccountType() != null, Agent::getAccountType, param.getAccountType())
+                .eq(param.getAccountId() != null, Agent::getAccountId, param.getAccountId())
+                .eq(param.getGameId() != null, Agent::getGameId, param.getGameId())
+                .eq(param.getBackPolicyId() != null, Agent::getBackPolicyId, param.getBackPolicyId())
+                .eq(param.getPutStatus() != null, Agent::getPutStatus, param.getPutStatus())
+                .ge(param.getCreateBeginTime() != null, Agent::getCreateTime, param.getCreateBeginTime() == null ? null : LocalDateTime.of(param.getCreateBeginTime(), LocalTime.MIDNIGHT))
+                .le(param.getCreateEndTime() != null, Agent::getCreateTime, param.getCreateEndTime() == null ? null : LocalDateTime.of(param.getCreateEndTime(), LocalTime.MIDNIGHT))
+                .eq(Agent::getCreateBy, param.getPutUserId() == null ? SecurityUtil.getUserId() : param.getPutUserId())
+                .orderByDesc(Agent::getCreateTime)
+        );
+        IPage<AgentVO> result = new Page<>(agentIPage.getCurrent(), agentIPage.getSize(), agentIPage.getTotal());
+        if (CollectionUtils.isNotEmpty(agentIPage.getRecords())) {
+            result.setRecords(toVOBatch(agentIPage.getRecords()));
+        }
+        return result;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean add(AgentAddParam param) {
+        if (count(new LambdaQueryWrapper<Agent>()
+                .eq(Agent::getAccountType, param.getAccountType())
+                .eq(Agent::getAccountId, param.getAccountId())
+        ) > 0) {
+            throw new BaseException("一个账号只能建一个渠道,投一个游戏!!!");
+        }
+        return save(Agent.builder()
+                .agentName(param.getAgentName())
+                .agentKey(UUID.randomUUID().toString().replaceAll("-", ""))
+                .accountType(param.getAccountType())
+                .accountId(param.getAccountId())
+                .gameId(param.getGameId())
+                .userActionSetId(param.getUserActionSetId())
+                .backPolicyId(param.getBackPolicyId())
+                .putStatus(param.getPutStatus())
+                .createTime(LocalDateTime.now())
+                .createBy(SecurityUtil.getUserId())
+                .build());
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean configPutStatus(List<Long> agentIdList, Integer putStatus) {
+        return update(new LambdaUpdateWrapper<Agent>()
+                .set(Agent::getPutStatus, putStatus)
+                .set(Agent::getUpdateBy, SecurityUtil.getUserId())
+                .set(Agent::getUpdateTime, agentIdList)
+                .in(Agent::getId, agentIdList)
+        );
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean configBackPolicy(List<Long> agentIdList, Long backPolicyId) {
+        return update(new LambdaUpdateWrapper<Agent>()
+                .set(Agent::getBackPolicyId, backPolicyId)
+                .set(Agent::getUpdateBy, SecurityUtil.getUserId())
+                .set(Agent::getUpdateTime, agentIdList)
+                .in(Agent::getId, agentIdList)
+        );
+    }
+
+    private List<AgentVO> toVOBatch(List<Agent> agentList) {
+        if (CollectionUtils.isEmpty(agentList)) {
+            return Collections.emptyList();
+        }
+        Set<Long> gameIds = new HashSet<>(agentList.size());
+        Set<Long> txAccountIds = new HashSet<>(agentList.size());
+        Set<Long> userIds = new HashSet<>(1);
+        agentList.forEach(agent -> {
+            gameIds.add(agent.getGameId());
+            if (AccountTypeEnum.TENCENT.getValue().equals(agent.getAccountType())) {
+                txAccountIds.add(agent.getAccountId());
+            }
+            userIds.add(agent.getCreateBy());
+        });
+        Map<String, UserActionSetRpcVO> userActionSetMap = new HashMap<>();
+        if (CollectionUtils.isNotEmpty(txAccountIds)) {
+            for (Long txAccountId : txAccountIds) {
+                List<UserActionSetRpcVO> userActionSetList = userActionSetRpc.getByAccount(txAccountId).getData();
+                if (CollectionUtils.isEmpty(userActionSetList)) {
+                    continue;
+                }
+                userActionSetMap.putAll(userActionSetList.stream().collect(Collectors.toMap(obj -> obj.getAccountId() + "_" + obj.getUserActionSetId(), Function.identity())));
+            }
+        }
+        Map<Long, GameInfoVO> gameMap = gameService.infoByIds(gameIds).stream().collect(Collectors.toMap(GameInfoVO::getId, Function.identity()));
+        Map<Long, String> userMap = sysUserRpc.getUserNameByIds(new ArrayList<>(userIds)).getData();
+        return agentList.stream().map(agent -> {
+            AgentVO vo = BeanUtil.copy(agent, AgentVO.class);
+            vo.setGameInfo(gameMap.get(agent.getGameId()));
+            if (AccountTypeEnum.TENCENT.getValue().equals(agent.getAccountType())) {
+                vo.setUserActionSet(userActionSetMap.get(agent.getAccountId() + "_" + agent.getUserActionSetId()));
+            }
+            vo.setCreateByName(userMap.get(agent.getCreateBy()));
+            return vo;
+        }).collect(Collectors.toList());
+    }
+
+    @Override
+    public List<AgentDTO> listUserAgent(String account, String pitcherId, Long agentId) {
+        List<Agent> agentList;
+        //超管权限
+        if (SecurityUtil.isAdmin()) {
+            agentList = super.list(new LambdaQueryWrapper<Agent>()
+                    .eq(Strings.isNotBlank(account), Agent::getAccountId, account)
+                    .eq(Strings.isNotBlank(pitcherId), Agent::getCreateBy, pitcherId)
+                    .eq(agentId != null, Agent::getId, agentId));
+        } else {
+            agentList = super.list(new LambdaQueryWrapper<Agent>()
+                    .eq(Strings.isNotBlank(account), Agent::getAccountId, account)
+                    .eq(Agent::getCreateBy, Strings.isBlank(pitcherId) ? SecurityUtil.getUserId() : pitcherId)
+                    .eq(agentId != null, Agent::getId, agentId));
+        }
+        if (CollectionUtils.isEmpty(agentList)) {
+            return Collections.emptyList();
+        }
+        //设置归属投手
+        List<Long> createByList = agentList.stream().map(Agent::getCreateBy).collect(Collectors.toList());
+        Map<Long, String> userMap = sysUserRpc.getUserNameByIds(createByList).getData();
+        return agentList.stream().map(agent -> {
+            AgentDTO agentDTO = BeanUtil.copy(agent, AgentDTO.class);
+            agentDTO.setCreateByName(userMap.get(agent.getCreateBy()));
+            return agentDTO;
+        }).collect(Collectors.toList());
+    }
 }

+ 6 - 6
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/CpServiceImpl.java

@@ -5,8 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.utils.BeanUtils;
-import com.zanxiang.game.module.base.utils.StringUtils;
 import com.zanxiang.game.module.manage.pojo.dto.CpDTO;
 import com.zanxiang.game.module.manage.pojo.params.CpAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.CpListParam;
@@ -15,8 +13,10 @@ import com.zanxiang.game.module.manage.pojo.vo.CpVO;
 import com.zanxiang.game.module.manage.service.ICpService;
 import com.zanxiang.game.module.mybatis.entity.Cp;
 import com.zanxiang.game.module.mybatis.mapper.CpMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.logging.log4j.util.Strings;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -87,7 +87,7 @@ public class CpServiceImpl extends ServiceImpl<CpMapper, Cp> implements ICpServi
     @Override
     public IPage<CpVO> list(CpListParam param) {
         return page(param.toPage(), new QueryWrapper<Cp>().lambda()
-                .like(StringUtils.isNotBlank(param.getCpName()), Cp::getCpName, param.getCpName())
+                .like(Strings.isNotBlank(param.getCpName()), Cp::getCpName, param.getCpName())
                 .orderByDesc(Cp::getCreateTime)
         ).convert(this::toVo);
     }
@@ -96,13 +96,13 @@ public class CpServiceImpl extends ServiceImpl<CpMapper, Cp> implements ICpServi
         if (Objects.isNull(cp)) {
             return null;
         }
-        return BeanUtils.copy(cp, CpVO.class);
+        return BeanUtil.copy(cp, CpVO.class);
     }
 
     @Override
     public List<CpChoiceVO> choiceList() {
         List<Cp> cpList = super.list(new LambdaQueryWrapper<Cp>().select(Cp::getId, Cp::getCpName));
-        return BeanUtils.copyList(cpList, CpChoiceVO.class);
+        return cpList.stream().map(cp -> BeanUtil.copy(cp, CpChoiceVO.class)).collect(Collectors.toList());
     }
 
     @Override
@@ -111,7 +111,7 @@ public class CpServiceImpl extends ServiceImpl<CpMapper, Cp> implements ICpServi
         if (CollectionUtils.isEmpty(cpList)) {
             return Collections.emptyMap();
         }
-        List<CpDTO> cpDTOList = BeanUtils.copyList(cpList, CpDTO.class);
+        List<CpDTO> cpDTOList = cpList.stream().map(cp -> BeanUtil.copy(cp, CpDTO.class)).collect(Collectors.toList());
         return cpDTOList.stream().collect(Collectors.toMap(CpDTO::getId, Function.identity()));
     }
 

+ 112 - 7
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameAppletServiceImpl.java

@@ -1,17 +1,20 @@
 package com.zanxiang.game.module.manage.service.impl;
 
+import cn.hutool.http.HttpUtil;
+import cn.hutool.json.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.utils.BeanUtils;
 import com.zanxiang.game.module.manage.pojo.dto.GameAppletDTO;
 import com.zanxiang.game.module.manage.pojo.dto.GameDTO;
 import com.zanxiang.game.module.manage.pojo.params.GameAccountUpdateParam;
 import com.zanxiang.game.module.manage.pojo.vo.GameAccountVO;
 import com.zanxiang.game.module.manage.service.IGameAppletService;
 import com.zanxiang.game.module.manage.service.IGameService;
-import com.zanxiang.game.module.manage.service.api.MiniAppletApiService;
 import com.zanxiang.game.module.mybatis.entity.GameApplet;
 import com.zanxiang.game.module.mybatis.mapper.GameAppletMapper;
+import com.zanxiang.module.oss.service.IOssService;
+import com.zanxiang.module.util.JsonUtil;
+import com.zanxiang.module.util.URIUtil;
 import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
@@ -19,7 +22,14 @@ import org.apache.logging.log4j.util.Strings;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.io.BufferedInputStream;
+import java.io.PrintWriter;
+import java.net.HttpURLConnection;
+import java.net.URL;
 import java.time.LocalDateTime;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
 
 /**
  * @author : lingfeng
@@ -31,10 +41,10 @@ import java.time.LocalDateTime;
 public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApplet> implements IGameAppletService {
 
     @Autowired
-    private MiniAppletApiService miniAppletApiService;
+    private IGameService gameService;
 
     @Autowired
-    private IGameService gameService;
+    private IOssService ossService;
 
     @Override
     public GameAppletDTO getByGameId(Long gameId) {
@@ -55,7 +65,7 @@ public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApp
             vo.setGameId(id);
             return vo;
         }
-        return BeanUtils.copy(gameApplet, GameAccountVO.class);
+        return BeanUtil.copy(gameApplet, GameAccountVO.class);
     }
 
     @Override
@@ -80,7 +90,7 @@ public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApp
     }
 
     @Override
-    public String getQrCod(Long gameId) {
+    public String getQrCodByGameId(Long gameId) {
         GameDTO gameDTO = gameService.getById(gameId);
         if (gameDTO == null) {
             throw new BaseException("游戏不存在");
@@ -89,6 +99,101 @@ public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApp
         if (gameApplet == null || Strings.isBlank(gameApplet.getAppId()) || Strings.isBlank(gameApplet.getAppSecret())) {
             throw new BaseException("该游戏未设置小程序信息");
         }
-        return miniAppletApiService.getQrCode(gameApplet.getAppId(), gameApplet.getAppSecret(), gameDTO.getName());
+        return this.getQrCode(gameApplet.getAppId(), gameApplet.getAppSecret(), gameDTO.getName());
+    }
+
+    /**
+     * 获取游戏小程序二维码
+     *
+     * @param appId       : 小程序appId
+     * @param appSecret   : 小程序密钥
+     * @param ossFileName : oss文件名
+     * @return : 返回oss二维码图片地址
+     */
+    @Override
+    public String getQrCode(String appId, String appSecret, String ossFileName) {
+        if (Strings.isBlank(appId) || Strings.isBlank(appSecret)) {
+            throw new BaseException("参数错误, 缺少小程序信息");
+        }
+        //oss文件名
+        ossFileName = Strings.isBlank(ossFileName) ? UUID.randomUUID().toString() + ".jpg" : ossFileName + ".jpg";
+        //获取小程序token
+        String token = this.getAppletTokenApi(appId, appSecret);
+        //获取小程序二维码
+        BufferedInputStream inputStream = this.getQrCodeApi(null, token);
+        //二维码上传到oss, 返回网络地址
+        return ossService.upload(ossFileName, inputStream);
+    }
+
+    /**
+     * 获取小程序token
+     *
+     * @param appId  : 小程序appId
+     * @param secret : 小程序密钥
+     * @return : 返回小程token
+     */
+    private String getAppletTokenApi(String appId, String secret) {
+        Map<String, String> paramMap = new HashMap<>(3);
+        paramMap.put("grant_type", "client_credential");
+        paramMap.put("appid", appId);
+        paramMap.put("secret", secret);
+        String url = "https://api.weixin.qq.com/cgi-bin/token";
+        //拼接url请求参数
+        String uri = URIUtil.fillUrlParams(url, paramMap, Boolean.TRUE);
+        // 带参GET请求
+        Map<String, String> resultMap = new HashMap<>(4);
+        try {
+            String result = HttpUtil.get(uri);
+            if (Strings.isNotBlank(result)) {
+                resultMap = JsonUtil.toMap(result, Map.class, String.class, String.class);
+            }
+        } catch (Exception e) {
+            log.error("获取小程序token出现异常, appId : {},secret: {} e : {}", appId, secret, e.getMessage());
+            throw new BaseException("获取小程序token出现异常");
+        }
+        //返回token
+        if (resultMap.containsKey("access_token")) {
+            return resultMap.get("access_token");
+        }
+        //没有拿到token
+        log.error("获取token发生错误, appId : {}, secret: {}, errcode : {}, errmsg : {}", appId, secret,
+                resultMap.get("errcode"), resultMap.get("errmsg"));
+        throw new BaseException("http状态正确, 获取token发生错误");
+    }
+
+    /**
+     * 生成微信小程序二维码
+     *
+     * @param scene       : 二维码携带的参数
+     * @param accessToken : 小程序密钥
+     * @return : 返回二维码文件流
+     */
+    private BufferedInputStream getQrCodeApi(String scene, String accessToken) {
+        try {
+            //调用微信接口生成二维码
+            URL url = new URL("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + accessToken);
+            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+            connection.setRequestMethod("POST");
+            //连接超时 单位毫秒
+            connection.setConnectTimeout(10000);
+            //读取超时 单位毫秒
+            connection.setReadTimeout(2000);
+            // 发送POST请求必须设置如下两行
+            connection.setDoOutput(true);
+            connection.setDoInput(true);
+            // 获取URLConnection对象对应的输出流
+            PrintWriter printWriter = new PrintWriter(connection.getOutputStream());
+            // 发送请求参数
+            JSONObject paramJson = new JSONObject();
+            //这就是你二维码里携带的参数 String型  名称不可变
+            paramJson.set("scene", Strings.isBlank(scene) ? "a=1" : scene);
+            printWriter.write(paramJson.toString());
+            // flush输出流的缓冲
+            printWriter.flush();
+            //返回数据流
+            return new BufferedInputStream(connection.getInputStream());
+        } catch (Exception e) {
+            throw new BaseException("获取小程序二维码异常");
+        }
     }
 }

+ 8 - 5
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameCategoryServiceImpl.java

@@ -3,12 +3,12 @@ package com.zanxiang.game.module.manage.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.utils.BeanUtils;
 import com.zanxiang.game.module.manage.pojo.dto.GameCategoryDTO;
 import com.zanxiang.game.module.manage.pojo.vo.GameCategoryChoiceVO;
 import com.zanxiang.game.module.manage.service.IGameCategoryService;
 import com.zanxiang.game.module.mybatis.entity.GameCategory;
 import com.zanxiang.game.module.mybatis.mapper.GameCategoryMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -34,12 +34,14 @@ public class GameCategoryServiceImpl extends ServiceImpl<GameCategoryMapper, Gam
         if (gameCategory == null) {
             throw new BaseException("参数错误, 游戏应用类型不存在");
         }
-        return BeanUtils.copy(gameCategory, GameCategoryDTO.class);
+        return BeanUtil.copy(gameCategory, GameCategoryDTO.class);
     }
 
     @Override
     public List<GameCategoryChoiceVO> gameCategoryChoiceList() {
-        return BeanUtils.copyList(super.list(), GameCategoryChoiceVO.class);
+        return super.list().stream()
+                .map(gameCategory -> BeanUtil.copy(gameCategory, GameCategoryChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
@@ -49,8 +51,9 @@ public class GameCategoryServiceImpl extends ServiceImpl<GameCategoryMapper, Gam
         if (CollectionUtils.isEmpty(gameCategoryList)) {
             return Collections.emptyMap();
         }
-        List<GameCategoryDTO> gameCategoryDTOList = BeanUtils.copyList(gameCategoryList, GameCategoryDTO.class);
-        return gameCategoryDTOList.stream().collect(Collectors.toMap(GameCategoryDTO::getId, Function.identity()));
+        return gameCategoryList.stream()
+                .map(gameCategory -> BeanUtil.copy(gameCategory, GameCategoryDTO.class))
+                .collect(Collectors.toMap(GameCategoryDTO::getId, Function.identity()));
     }
 
 }

+ 5 - 5
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePayStrategyServiceImpl.java

@@ -4,10 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.DeleteEnum;
-import com.zanxiang.game.module.base.enums.GameStrategyTypeEnum;
-import com.zanxiang.game.module.base.enums.StatusEnum;
-import com.zanxiang.game.module.base.utils.BeanUtils;
+import com.zanxiang.game.module.base.pojo.enums.DeleteEnum;
+import com.zanxiang.game.module.base.pojo.enums.StatusEnum;
+import com.zanxiang.game.module.manage.enums.GameStrategyTypeEnum;
 import com.zanxiang.game.module.manage.pojo.dto.GameCategoryDTO;
 import com.zanxiang.game.module.manage.pojo.dto.GameDTO;
 import com.zanxiang.game.module.manage.pojo.dto.PayMerchantDTO;
@@ -17,6 +16,7 @@ import com.zanxiang.game.module.manage.pojo.vo.GamePayStrategyListVO;
 import com.zanxiang.game.module.manage.service.*;
 import com.zanxiang.game.module.mybatis.entity.GamePayStrategy;
 import com.zanxiang.game.module.mybatis.mapper.GameStrategyMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import org.apache.logging.log4j.util.Strings;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -112,7 +112,7 @@ public class GamePayStrategyServiceImpl extends ServiceImpl<GameStrategyMapper,
 
     private GamePayStrategyListVO toVO(Map<Long, GameDTO> gameMap, Map<Long, GameCategoryDTO> gameCategoryMap,
                                        GamePayStrategy gamePayStrategy, Map<String, PayMerchantDTO> payMerchantMap) {
-        GamePayStrategyListVO gamePayStrategyListVO = BeanUtils.copy(gamePayStrategy, GamePayStrategyListVO.class);
+        GamePayStrategyListVO gamePayStrategyListVO = BeanUtil.copy(gamePayStrategy, GamePayStrategyListVO.class);
         if (gamePayStrategyListVO == null) {
             return null;
         }

+ 10 - 8
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePayWayServiceImpl.java

@@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.DeleteEnum;
-import com.zanxiang.game.module.base.enums.PayDeviceEnum;
-import com.zanxiang.game.module.base.enums.PayWayEnum;
-import com.zanxiang.game.module.base.enums.StatusEnum;
-import com.zanxiang.game.module.base.utils.BeanUtils;
-import com.zanxiang.game.module.base.utils.StringUtils;
+import com.zanxiang.game.module.base.pojo.enums.DeleteEnum;
+import com.zanxiang.game.module.base.pojo.enums.PayDeviceEnum;
+import com.zanxiang.game.module.base.pojo.enums.PayWayEnum;
+import com.zanxiang.game.module.base.pojo.enums.StatusEnum;
 import com.zanxiang.game.module.manage.pojo.dto.*;
 import com.zanxiang.game.module.manage.pojo.params.GamePayWayAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.GamePayWayListParam;
@@ -19,8 +17,10 @@ import com.zanxiang.game.module.manage.service.*;
 import com.zanxiang.game.module.mybatis.entity.GameApplet;
 import com.zanxiang.game.module.mybatis.entity.GamePayWay;
 import com.zanxiang.game.module.mybatis.mapper.GamePayWayMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.logging.log4j.util.Strings;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -177,7 +177,7 @@ public class GamePayWayServiceImpl extends ServiceImpl<GamePayWayMapper, GamePay
 
     private GamePayWayListVO toVO(Map<Long, GameDTO> gameMap, Map<Long, GameCategoryDTO> gameCategoryMap, GamePayWay gamePayWay,
                                   Map<String, PayMerchantDTO> payMerchantMap, Map<Long, PayWayDTO> payWayMap, Map<Long, PayDeviceDTO> payDeviceMap) {
-        GamePayWayListVO gamePayWayListVO = BeanUtils.copy(gamePayWay, GamePayWayListVO.class);
+        GamePayWayListVO gamePayWayListVO = BeanUtil.copy(gamePayWay, GamePayWayListVO.class);
         if (gamePayWayListVO == null) {
             return null;
         }
@@ -276,7 +276,9 @@ public class GamePayWayServiceImpl extends ServiceImpl<GamePayWayMapper, GamePay
             return Collections.emptyMap();
         }
         List<Long> payDeviceIdList = gamePayWayList.stream().map(GamePayWay::getPayDeviceId).distinct().collect(Collectors.toList());
-        List<PayDeviceDTO> payDeviceDTOList = BeanUtils.copyList(payDeviceService.listByIds(payDeviceIdList), PayDeviceDTO.class);
+        List<PayDeviceDTO> payDeviceDTOList = payDeviceService.listByIds(payDeviceIdList).stream()
+                .map(payDevice -> BeanUtil.copy(payDevice, PayDeviceDTO.class))
+                .collect(Collectors.toList());
         if (CollectionUtils.isEmpty(payDeviceDTOList)) {
             return Collections.emptyMap();
         }

+ 3 - 3
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePictureServiceImpl.java

@@ -3,8 +3,7 @@ package com.zanxiang.game.module.manage.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.GameCategoryEnum;
-import com.zanxiang.game.module.base.utils.BeanUtils;
+import com.zanxiang.game.module.manage.enums.GameCategoryEnum;
 import com.zanxiang.game.module.manage.pojo.dto.GameCategoryDTO;
 import com.zanxiang.game.module.manage.pojo.dto.GameDTO;
 import com.zanxiang.game.module.manage.pojo.params.GamePictureParam;
@@ -15,6 +14,7 @@ import com.zanxiang.game.module.manage.service.IGameService;
 import com.zanxiang.game.module.mybatis.entity.Game;
 import com.zanxiang.game.module.mybatis.entity.GamePicture;
 import com.zanxiang.game.module.mybatis.mapper.GamePictureMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -44,7 +44,7 @@ public class GamePictureServiceImpl extends ServiceImpl<GamePictureMapper, GameP
         if (gamePicture == null) {
             gamePicture = GamePicture.builder().gameId(gameId).build();
         }
-        GamePictureVO gamePictureVO = BeanUtils.copy(gamePicture, GamePictureVO.class);
+        GamePictureVO gamePictureVO = BeanUtil.copy(gamePicture, GamePictureVO.class);
         GameDTO gameDTO = gameService.getById(gameId);
         gamePictureVO.setNeedAuth(gameDTO.getNeedAuth());
         gamePictureVO.setDownloadCount(gameDTO.getDownloadCount());

+ 28 - 18
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameServiceImpl.java

@@ -5,8 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.GameStatusEnum;
-import com.zanxiang.game.module.base.utils.BeanUtils;
+import com.zanxiang.game.module.manage.enums.GameStatusEnum;
 import com.zanxiang.game.module.manage.pojo.dto.GameCategoryDTO;
 import com.zanxiang.game.module.manage.pojo.dto.GameDTO;
 import com.zanxiang.game.module.manage.pojo.dto.GameTagDTO;
@@ -15,6 +14,7 @@ import com.zanxiang.game.module.manage.pojo.vo.*;
 import com.zanxiang.game.module.manage.service.*;
 import com.zanxiang.game.module.mybatis.entity.*;
 import com.zanxiang.game.module.mybatis.mapper.GameMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.logging.log4j.util.Strings;
@@ -54,7 +54,7 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
     @Override
     public GameDockVO getGameDock(Long id) {
         Game game = super.getById(id);
-        GameDockVO gameDockVO = BeanUtils.copy(game, GameDockVO.class);
+        GameDockVO gameDockVO = BeanUtil.copy(game, GameDockVO.class);
         if (gameDockVO == null) {
             return null;
         }
@@ -102,7 +102,7 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
     @Override
     public GameRelationVO getGameRelation(Long id) {
         Game game = super.getById(id);
-        GameRelationVO gameRelationVO = BeanUtils.copy(game, GameRelationVO.class);
+        GameRelationVO gameRelationVO = BeanUtil.copy(game, GameRelationVO.class);
         if (gameRelationVO == null) {
             return null;
         }
@@ -188,10 +188,15 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
                 .eq(Game::getId, param.getId()));
     }
 
+    @Override
+    public List<GameInfoVO> infoByIds(Collection<Long> gameIds) {
+        return listByIds(gameIds).stream().map(game -> BeanUtil.copy(game, GameInfoVO.class)).collect(Collectors.toList());
+    }
+
     @Override
     public GameInfoVO getGameInfo(Long gameId) {
         Game game = super.getById(gameId);
-        GameInfoVO gameInfoVO = BeanUtils.copy(game, GameInfoVO.class);
+        GameInfoVO gameInfoVO = BeanUtil.copy(game, GameInfoVO.class);
         if (gameInfoVO == null) {
             return null;
         }
@@ -204,8 +209,10 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
         if (Strings.isNotBlank(game.getTags())) {
             String[] split = game.getTags().split(",");
             List<Long> idList = Arrays.stream(split).map(Long::valueOf).collect(Collectors.toList());
-            List<GameTagVO> gameTagVOList = gameTagService.listByIds(idList);
-            gameInfoVO.setClassifyList(BeanUtils.copyList(gameTagVOList, GameTagChoiceVO.class));
+            List<GameTagChoiceVO> gameTagChoiceVOList = gameTagService.listByIds(idList).stream()
+                    .map(gameTagVO -> BeanUtil.copy(gameTagVO, GameTagChoiceVO.class))
+                    .collect(Collectors.toList());
+            gameInfoVO.setClassifyList(gameTagChoiceVOList);
         }
         if (game.getCategory() != null) {
             GameCategoryDTO gameCategoryDTO = gameCategoryService.getById(game.getCategory());
@@ -364,7 +371,7 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
 
     private GameListVO toVo(Game game, Map<Long, String> cpMap, Map<Long, GameCategoryDTO> gameCategoryMap,
                             Map<Long, String> gameMap, Map<Long, GameTagDTO> gameTagMap) {
-        GameListVO gameListVO = BeanUtils.copy(game, GameListVO.class);
+        GameListVO gameListVO = BeanUtil.copy(game, GameListVO.class);
         if (gameListVO == null) {
             return null;
         }
@@ -412,8 +419,11 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
 
     @Override
     public List<GameChoiceVO> choiceList() {
-        List<Game> gameList = super.list(new LambdaQueryWrapper<Game>().select(Game::getId, Game::getName, Game::getCategory));
-        return BeanUtils.copyList(gameList, GameChoiceVO.class);
+        return super.list(new LambdaQueryWrapper<Game>()
+                .select(Game::getId, Game::getName, Game::getCategory))
+                .stream()
+                .map(game -> BeanUtil.copy(game, GameChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
@@ -421,7 +431,7 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
         if (id == null) {
             return null;
         }
-        return BeanUtils.copy(super.getById(id), GameDTO.class);
+        return BeanUtil.copy(super.getById(id), GameDTO.class);
     }
 
     @Override
@@ -441,13 +451,12 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
         if (cpId == null && gameId == null && gameCategoryId == null) {
             return Collections.emptyList();
         }
-        List<Game> gameList = super.list(new LambdaQueryWrapper<Game>()
+        return super.list(new LambdaQueryWrapper<Game>()
                 .eq(cpId != null, Game::getCpId, cpId)
                 .eq(gameId != null, Game::getId, gameId)
                 .eq(gameCategoryId != null, Game::getCategory, gameCategoryId)
                 .select(Game::getId, Game::getCpId, Game::getName, Game::getCategory)
-        );
-        return BeanUtils.copyList(gameList, GameDTO.class);
+        ).stream().map(game -> BeanUtil.copy(game, GameDTO.class)).collect(Collectors.toList());
     }
 
     @Override
@@ -459,8 +468,8 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
         if (CollectionUtils.isEmpty(gameList)) {
             return Collections.emptyMap();
         }
-        List<GameDTO> gameDTOList = BeanUtils.copyList(gameList, GameDTO.class);
-        return gameDTOList.stream().collect(Collectors.toMap(GameDTO::getId, Function.identity()));
+        return gameList.stream().map(game -> BeanUtil.copy(game, GameDTO.class))
+                .collect(Collectors.toMap(GameDTO::getId, Function.identity()));
     }
 
     @Override
@@ -469,8 +478,9 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
         if (CollectionUtils.isEmpty(gameList)) {
             return Collections.emptyMap();
         }
-        List<GameDTO> gameDTOList = BeanUtils.copyList(gameList, GameDTO.class);
-        return gameDTOList.stream().collect(Collectors.toMap(GameDTO::getId, Function.identity()));
+        return gameList.stream()
+                .map(game -> BeanUtil.copy(game, GameDTO.class))
+                .collect(Collectors.toMap(GameDTO::getId, Function.identity()));
     }
 
     @Override

+ 9 - 9
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameTagServiceImpl.java

@@ -7,8 +7,6 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zanxiang.erp.security.util.SecurityUtil;
-import com.zanxiang.game.module.base.utils.BeanUtils;
-import com.zanxiang.game.module.base.utils.StringUtils;
 import com.zanxiang.game.module.manage.pojo.dto.GameTagDTO;
 import com.zanxiang.game.module.manage.pojo.params.GameTagAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.GameTagListParam;
@@ -17,6 +15,7 @@ import com.zanxiang.game.module.manage.pojo.vo.GameTagVO;
 import com.zanxiang.game.module.manage.service.IGameTagService;
 import com.zanxiang.game.module.mybatis.entity.GameTag;
 import com.zanxiang.game.module.mybatis.mapper.GameTagMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.logging.log4j.util.Strings;
@@ -42,12 +41,12 @@ public class GameTagServiceImpl extends ServiceImpl<GameTagMapper, GameTag> impl
         if (CollectionUtils.isEmpty(ids)) {
             return Collections.emptyList();
         }
-        return BeanUtils.copyList(super.listByIds(ids), GameTagVO.class);
+        return super.listByIds(ids).stream().map(gameTag -> BeanUtil.copy(gameTag, GameTagVO.class)).collect(Collectors.toList());
     }
 
     @Override
     public List<GameTagChoiceVO> gameTagsChoiceList() {
-        return BeanUtils.copyList(super.list(), GameTagChoiceVO.class);
+        return super.list().stream().map(gameTag -> BeanUtil.copy(gameTag, GameTagChoiceVO.class)).collect(Collectors.toList());
     }
 
     @Override
@@ -57,7 +56,8 @@ public class GameTagServiceImpl extends ServiceImpl<GameTagMapper, GameTag> impl
         if (CollectionUtils.isEmpty(gameTagList)) {
             return Collections.emptyMap();
         }
-        List<GameTagDTO> gameTagDTOList = BeanUtils.copyList(gameTagList, GameTagDTO.class);
+        List<GameTagDTO> gameTagDTOList = gameTagList.stream().map(gameTag -> BeanUtil.copy(gameTag, GameTagDTO.class))
+                .collect(Collectors.toList());
         return gameTagDTOList.stream().collect(Collectors.toMap(GameTagDTO::getId, Function.identity()));
     }
 
@@ -77,20 +77,20 @@ public class GameTagServiceImpl extends ServiceImpl<GameTagMapper, GameTag> impl
         List<Long> parentIdList = categoryList.stream().map(GameTag::getId).collect(Collectors.toList());
         return page(param.toPage(), new QueryWrapper<GameTag>().lambda()
                 //条件不为空没勾选父标签
-                .like(StringUtils.isNotBlank(param.getLabelName()) && !Objects.equals(param.getIsParent(), Boolean.TRUE),
+                .like(Strings.isNotBlank(param.getLabelName()) && !Objects.equals(param.getIsParent(), Boolean.TRUE),
                         GameTag::getName, param.getLabelName())
                 //条件为空查询所有父标签
-                .eq(StringUtils.isBlank(param.getLabelName()) && Objects.equals(param.getIsParent(), Boolean.TRUE),
+                .eq(Strings.isBlank(param.getLabelName()) && Objects.equals(param.getIsParent(), Boolean.TRUE),
                         GameTag::getIsParent, Boolean.TRUE)
                 //条件不为空查询父标签
-                .and(StringUtils.isNotBlank(param.getLabelName()) && Objects.equals(param.getIsParent(), Boolean.TRUE),
+                .and(Strings.isNotBlank(param.getLabelName()) && Objects.equals(param.getIsParent(), Boolean.TRUE),
                         qw -> qw.in(GameTag::getParentId, parentIdList).or().like(GameTag::getName, param.getLabelName()))
                 .orderByDesc(GameTag::getCreateTime))
                 .convert(this::toVo);
     }
 
     private GameTagVO toVo(GameTag gameTag) {
-        GameTagVO gameTagVO = BeanUtils.copy(gameTag, GameTagVO.class);
+        GameTagVO gameTagVO = BeanUtil.copy(gameTag, GameTagVO.class);
         if (Objects.isNull(gameTagVO)) {
             return null;
         }

+ 29 - 19
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameUserRoleServiceImpl.java

@@ -6,17 +6,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.utils.BeanUtils;
-import com.zanxiang.game.module.base.utils.StringUtils;
+import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.module.manage.pojo.dto.*;
 import com.zanxiang.game.module.manage.pojo.params.GameUserRoleListParam;
 import com.zanxiang.game.module.manage.pojo.vo.GameUserRoleListVO;
 import com.zanxiang.game.module.manage.pojo.vo.GameUserRoleVO;
 import com.zanxiang.game.module.manage.pojo.vo.GameUserVO;
 import com.zanxiang.game.module.manage.service.*;
+import com.zanxiang.game.module.mybatis.entity.Agent;
 import com.zanxiang.game.module.mybatis.entity.GameUserRole;
-import com.zanxiang.game.module.mybatis.entity.PromoChannel;
 import com.zanxiang.game.module.mybatis.mapper.GameUserRoleMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.logging.log4j.util.Strings;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +25,8 @@ import org.springframework.stereotype.Service;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 /**
  * @author : lingfeng
@@ -51,12 +53,12 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
     private ICpService cpService;
 
     @Autowired
-    private IPromoChannelService promoChannelService;
+    private IAgentService agentService;
 
     @Override
     public GameUserRoleDTO getByRoleId(String roleId) {
         GameUserRole gameUserRole = super.getOne(new LambdaQueryWrapper<GameUserRole>().eq(GameUserRole::getRoleId, roleId));
-        return BeanUtils.copy(gameUserRole, GameUserRoleDTO.class);
+        return BeanUtil.copy(gameUserRole, GameUserRoleDTO.class);
     }
 
     @Override
@@ -67,7 +69,7 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
         }
         List<GameUserRoleVO> list = new ArrayList<>();
         gameUserRoleList.forEach(role -> {
-            GameUserRoleVO gameUserRoleVO = BeanUtils.copy(role, GameUserRoleVO.class);
+            GameUserRoleVO gameUserRoleVO = BeanUtil.copy(role, GameUserRoleVO.class);
             if (gameUserRoleVO == null) {
                 return;
             }
@@ -84,9 +86,9 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
             //玩家游戏信息
             GameUserVO gameUserVO = gameUserService.getById(role.getGameUserId());
             if (gameUserVO != null) {
-                PromoChannel promoChannel = promoChannelService.getById(gameUserVO.getAgentId());
-                if (promoChannel != null) {
-                    gameUserRoleVO.setChannelName(promoChannel.getChannel());
+                Agent agent = agentService.getById(gameUserVO.getAgentId());
+                if (agent != null) {
+                    gameUserRoleVO.setAgentName(agent.getAgentName());
                 }
             }
             list.add(gameUserRoleVO);
@@ -96,9 +98,16 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
 
     @Override
     public IPage<GameUserRoleListVO> list(GameUserRoleListParam param) {
+        //渠道列表
+        List<AgentDTO> agentDTOList = agentService.listUserAgent(null, null, param.getChannelId());
+        //根据条件, 匹配渠道
+        if (CollectionUtils.isEmpty(agentDTOList) && !SecurityUtil.isAdmin()) {
+            return new Page<>();
+        }
+        //渠道id
+        List<Long> agentIdList = agentDTOList.stream().map(AgentDTO::getId).collect(Collectors.toList());
         //玩家条件处理
-        Map<Long, UserDTO> userMap = userService.userCondition(param.getUserId(), param.getChannelId() == null ? null : Collections.singletonList(param.getChannelId()),
-                param.getUserName(), param.getNickname(), param.getRegIp(), null);
+        Map<Long, UserDTO> userMap = userService.userCondition(param.getUserId(), agentIdList, param.getUserName(), param.getNickname(), param.getRegIp());
         //根据条件, 匹配不到玩家
         if (userMap != null && userMap.isEmpty()) {
             return new Page<>();
@@ -111,9 +120,9 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
         if (gameMap != null && gameMap.isEmpty()) {
             return new Page<>();
         }
-        Map<Long, PromoChannelDTO> channelMap = promoChannelService.promoChannelMap();
         Map<Long, CpDTO> cpMap = cpService.cpMap();
         Map<Long, GameCategoryDTO> gameCategoryMap = gameCategoryService.gameCategoryMap();
+        Map<Long, AgentDTO> agentMap = agentDTOList.stream().collect(Collectors.toMap(AgentDTO::getId, Function.identity()));
         //执行查询
         return page(param.toPage(), new QueryWrapper<GameUserRole>().lambda()
                 .in(CollectionUtils.isNotEmpty(userIdSet), GameUserRole::getUserId, userIdSet)
@@ -130,28 +139,29 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
                 .ge(param.getRechargeBeginDate() != null, GameUserRole::getLastRechargeTime, param.getRechargeBeginDate() == null ? null : LocalDateTime.of(param.getRechargeBeginDate(), LocalTime.MIN))
                 .le(param.getRechargeEndDate() != null, GameUserRole::getLastRechargeTime, param.getRechargeEndDate() == null ? null : LocalDateTime.of(param.getRechargeEndDate(), LocalTime.MAX))
                 .orderByDesc(GameUserRole::getCreateTime)
-        ).convert(u -> this.toVo(u, userMap, gameMap, channelMap, cpMap, gameCategoryMap));
+        ).convert(u -> this.toVo(u, userMap, gameMap, cpMap, gameCategoryMap, agentMap));
     }
 
     private GameUserRoleListVO toVo(GameUserRole gameUserRole, Map<Long, UserDTO> userMap, Map<Long, GameDTO> gameMap,
-                                    Map<Long, PromoChannelDTO> channelMap, Map<Long, CpDTO> cpMap, Map<Long, GameCategoryDTO> categoryMap) {
-        GameUserRoleListVO gameUserRoleListVO = BeanUtils.copy(gameUserRole, GameUserRoleListVO.class);
+                                    Map<Long, CpDTO> cpMap, Map<Long, GameCategoryDTO> categoryMap, Map<Long, AgentDTO> agentMap) {
+        GameUserRoleListVO gameUserRoleListVO = BeanUtil.copy(gameUserRole, GameUserRoleListVO.class);
         if (Objects.isNull(gameUserRoleListVO)) {
             return null;
         }
-        UserDTO userDTO = StringUtils.isEmpty(userMap) ? null : userMap.get(gameUserRoleListVO.getUserId());
+        UserDTO userDTO = CollectionUtils.isEmpty(userMap) ? null : userMap.get(gameUserRoleListVO.getUserId());
         if (userDTO == null) {
             userDTO = userService.getById(gameUserRoleListVO.getUserId());
         }
         if (userDTO != null) {
             gameUserRoleListVO.setUsername(userDTO.getUsername());
             gameUserRoleListVO.setNickname(userDTO.getNickname());
-            gameUserRoleListVO.setAgentId(userDTO.getAgentId());
-            gameUserRoleListVO.setChannel(channelMap.get(userDTO.getAgentId()) == null ? null : channelMap.get(userDTO.getAgentId()).getChannel());
             gameUserRoleListVO.setRegIp(userDTO.getIp());
             gameUserRoleListVO.setRegTime(userDTO.getCreateTime());
+            gameUserRoleListVO.setAgentId(userDTO.getAgentId());
+            AgentDTO agentDTO = agentMap.get(userDTO.getAgentId());
+            gameUserRoleListVO.setAgentName(agentDTO == null ? null : agentDTO.getAgentName());
         }
-        GameDTO gameDTO = StringUtils.isEmpty(gameMap) ? null : gameMap.get(gameUserRoleListVO.getGameId());
+        GameDTO gameDTO = CollectionUtils.isEmpty(gameMap) ? null : gameMap.get(gameUserRoleListVO.getGameId());
         if (gameDTO == null) {
             gameDTO = gameService.getById(gameUserRoleListVO.getGameId());
         }

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff