Procházet zdrojové kódy

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

# Conflicts:
#	game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/AgentListDTO.java
#	game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/AgentServiceImpl.java
wcc před 1 rokem
rodič
revize
b26b6dbb68
100 změnil soubory, kde provedl 988 přidání a 1006 odebrání
  1. 7 0
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/ServerInfo.java
  2. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/BanStatusEnum.java
  3. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/CpStatusEnum.java
  4. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/DeleteEnum.java
  5. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/HttpStatusEnum.java
  6. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/OsEnum.java
  7. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PayApplicationTypeEnum.java
  8. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PayDeviceEnum.java
  9. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PayWayEnum.java
  10. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PromoAccountTypeEnum.java
  11. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PromoMediaTypeEnum.java
  12. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/PromoProviderEnum.java
  13. 1 1
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/StatusEnum.java
  14. 0 48
      game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/utils/BeanUtils.java
  15. 26 9
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/ChoiceController.java
  16. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/OssController.java
  17. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/FileTypeEnum.java
  18. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/GameCategoryEnum.java
  19. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/GameStatusEnum.java
  20. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/GameStrategyTypeEnum.java
  21. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/enums/VipLevelEnum.java
  22. 46 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/AgentDTO.java
  23. 0 40
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/AgentListDTO.java
  24. 31 41
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/UserDTO.java
  25. 55 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/AgentAddParam.java
  26. 71 0
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/AgentListParam.java
  27. 6 30
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameUserListParam.java
  28. 0 6
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserListParam.java
  29. 20 4
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/AgentVO.java
  30. 4 28
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameUserListVO.java
  31. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameUserRoleListVO.java
  32. 1 1
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameUserRoleVO.java
  33. 5 14
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/OrderVO.java
  34. 9 51
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/UserListVO.java
  35. 3 9
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/UserVO.java
  36. 40 3
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IAgentService.java
  37. 0 8
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IGameUserService.java
  38. 1 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IUserService.java
  39. 63 42
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/AgentServiceImpl.java
  40. 4 4
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/CpServiceImpl.java
  41. 1 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameAppletServiceImpl.java
  42. 8 5
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameCategoryServiceImpl.java
  43. 5 5
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePayStrategyServiceImpl.java
  44. 9 7
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePayWayServiceImpl.java
  45. 3 3
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePictureServiceImpl.java
  46. 23 19
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameServiceImpl.java
  47. 6 5
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameTagServiceImpl.java
  48. 27 16
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameUserRoleServiceImpl.java
  49. 33 53
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameUserServiceImpl.java
  50. 3 3
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/IpBanServiceImpl.java
  51. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/LogPayCpServiceImpl.java
  52. 31 43
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/OrderServiceImpl.java
  53. 14 11
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PayApplicationServiceImpl.java
  54. 10 8
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PayBoxServiceImpl.java
  55. 8 10
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PayDeviceServiceImpl.java
  56. 15 12
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PayMerchantServiceImpl.java
  57. 3 4
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PayWayServiceImpl.java
  58. 21 11
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PromoAccountServiceImpl.java
  59. 15 9
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PromoChannelServiceImpl.java
  60. 11 7
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PromoMediaServiceImpl.java
  61. 10 7
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PromoSiteServiceImpl.java
  62. 5 3
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/UserAddressServiceImpl.java
  63. 3 3
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/UserBanServiceImpl.java
  64. 2 2
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/UserLoginLogServiceImpl.java
  65. 39 64
      game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/UserServiceImpl.java
  66. 0 30
      game-module/game-module-mybatis/src/main/java/com/zanxiang/game/module/mybatis/entity/GameUser.java
  67. 5 18
      game-module/game-module-mybatis/src/main/java/com/zanxiang/game/module/mybatis/entity/GameUserRole.java
  68. 24 44
      game-module/game-module-mybatis/src/main/java/com/zanxiang/game/module/mybatis/entity/User.java
  69. 0 6
      game-module/game-module-sdk/pom.xml
  70. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/adapter/ArgumentAdapter.java
  71. 2 2
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/adapter/WebHandlerAdapter.java
  72. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/controller/PayController.java
  73. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/CallBackEnum.java
  74. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/DeviceTypeEnum.java
  75. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/ExpireTimeEnum.java
  76. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/OrderStateEnum.java
  77. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/SmsTypeEnum.java
  78. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/listener/OrderPaySuccessListener.java
  79. 67 26
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/pojo/dto/UserDTO.java
  80. 4 6
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/IAgentService.java
  81. 13 16
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/ICallBackService.java
  82. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/ISmsService.java
  83. 2 2
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/api/WxApiService.java
  84. 21 0
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/AgentServiceImpl.java
  85. 81 98
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/CallBackServiceImpl.java
  86. 2 2
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameAppletServiceImpl.java
  87. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameExtServiceImpl.java
  88. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GamePayStrategyServiceImpl.java
  89. 6 4
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GamePayWayServiceImpl.java
  90. 0 2
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameUserRoleServiceImpl.java
  91. 0 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameUserServiceImpl.java
  92. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/IpBanServiceImpl.java
  93. 14 13
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/LoginServiceImpl.java
  94. 3 3
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/OrderPayServiceImpl.java
  95. 5 8
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/OrderServiceImpl.java
  96. 1 1
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/PayApplicationServiceImpl.java
  97. 3 2
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/PayMerchantServiceImpl.java
  98. 2 2
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/PerformOrderServiceImpl.java
  99. 0 32
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/PromoChannelServiceImpl.java
  100. 3 3
      game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/SmsServiceImpl.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";
+}

+ 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 - 48
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/utils/BeanUtils.java

@@ -1,48 +0,0 @@
-package com.zanxiang.game.module.base.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Bean 工具类
- *
- * @author ruoyi
- */
-public class BeanUtils extends org.springframework.beans.BeanUtils {
-
-    /**
-     * 对象浅拷贝
-     *
-     * @param source 源
-     * @param target 目标
-     * @return {@link T}
-     */
-    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     目标
-     * @return {@link List}<{@link T}>
-     */
-    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;
-    }
-}

+ 26 - 9
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/ChoiceController.java

@@ -1,10 +1,12 @@
 package com.zanxiang.game.module.manage.controller;
 
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-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;
@@ -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选择列表")
@@ -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 = "推广账号联动选择列表")
@@ -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 = "支付应用选择列表")
@@ -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()));
     }
 }

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

@@ -1,7 +1,7 @@
 package com.zanxiang.game.module.manage.controller;
 
 import com.zanxiang.erp.security.annotation.PreAuthorize;
-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;

+ 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;

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

@@ -2,35 +2,81 @@ 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 - 40
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/dto/AgentListDTO.java

@@ -1,40 +0,0 @@
-package com.zanxiang.game.module.manage.pojo.dto;
-
-import com.zanxiang.game.module.mybatis.entity.Agent;
-import com.zanxiang.module.web.pojo.BaseListDTO;
-import lombok.Data;
-
-import java.time.LocalDate;
-
-@Data
-public class AgentListDTO extends BaseListDTO<Agent> {
-
-
-    private String agentName;
-
-    private String agentKey;
-
-    private Integer accountType;
-
-    private Long accountId;
-    /**
-     * 游戏id
-     */
-    private Long gameId;
-    /**
-     * 回传策略 id
-     */
-    private Long backPolicyId;
-    /**
-     * 投放状态
-     */
-    private Integer putStatus;
-    /**
-     * 投手
-     */
-    private Long putUserId;
-
-    private LocalDate createBeginTime;
-
-    private LocalDate createEndTime;
-}

+ 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;
 }

+ 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;
+}

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

@@ -0,0 +1,71 @@
+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 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;
+}

+ 6 - 30
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/GameUserListParam.java

@@ -75,6 +75,12 @@ public class GameUserListParam extends BaseListDTO<GameUser> {
     @ApiModelProperty(notes = "归因投放人员")
     private String pitcherId;
 
+    /**
+     * 是否充值
+     */
+    @ApiModelProperty(notes = "是否充值, true : 是, false : 否, 全部 : null或者不传")
+    private Boolean isRecharge;
+
     /**
      * 最近充值开始时间(开始玩开始时间请使用beginDate参数)
      */
@@ -87,36 +93,6 @@ public class GameUserListParam extends BaseListDTO<GameUser> {
     @ApiModelProperty(notes = "最近充值结束时间(开始玩结束时间请使用endDate参数)")
     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;
-
-    /**
-     * 角色vip
-     */
-    @ApiModelProperty(notes = "角色vip, 全部 : null或者不传")
-    private Integer vipLevel;
-
     /**
      * 开始时间
      */

+ 0 - 6
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/params/UserListParam.java

@@ -147,12 +147,6 @@ public class UserListParam extends BaseListDTO<User> {
     @ApiModelProperty(notes = "归因广告id")
     private String adId;
 
-    /**
-     * 是否GS
-     */
-    @ApiModelProperty(notes = "是否GS")
-    private Boolean isGs;
-
     /**
      * 是否切量
      */

+ 20 - 4
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/AgentVO.java

@@ -1,8 +1,6 @@
 package com.zanxiang.game.module.manage.pojo.vo;
 
-import com.zanxiang.advertising.tencent.base.pojo.vo.AdAccountRpcVO;
 import com.zanxiang.advertising.tencent.base.pojo.vo.UserActionSetRpcVO;
-import com.zanxiang.erp.base.pojo.vo.SysUserRpcVO;
 import lombok.Data;
 
 import java.time.LocalDateTime;
@@ -10,6 +8,9 @@ import java.time.LocalDateTime;
 @Data
 public class AgentVO {
 
+    /**
+     * 主键
+     */
     private Long id;
     /**
      * 渠道名称
@@ -36,13 +37,28 @@ public class AgentVO {
      */
     private Long userActionSetId;
 
+    /**
+     * 创建时间
+     */
     private LocalDateTime createTime;
 
+    /**
+     * 归属投手id
+     */
     private Long createBy;
 
+    /**
+     * 归属投手名称
+     */
+    private String createByName;
+
+    /**
+     * 游戏信息
+     */
     private GameInfoVO gameInfo;
 
+    /**
+     * 数据源信息
+     */
     private UserActionSetRpcVO userActionSet;
-
-    private SysUserRpcVO userInfo;
 }

+ 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;
 
     /**
      * 渠道

+ 40 - 3
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IAgentService.java

@@ -3,22 +3,59 @@ 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.dto.AgentListDTO;
+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> {
 
-    IPage<AgentVO> listOfPage(AgentListDTO dto);
+    /**
+     * 列表页面
+     *
+     * @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}>
      */
-    boolean add(AgentDTO dto);
+    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);
 }

+ 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等级最高的用户信息
      *

+ 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查询信息

+ 63 - 42
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/AgentServiceImpl.java

@@ -9,12 +9,13 @@ 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.pojo.vo.SysUserRpcVO;
+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.dto.AgentListDTO;
 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;
@@ -27,48 +28,48 @@ 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.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
+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;
-    @Autowired
+
+    @DubboReference(providedBy = ErpServer.SERVER_DUBBO_NAME)
     private ISysUserRpc sysUserRpc;
 
-    public IPage<AgentVO> listOfPage(AgentListDTO dto) {
-        IPage<Agent> agentIPage = page(dto.toPage(), new LambdaQueryWrapper<Agent>()
-                .like(StringUtils.isNotEmpty(dto.getAgentName()), Agent::getAgentName, dto.getAgentName())
-                .eq(StringUtils.isNoneBlank(dto.getAgentKey()), Agent::getAgentKey, dto.getAgentKey())
-                .eq(dto.getAccountType() != null, Agent::getAccountType, dto.getAccountType())
-                .eq(dto.getAccountId() != null, Agent::getAccountId, dto.getAccountId())
-                .eq(dto.getGameId() != null, Agent::getGameId, dto.getGameId())
-                .eq(dto.getBackPolicyId() != null, Agent::getBackPolicyId, dto.getBackPolicyId())
-                .eq(dto.getPutStatus() != null, Agent::getPutStatus, dto.getPutStatus())
-                .ge(dto.getCreateBeginTime() != null, Agent::getCreateTime, dto.getCreateBeginTime() == null ? null : LocalDateTime.of(dto.getCreateBeginTime(), LocalTime.MIDNIGHT))
-                .le(dto.getCreateEndTime() != null, Agent::getCreateTime, dto.getCreateEndTime() == null ? null : LocalDateTime.of(dto.getCreateEndTime(), LocalTime.MIDNIGHT))
-                .eq(Agent::getCreateBy, dto.getPutUserId() == null ? SecurityUtil.getUserId() : dto.getPutUserId())
+    @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(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());
@@ -80,22 +81,22 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent>
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean add(AgentDTO dto) {
+    public boolean add(AgentAddParam param) {
         if (count(new LambdaQueryWrapper<Agent>()
-                .eq(Agent::getAccountType, dto.getAccountType())
-                .eq(Agent::getAccountId, dto.getAccountId())
+                .eq(Agent::getAccountType, param.getAccountType())
+                .eq(Agent::getAccountId, param.getAccountId())
         ) > 0) {
             throw new BaseException("一个账号只能建一个渠道,投一个游戏!!!");
         }
         return save(Agent.builder()
-                .agentName(dto.getAgentName())
+                .agentName(param.getAgentName())
                 .agentKey(UUID.randomUUID().toString().replaceAll("-", ""))
-                .accountType(dto.getAccountType())
-                .accountId(dto.getAccountId())
-                .gameId(dto.getGameId())
-                .userActionSetId(dto.getUserActionSetId())
-                .backPolicyId(dto.getBackPolicyId())
-                .putStatus(dto.getPutStatus())
+                .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());
@@ -148,23 +149,43 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent>
             }
         }
         Map<Long, GameInfoVO> gameMap = gameService.infoByIds(gameIds).stream().collect(Collectors.toMap(GameInfoVO::getId, Function.identity()));
-        Map<Long, SysUserRpcVO> userMap = sysUserRpc.userInfoByIds(SecurityUtil.getCompanyId(), new ArrayList<>(userIds)).getData().stream()
-                .collect(Collectors.toMap(SysUserRpcVO::getUserId, 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.setUserInfo(userMap.get(agent.getCreateBy()));
+            vo.setCreateByName(userMap.get(agent.getCreateBy()));
             return vo;
         }).collect(Collectors.toList());
     }
 
-    private AgentVO toVOSimple(Agent agent) {
-        if (agent == null) {
-            return null;
+    @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();
         }
-        return BeanUtil.copy(agent, AgentVO.class);
+        //设置归属投手
+        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());
     }
 }

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

@@ -5,7 +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.manage.pojo.dto.CpDTO;
 import com.zanxiang.game.module.manage.pojo.params.CpAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.CpListParam;
@@ -14,6 +13,7 @@ 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;
@@ -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()));
     }
 

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

@@ -4,7 +4,6 @@ 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;
@@ -66,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

+ 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;
         }

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

@@ -4,11 +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.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;
@@ -18,6 +17,7 @@ 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;
@@ -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());

+ 23 - 19
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;
@@ -55,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;
         }
@@ -103,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;
         }
@@ -190,14 +189,14 @@ public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IG
     }
 
     @Override
-    public List<GameInfoVO> infoByIds(Collection<Long>  gameIds) {
+    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;
         }
@@ -210,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());
@@ -370,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;
         }
@@ -418,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
@@ -427,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
@@ -447,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
@@ -465,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
@@ -475,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

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

@@ -7,7 +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.manage.pojo.dto.GameTagDTO;
 import com.zanxiang.game.module.manage.pojo.params.GameTagAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.GameTagListParam;
@@ -16,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;
@@ -41,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
@@ -56,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()));
     }
 
@@ -89,7 +90,7 @@ public class GameTagServiceImpl extends ServiceImpl<GameTagMapper, GameTag> impl
     }
 
     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;
         }

+ 27 - 16
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameUserRoleServiceImpl.java

@@ -6,16 +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.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;
@@ -24,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
@@ -50,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
@@ -66,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;
             }
@@ -83,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);
@@ -95,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<>();
@@ -110,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)
@@ -129,12 +139,12 @@ 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;
         }
@@ -145,10 +155,11 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
         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 = CollectionUtils.isEmpty(gameMap) ? null : gameMap.get(gameUserRoleListVO.getGameId());
         if (gameDTO == null) {

+ 33 - 53
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameUserServiceImpl.java

@@ -1,12 +1,11 @@
 package com.zanxiang.game.module.manage.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 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.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.utils.BeanUtils;
+import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.module.manage.pojo.dto.*;
 import com.zanxiang.game.module.manage.pojo.params.GameUserListParam;
 import com.zanxiang.game.module.manage.pojo.vo.GameUserListVO;
@@ -14,13 +13,19 @@ import com.zanxiang.game.module.manage.pojo.vo.GameUserVO;
 import com.zanxiang.game.module.manage.service.*;
 import com.zanxiang.game.module.mybatis.entity.GameUser;
 import com.zanxiang.game.module.mybatis.mapper.GameUserMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.time.LocalDateTime;
 import java.time.LocalTime;
-import java.util.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 /**
  * @author : lingfeng
@@ -40,14 +45,11 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
     @Autowired
     private IGameCategoryService gameCategoryService;
 
-    @Autowired
-    private IPromoChannelService promoChannelService;
-
     @Autowired
     private ICpService cpService;
 
     @Autowired
-    private IPromoAccountService promoAccountService;
+    private IAgentService agentService;
 
     @Override
     public IPage<GameUserListVO> gameUserList(GameUserListParam param) {
@@ -58,29 +60,25 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
             return new Page<>();
         }
         //渠道列表
-        List<Long> agentIdList;
-        if (param.getChannelId() != null) {
-            agentIdList = Collections.singletonList(param.getChannelId());
-        } else {
-            agentIdList = promoChannelService.listByAccountOrPitcherId(param.getAccountId(), param.getPitcherId());
-        }
+        List<AgentDTO> agentDTOList = agentService.listUserAgent(param.getAccountId(), param.getPitcherId(), param.getChannelId());
         //根据条件, 匹配渠道
-        if (agentIdList != null && agentIdList.isEmpty()) {
+        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(), agentIdList, param.getUserName(),
-                param.getNickname(), null, param.getAdId());
+                param.getNickname(), null);
         //根据条件, 匹配不到玩家
         if (userMap != null && userMap.isEmpty()) {
             return new Page<>();
         }
         //相关用户id
-        Set<Long> userIdSet = userMap == null ? null : userMap.keySet();
-        Map<Long, PromoChannelDTO> channelMap = promoChannelService.promoChannelMap();
         Map<Long, CpDTO> cpMap = cpService.cpMap();
+        Set<Long> userIdSet = userMap == null ? null : userMap.keySet();
         Map<Long, GameCategoryDTO> gameCategoryMap = gameCategoryService.gameCategoryMap();
-        Map<Long, PromoAccountDTO> promoAccountMap = promoAccountService.promoAccountMap();
+        Map<Long, AgentDTO> agentMap = agentDTOList.stream().collect(Collectors.toMap(AgentDTO::getId, Function.identity()));
         //执行查询
         return page(param.toPage(), new QueryWrapper<GameUser>().lambda()
                 .in(CollectionUtils.isNotEmpty(userIdSet), GameUser::getUserId, userIdSet)
@@ -89,19 +87,15 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
                 .le(param.getEndDate() != null, GameUser::getCreateTime, param.getEndDate() == null ? null : LocalDateTime.of(param.getEndDate(), LocalTime.MAX))
                 .ge(param.getRechargeBeginDate() != null, GameUser::getLastRechargeTime, param.getRechargeBeginDate() == null ? null : LocalDateTime.of(param.getRechargeBeginDate(), LocalTime.MIN))
                 .le(param.getRechargeEndDate() != null, GameUser::getLastRechargeTime, param.getRechargeEndDate() == null ? null : LocalDateTime.of(param.getRechargeEndDate(), LocalTime.MAX))
-                .eq(param.getCustomerId() != null, GameUser::getCustomerId, param.getCustomerId())
-                .eq(param.getIsGs() != null, GameUser::getIsGs, param.getIsGs())
                 .gt(Objects.equals(param.getIsRecharge(), Boolean.TRUE), GameUser::getRechargeCount, 0)
                 .eq(Objects.equals(param.getIsRecharge(), Boolean.FALSE), GameUser::getRechargeCount, 0)
-                .eq(param.getVipLevel() != null && param.getVipLevel() <= 10, GameUser::getRoleVipMax, param.getVipLevel())
-                .gt(param.getVipLevel() != null && param.getVipLevel() > 10, GameUser::getRoleVipMax, param.getVipLevel())
                 .orderByDesc(GameUser::getCreateTime)
-        ).convert(u -> this.toVo(u, userMap, gameMap, promoAccountMap, channelMap, cpMap, gameCategoryMap));
+        ).convert(u -> this.toVo(u, userMap, gameMap, agentMap, cpMap, gameCategoryMap));
     }
 
-    private GameUserListVO toVo(GameUser gameUser, Map<Long, UserDTO> userMap, Map<Long, GameDTO> gameMap, Map<Long, PromoAccountDTO> promoAccountMap,
-                                Map<Long, PromoChannelDTO> channelMap, Map<Long, CpDTO> cpMap, Map<Long, GameCategoryDTO> gameCategoryMap) {
-        GameUserListVO gameUserListVO = BeanUtils.copy(gameUser, GameUserListVO.class);
+    private GameUserListVO toVo(GameUser gameUser, Map<Long, UserDTO> userMap, Map<Long, GameDTO> gameMap, Map<Long, AgentDTO> agentMap,
+                                Map<Long, CpDTO> cpMap, Map<Long, GameCategoryDTO> gameCategoryMap) {
+        GameUserListVO gameUserListVO = BeanUtil.copy(gameUser, GameUserListVO.class);
         if (Objects.isNull(gameUserListVO)) {
             return null;
         }
@@ -112,12 +106,19 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
         if (userDTO != null) {
             gameUserListVO.setNickname(userDTO.getNickname());
             gameUserListVO.setUsername(userDTO.getUsername());
-            gameUserListVO.setAgentId(userDTO.getAgentId());
-            gameUserListVO.setChannel(channelMap.get(userDTO.getAgentId()) == null ? null : channelMap.get(userDTO.getAgentId()).getChannel());
-            gameUserListVO.setAdId(userDTO.getAdId());
+            //用户渠道
+            AgentDTO agentDTO = agentMap.get(userDTO.getAgentId());
+            if (agentDTO != null) {
+                gameUserListVO.setAgentName(agentDTO.getAgentName());
+                gameUserListVO.setPitcherId(agentDTO.getCreateBy());
+                gameUserListVO.setPitcherName(agentDTO.getCreateByName());
+                gameUserListVO.setAccountId(agentDTO.getAccountId());
+            }
         }
-        GameDTO gameDTO = CollectionUtils.isEmpty(gameMap) ? null : gameMap.get(gameUserListVO.getGameId());
-        if (gameDTO == null) {
+        GameDTO gameDTO;
+        if (CollectionUtils.isNotEmpty(gameMap) && gameMap.containsKey(gameUserListVO.getGameId())) {
+            gameDTO = gameMap.get(gameUserListVO.getGameId());
+        } else {
             gameDTO = gameService.getById(gameUserListVO.getGameId());
         }
         if (gameDTO != null) {
@@ -127,32 +128,11 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
             gameUserListVO.setCpName(cpMap.get(gameDTO.getCpId()) == null ? null : cpMap.get(gameDTO.getCpId()).getCpName());
             gameUserListVO.setGameCategoryName(gameCategoryMap.get(gameDTO.getCategory()) == null ? null : gameCategoryMap.get(gameDTO.getCategory()).getName());
         }
-        PromoChannelDTO promoChannelDTO = channelMap.get(gameUserListVO.getAgentId());
-        if (promoChannelDTO != null) {
-            PromoAccountDTO promoAccountDTO = promoAccountMap.get(promoChannelDTO.getAccountId());
-            if (promoAccountDTO != null) {
-                gameUserListVO.setPitcherId(promoAccountDTO.getPitcherId());
-                gameUserListVO.setPitcherName(promoAccountDTO.getPitcherName());
-                gameUserListVO.setAccountId(promoAccountDTO.getId());
-                gameUserListVO.setAccountName(promoAccountDTO.getName());
-                gameUserListVO.setMediaId(promoAccountDTO.getMediaId());
-                gameUserListVO.setMediaName(promoAccountDTO.getMediaName());
-            }
-        }
         return gameUserListVO;
     }
 
-    @Override
-    public GameUserVO getMaxVipGameUser(Long userId) {
-        List<GameUser> gameUserList = super.list(new LambdaQueryWrapper<GameUser>()
-                .eq(GameUser::getUserId, userId)
-                .select(GameUser::getUserId, GameUser::getRoleVipMax)
-                .orderByDesc(GameUser::getRoleVipMax));
-        return BeanUtils.copy(gameUserList.get(0), GameUserVO.class);
-    }
-
     @Override
     public GameUserVO getById(Long id) {
-        return BeanUtils.copy(super.getById(id), GameUserVO.class);
+        return BeanUtil.copy(super.getById(id), GameUserVO.class);
     }
 }

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

@@ -6,8 +6,7 @@ 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.erp.security.util.SecurityUtil;
-import com.zanxiang.game.module.base.enums.BanStatusEnum;
-import com.zanxiang.game.module.base.utils.BeanUtils;
+import com.zanxiang.game.module.base.pojo.enums.BanStatusEnum;
 import com.zanxiang.game.module.manage.pojo.params.IpBanAddParam;
 import com.zanxiang.game.module.manage.pojo.params.IpBanListParam;
 import com.zanxiang.game.module.manage.pojo.params.IpBanUpdateParam;
@@ -15,6 +14,7 @@ import com.zanxiang.game.module.manage.pojo.vo.IpBanVO;
 import com.zanxiang.game.module.manage.service.IIpBanService;
 import com.zanxiang.game.module.mybatis.entity.IpBan;
 import com.zanxiang.game.module.mybatis.mapper.IpBanMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.logging.log4j.util.Strings;
 import org.springframework.stereotype.Service;
@@ -50,7 +50,7 @@ public class IpBanServiceImpl extends ServiceImpl<IpBanMapper, IpBan> implements
         if (Objects.isNull(ipBan)) {
             return null;
         }
-        return BeanUtils.copy(ipBan, IpBanVO.class);
+        return BeanUtil.copy(ipBan, IpBanVO.class);
     }
 
     @Override

+ 2 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/LogPayCpServiceImpl.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.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.utils.BeanUtils;
 import com.zanxiang.game.module.manage.pojo.params.LogPayCpParam;
 import com.zanxiang.game.module.manage.pojo.vo.LogPayCpVO;
 import com.zanxiang.game.module.manage.service.ILogPayCpService;
 import com.zanxiang.game.module.mybatis.entity.LogPayCp;
 import com.zanxiang.game.module.mybatis.mapper.LogPayCpMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import org.springframework.stereotype.Service;
 
 import java.util.Objects;
@@ -31,7 +31,7 @@ public class LogPayCpServiceImpl extends ServiceImpl<LogPayCpMapper, LogPayCp> i
         if (Objects.isNull(logPayCp)) {
             return null;
         }
-        return BeanUtils.copy(logPayCp, LogPayCpVO.class);
+        return BeanUtil.copy(logPayCp, LogPayCpVO.class);
     }
 
 }

+ 31 - 43
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/OrderServiceImpl.java

@@ -5,7 +5,7 @@ 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.erp.security.util.SecurityUtil;
 import com.zanxiang.game.module.manage.pojo.dto.*;
 import com.zanxiang.game.module.manage.pojo.params.OrderParam;
 import com.zanxiang.game.module.manage.pojo.params.UserOrderListParam;
@@ -15,6 +15,7 @@ import com.zanxiang.game.module.manage.pojo.vo.UserOrderListVO;
 import com.zanxiang.game.module.manage.service.*;
 import com.zanxiang.game.module.mybatis.entity.Order;
 import com.zanxiang.game.module.mybatis.mapper.OrderMapper;
+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;
@@ -24,6 +25,7 @@ import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -44,15 +46,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
     @Autowired
     private IGameCategoryService gameCategoryService;
 
-    @Autowired
-    private IPromoChannelService promoChannelService;
-
     @Autowired
     private ICpService cpService;
 
-    @Autowired
-    private IPromoAccountService promoAccountService;
-
     @Autowired
     private IUserService userService;
 
@@ -62,6 +58,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
     @Autowired
     private IPayDeviceService payDeviceService;
 
+    @Autowired
+    private IAgentService agentService;
+
     @Override
     public IPage<UserOrderListVO> orderList(UserOrderListParam param) {
         //执行查询
@@ -75,7 +74,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         if (order == null) {
             return null;
         }
-        UserOrderListVO orderListVO = BeanUtils.copy(order, UserOrderListVO.class);
+        UserOrderListVO orderListVO = BeanUtil.copy(order, UserOrderListVO.class);
         orderListVO.setId(order.getOrderId());
         //查询角色名称
         GameUserRoleDTO gameUserRoleDTO = gameUserRoleService.getByRoleId(order.getRoleId());
@@ -99,16 +98,14 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
     @Override
     public OrderListVO orderList(OrderParam param) {
         //渠道列表
-        List<Long> agentIds;
-        if (param.getChannelId() == null) {
-            agentIds = promoChannelService.listByAccountOrPitcherId(param.getAccountId(), param.getPitcherId());
-        } else {
-            agentIds = Collections.singletonList(param.getChannelId());
-        }
+        List<AgentDTO> agentDTOList = agentService.listUserAgent(param.getAccountId(), param.getPitcherId(), param.getChannelId());
         //根据条件, 匹配渠道
-        if (agentIds != null && agentIds.isEmpty()) {
+        if (CollectionUtils.isEmpty(agentDTOList) && !SecurityUtil.isAdmin()) {
             return new OrderListVO(param.toPage().getSize());
         }
+        //渠道id列表
+        List<Long> agentIds = agentDTOList.stream().map(AgentDTO::getId).collect(Collectors.toList());
+        //查询订单列表
         IPage<OrderVO> page = page(param.toPage(), getListWrapper(param, agentIds, "*")).convert(this::orderToVo);
         if (page.getTotal() == 0) {
             return new OrderListVO(param.toPage().getSize());
@@ -130,11 +127,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         //玩家信息
         List<Long> userIdList = orderListVOList.stream().map(OrderVO::getUserId).collect(Collectors.toList());
         Map<Long, UserDTO> userMap = userService.getByUserIds(userIdList);
-        //渠道信息
-        List<Long> agentIdList = orderListVOList.stream().map(OrderVO::getAgentId).collect(Collectors.toList());
-        Map<Long, PromoChannelDTO> channelMap = promoChannelService.promoChannelMap(agentIdList);
-        //推广账号信息
-        Map<Long, PromoAccountDTO> promoAccountMap = promoAccountService.promoAccountMap();
+        //渠道
+        Map<Long, AgentDTO> agentMap = agentDTOList.stream().collect(Collectors.toMap(AgentDTO::getId, Function.identity()));
         //游戏信息
         List<Long> gameIds = orderListVOList.stream().map(OrderVO::getGameId).collect(Collectors.toList());
         List<Long> regGameIds = orderListVOList.stream().map(OrderVO::getRegGameId).collect(Collectors.toList());
@@ -149,8 +143,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         //支付方式列表
         Map<Long, PayDeviceDTO> payDeviceMap = payDeviceService.payDeviceMap();
         //字段信息补充更新
-        orderListVOList.forEach(vo -> this.update(vo, userMap, channelMap, gameMap, gameCategoryMap, cpMap,
-                promoAccountMap, payWayMap, payDeviceMap));
+        orderListVOList.forEach(vo -> this.update(vo, userMap, gameMap, gameCategoryMap, cpMap,
+                payWayMap, payDeviceMap, agentMap));
         //设置返回
         OrderListVO orderListVO = new OrderListVO();
         orderListVO.setSize(page.getSize());
@@ -162,33 +156,27 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         return orderListVO;
     }
 
-    private void update(OrderVO orderVO, Map<Long, UserDTO> userMap, Map<Long, PromoChannelDTO> channelMap,
-                        Map<Long, GameDTO> gameMap, Map<Long, GameCategoryDTO> gameCategoryMap, Map<Long, CpDTO> cpMap,
-                        Map<Long, PromoAccountDTO> promoAccountMap, Map<Long, PayWayDTO> payWayMap, Map<Long, PayDeviceDTO> payDeviceMap) {
+    private void update(OrderVO orderVO, Map<Long, UserDTO> userMap, Map<Long, GameDTO> gameMap,
+                        Map<Long, GameCategoryDTO> gameCategoryMap, Map<Long, CpDTO> cpMap, Map<Long, PayWayDTO> payWayMap,
+                        Map<Long, PayDeviceDTO> payDeviceMap, Map<Long, AgentDTO> agentMap) {
         orderVO.setDateTime(orderVO.getCreateTime().toLocalDate());
         //用户信息补充
         UserDTO userDTO = userMap.get(orderVO.getUserId());
         if (userDTO != null) {
             //注册渠道
-            PromoChannelDTO promoChannelDTO = channelMap.get(userDTO.getAgentId());
-            if (promoChannelDTO != null) {
-                orderVO.setRegAgentId(userDTO.getAgentId());
-                orderVO.setRegChannel(promoChannelDTO.getChannel());
+            AgentDTO agentDTO = agentMap.get(userDTO.getRegAgentId());
+            if (agentDTO != null) {
+                orderVO.setRegAgentId(agentDTO.getId());
+                orderVO.setRegAgentName(agentDTO.getAgentName());
             }
         }
-        //渠道信息补充
-        PromoChannelDTO promoChannelDTO = channelMap.get(orderVO.getAgentId());
-        if (promoChannelDTO != null) {
-            orderVO.setChannel(promoChannelDTO.getChannel());
-            PromoAccountDTO promoAccountDTO = promoAccountMap.get(promoChannelDTO.getAccountId());
-            if (promoAccountDTO != null) {
-                orderVO.setAccountName(promoAccountDTO.getName());
-                orderVO.setAccountId(promoAccountDTO.getId());
-                orderVO.setPitcherId(promoAccountDTO.getPitcherId());
-                orderVO.setPitcherName(promoAccountDTO.getPitcherName());
-                orderVO.setMediaId(promoAccountDTO.getMediaId());
-                orderVO.setMediaName(promoAccountDTO.getMediaName());
-            }
+        //充值渠道
+        AgentDTO agentDTO = agentMap.get(orderVO.getAgentId());
+        if (agentDTO != null) {
+            orderVO.setAccountId(agentDTO.getId());
+            orderVO.setPitcherId(agentDTO.getCreateBy());
+            orderVO.setPitcherName(agentDTO.getCreateByName());
+            orderVO.setAccountType(agentDTO.getAccountType());
         }
         //注册游戏
         GameDTO regGameDTO = gameMap.get(orderVO.getRegGameId());
@@ -260,6 +248,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         if (Objects.isNull(order)) {
             return null;
         }
-        return BeanUtils.copy(order, OrderVO.class);
+        return BeanUtil.copy(order, OrderVO.class);
     }
 }

+ 14 - 11
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PayApplicationServiceImpl.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.PayApplicationTypeEnum;
-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.PayApplicationTypeEnum;
+import com.zanxiang.game.module.base.pojo.enums.StatusEnum;
 import com.zanxiang.game.module.manage.pojo.dto.PayApplicationDTO;
 import com.zanxiang.game.module.manage.pojo.params.PayApplicationAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PayApplicationListParam;
@@ -17,6 +16,7 @@ import com.zanxiang.game.module.manage.service.IGameAppletService;
 import com.zanxiang.game.module.manage.service.IPayApplicationService;
 import com.zanxiang.game.module.mybatis.entity.PayApplication;
 import com.zanxiang.game.module.mybatis.mapper.PayApplicationMapper;
+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;
@@ -48,7 +48,9 @@ public class PayApplicationServiceImpl extends ServiceImpl<PayApplicationMapper,
         List<PayApplication> payApplicationList = super.list(new LambdaQueryWrapper<PayApplication>()
                 .select(PayApplication::getAppId, PayApplication::getType, PayApplication::getAppName)
         );
-        return BeanUtils.copyList(payApplicationList, PayApplicationChoiceVO.class);
+        return payApplicationList.stream()
+                .map(payApplication -> BeanUtil.copy(payApplication, PayApplicationChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
@@ -63,7 +65,7 @@ public class PayApplicationServiceImpl extends ServiceImpl<PayApplicationMapper,
     }
 
     private PayApplicationVO toVo(PayApplication payApplication) {
-        PayApplicationVO applicationVO = BeanUtils.copy(payApplication, PayApplicationVO.class);
+        PayApplicationVO applicationVO = BeanUtil.copy(payApplication, PayApplicationVO.class);
         if (Objects.isNull(applicationVO)) {
             return null;
         }
@@ -177,8 +179,9 @@ public class PayApplicationServiceImpl extends ServiceImpl<PayApplicationMapper,
         if (CollectionUtils.isEmpty(payApplicationList)) {
             return Collections.emptyMap();
         }
-        return BeanUtils.copyList(payApplicationList, PayApplicationDTO.class)
-                .stream().collect(Collectors.toMap(PayApplicationDTO::getAppId, Function.identity()));
+        return payApplicationList.stream()
+                .map(payApplication -> BeanUtil.copy(payApplication, PayApplicationDTO.class))
+                .collect(Collectors.toMap(PayApplicationDTO::getAppId, Function.identity()));
     }
 
     @Override
@@ -187,8 +190,8 @@ public class PayApplicationServiceImpl extends ServiceImpl<PayApplicationMapper,
         if (CollectionUtils.isEmpty(payApplicationList)) {
             return Collections.emptyMap();
         }
-        return BeanUtils.copyList(payApplicationList, PayApplicationDTO.class)
-                .stream().collect(Collectors.toMap(PayApplicationDTO::getAppId, Function.identity()));
+        return payApplicationList.stream().map(payApplication -> BeanUtil.copy(payApplication, PayApplicationDTO.class))
+                .collect(Collectors.toMap(PayApplicationDTO::getAppId, Function.identity()));
     }
 
     @Override
@@ -198,6 +201,6 @@ public class PayApplicationServiceImpl extends ServiceImpl<PayApplicationMapper,
         if (payApplication == null) {
             throw new BaseException("参数错误, 支付应用appId对应信息不存在");
         }
-        return BeanUtils.copy(payApplication, PayApplicationDTO.class);
+        return BeanUtil.copy(payApplication, PayApplicationDTO.class);
     }
 }

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

@@ -6,10 +6,9 @@ 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.enums.DeleteEnum;
-import com.zanxiang.game.module.base.enums.PayApplicationTypeEnum;
-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.PayApplicationTypeEnum;
+import com.zanxiang.game.module.base.pojo.enums.StatusEnum;
 import com.zanxiang.game.module.manage.pojo.dto.PayApplicationDTO;
 import com.zanxiang.game.module.manage.pojo.dto.PayBoxDTO;
 import com.zanxiang.game.module.manage.pojo.dto.PayMerchantDTO;
@@ -35,6 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
 import javax.annotation.Resource;
 import java.time.LocalDateTime;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @author : lingfeng
@@ -54,9 +54,11 @@ public class PayBoxServiceImpl extends ServiceImpl<PayBoxMapper, PayBox> impleme
 
     @Override
     public List<PayBoxChoiceVO> payBoxChoiceList() {
-        List<PayBox> payBoxList = super.list(new LambdaQueryWrapper<PayBox>()
-                .select(PayBox::getId, PayBox::getType, PayBox::getName));
-        return BeanUtils.copyList(payBoxList, PayBoxChoiceVO.class);
+        return super.list(new LambdaQueryWrapper<PayBox>()
+                .select(PayBox::getId, PayBox::getType, PayBox::getName))
+                .stream()
+                .map(payBox -> BeanUtil.copy(payBox, PayBoxChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
@@ -96,7 +98,7 @@ public class PayBoxServiceImpl extends ServiceImpl<PayBoxMapper, PayBox> impleme
     }
 
     private PayBoxListVO toVo(PayBox payBox, Map<String, PayApplicationDTO> payApplicationMap, Map<String, PayMerchantDTO> payMerchantMap) {
-        PayBoxListVO payBoxListVO = BeanUtils.copy(payBox, PayBoxListVO.class);
+        PayBoxListVO payBoxListVO = BeanUtil.copy(payBox, PayBoxListVO.class);
         if (payBoxListVO == null) {
             return null;
         }

+ 8 - 10
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PayDeviceServiceImpl.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.PayDeviceDTO;
 import com.zanxiang.game.module.manage.pojo.vo.PayDeviceChoiceVO;
 import com.zanxiang.game.module.manage.service.IPayDeviceService;
 import com.zanxiang.game.module.mybatis.entity.PayDevice;
 import com.zanxiang.game.module.mybatis.mapper.PayDeviceMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
@@ -32,30 +32,28 @@ public class PayDeviceServiceImpl extends ServiceImpl<PayDeviceMapper, PayDevice
         List<PayDevice> payDeviceList = super.list(new LambdaQueryWrapper<PayDevice>()
                 .select(PayDevice::getId, PayDevice::getPayWayIds, PayDevice::getPayDeviceName)
         );
-        return BeanUtils.copyList(payDeviceList, PayDeviceChoiceVO.class);
+        return payDeviceList.stream().map(payDevice -> BeanUtil.copy(payDevice, PayDeviceChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
     public Map<Long, PayDeviceDTO> payDeviceMap() {
-        //查询
         List<PayDevice> payDeviceList = super.list();
         if (CollectionUtils.isEmpty(payDeviceList)) {
             return Collections.emptyMap();
         }
-        List<PayDeviceDTO> list = BeanUtils.copyList(payDeviceList, PayDeviceDTO.class);
-        //构造返回
-        return list.stream().collect(Collectors.toMap(PayDeviceDTO::getId, Function.identity()));
+        return payDeviceList.stream().map(payDevice -> BeanUtil.copy(payDevice, PayDeviceDTO.class))
+                .collect(Collectors.toMap(PayDeviceDTO::getId, Function.identity()));
     }
 
     @Override
     public Map<Long, PayDeviceChoiceVO> payDeviceChoiceMap() {
-        //查询
         List<PayDevice> payDeviceList = super.list();
         if (CollectionUtils.isEmpty(payDeviceList)) {
             return Collections.emptyMap();
         }
-        List<PayDeviceChoiceVO> list = BeanUtils.copyList(payDeviceList, PayDeviceChoiceVO.class);
-        //构造返回
-        return list.stream().collect(Collectors.toMap(PayDeviceChoiceVO::getId, Function.identity()));
+        return payDeviceList.stream()
+                .map(payDevice -> BeanUtil.copy(payDevice, PayDeviceChoiceVO.class))
+                .collect(Collectors.toMap(PayDeviceChoiceVO::getId, Function.identity()));
     }
 }

+ 15 - 12
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PayMerchantServiceImpl.java

@@ -5,10 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 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.enums.DeleteEnum;
-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.pojo.enums.DeleteEnum;
+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.PayMerchantDTO;
 import com.zanxiang.game.module.manage.pojo.dto.PayWayDTO;
 import com.zanxiang.game.module.manage.pojo.params.PayMerchantAddUpdateParam;
@@ -127,9 +126,11 @@ public class PayMerchantServiceImpl extends ServiceImpl<PayMerchantMapper, PayMe
 
     @Override
     public List<PayMerchantChoiceVO> payMerchantChoiceList() {
-        List<PayMerchant> payMerchantList = super.list(new LambdaQueryWrapper<PayMerchant>().
-                select(PayMerchant::getMerchantNo, PayMerchant::getPayWayId, PayMerchant::getMerchantName));
-        return BeanUtils.copyList(payMerchantList, PayMerchantChoiceVO.class);
+        return super.list(new LambdaQueryWrapper<PayMerchant>()
+                .select(PayMerchant::getMerchantNo, PayMerchant::getPayWayId, PayMerchant::getMerchantName))
+                .stream()
+                .map(payMerchant -> BeanUtil.copy(payMerchant, PayMerchantChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
@@ -151,7 +152,7 @@ public class PayMerchantServiceImpl extends ServiceImpl<PayMerchantMapper, PayMe
     }
 
     private PayMerchantListVO toVo(PayMerchant payMerchant, Map<Long, PayDeviceChoiceVO> payDeviceMap) {
-        PayMerchantListVO payMerchantListVO = BeanUtils.copy(payMerchant, PayMerchantListVO.class);
+        PayMerchantListVO payMerchantListVO = BeanUtil.copy(payMerchant, PayMerchantListVO.class);
         if (payMerchantListVO == null) {
             return null;
         }
@@ -233,8 +234,9 @@ public class PayMerchantServiceImpl extends ServiceImpl<PayMerchantMapper, PayMe
         if (CollectionUtils.isEmpty(payMerchantList)) {
             return Collections.emptyMap();
         }
-        return BeanUtils.copyList(payMerchantList, PayMerchantDTO.class)
-                .stream().collect(Collectors.toMap(PayMerchantDTO::getMerchantNo, Function.identity()));
+        return payMerchantList.stream()
+                .map(payMerchant -> BeanUtil.copy(payMerchant, PayMerchantDTO.class))
+                .collect(Collectors.toMap(PayMerchantDTO::getMerchantNo, Function.identity()));
     }
 
     @Override
@@ -243,8 +245,9 @@ public class PayMerchantServiceImpl extends ServiceImpl<PayMerchantMapper, PayMe
         if (CollectionUtils.isEmpty(payMerchantList)) {
             return Collections.emptyMap();
         }
-        return BeanUtils.copyList(payMerchantList, PayMerchantDTO.class)
-                .stream().collect(Collectors.toMap(PayMerchantDTO::getMerchantNo, Function.identity()));
+        return payMerchantList.stream()
+                .map(payMerchant -> BeanUtil.copy(payMerchant, PayMerchantDTO.class))
+                .collect(Collectors.toMap(PayMerchantDTO::getMerchantNo, Function.identity()));
     }
 
     @Override

+ 3 - 4
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PayWayServiceImpl.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.PayWayDTO;
 import com.zanxiang.game.module.manage.pojo.vo.PayWayChoiceVO;
 import com.zanxiang.game.module.manage.service.IPayWayService;
 import com.zanxiang.game.module.mybatis.entity.PayWay;
 import com.zanxiang.game.module.mybatis.mapper.PayWayMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
@@ -48,8 +48,7 @@ public class PayWayServiceImpl extends ServiceImpl<PayWayMapper, PayWay> impleme
         if (CollectionUtils.isEmpty(payWayList)) {
             return Collections.emptyMap();
         }
-        List<PayWayDTO> list = BeanUtils.copyList(payWayList, PayWayDTO.class);
-        //构造返回
-        return list.stream().collect(Collectors.toMap(PayWayDTO::getId, Function.identity()));
+        return payWayList.stream().map(payWay -> BeanUtil.copy(payWay, PayWayDTO.class))
+                .collect(Collectors.toMap(PayWayDTO::getId, Function.identity()));
     }
 }

+ 21 - 11
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PromoAccountServiceImpl.java

@@ -6,10 +6,9 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 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.enums.DeleteEnum;
-import com.zanxiang.game.module.base.enums.PromoAccountTypeEnum;
-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.PromoAccountTypeEnum;
+import com.zanxiang.game.module.base.pojo.enums.StatusEnum;
 import com.zanxiang.game.module.manage.pojo.dto.PromoAccountDTO;
 import com.zanxiang.game.module.manage.pojo.dto.PromoMediaDTO;
 import com.zanxiang.game.module.manage.pojo.params.PromoAccountAddUpdateParam;
@@ -25,6 +24,7 @@ import com.zanxiang.game.module.manage.service.IPromoMediaService;
 import com.zanxiang.game.module.mybatis.entity.PromoAccount;
 import com.zanxiang.game.module.mybatis.entity.PromoAccountLog;
 import com.zanxiang.game.module.mybatis.mapper.PromoAccountMapper;
+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;
@@ -57,8 +57,9 @@ public class PromoAccountServiceImpl extends ServiceImpl<PromoAccountMapper, Pro
 
     @Override
     public List<PromoAccountLinkageChoiceVO> promoAccountLinkageChoiceList() {
-        List<PromoAccount> promoAccountList = super.list();
-        List<PromoAccountLinkageChoiceVO> choiceVOList = BeanUtils.copyList(promoAccountList, PromoAccountLinkageChoiceVO.class);
+        List<PromoAccountLinkageChoiceVO> choiceVOList = super.list().stream()
+                .map(promoAccount -> BeanUtil.copy(promoAccount, PromoAccountLinkageChoiceVO.class))
+                .collect(Collectors.toList());
         Map<Long, PromoMediaDTO> promoMediaMap = promoMediaService.promoMediaMap();
         choiceVOList.forEach(promoAccountDTO -> {
             Long mediaId = promoAccountDTO.getMediaId();
@@ -86,7 +87,7 @@ public class PromoAccountServiceImpl extends ServiceImpl<PromoAccountMapper, Pro
     }
 
     private PromoAccountListVO toVo(Map<Long, PromoMediaDTO> promoMediaMap, PromoAccount promoAccount) {
-        PromoAccountListVO promoAccountListVO = BeanUtils.copy(promoAccount, PromoAccountListVO.class);
+        PromoAccountListVO promoAccountListVO = BeanUtil.copy(promoAccount, PromoAccountListVO.class);
         if (Objects.isNull(promoAccountListVO)) {
             return null;
         }
@@ -203,14 +204,18 @@ public class PromoAccountServiceImpl extends ServiceImpl<PromoAccountMapper, Pro
     public List<PromoAccountChoiceVO> promoAccountChoiceList() {
         List<PromoAccount> promoAccountList = super.list(new LambdaQueryWrapper<PromoAccount>().
                 select(PromoAccount::getAccount, PromoAccount::getName));
-        return BeanUtils.copyList(promoAccountList, PromoAccountChoiceVO.class);
+        return promoAccountList.stream()
+                .map(promoAccount -> BeanUtil.copy(promoAccount, PromoAccountChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
     public List<PromoPitcherChoiceVO> promoPitcherChoiceList() {
         List<PromoAccount> promoAccountList = super.list(new LambdaQueryWrapper<PromoAccount>().
                 select(PromoAccount::getPitcherId, PromoAccount::getPitcherName));
-        return BeanUtils.copyList(promoAccountList, PromoPitcherChoiceVO.class);
+        return promoAccountList.stream()
+                .map(promoAccount -> BeanUtil.copy(promoAccount, PromoPitcherChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
@@ -219,7 +224,9 @@ public class PromoAccountServiceImpl extends ServiceImpl<PromoAccountMapper, Pro
         if (CollectionUtils.isEmpty(promoChannelList)) {
             return Collections.emptyMap();
         }
-        List<PromoAccountDTO> promoAccountDTOList = BeanUtils.copyList(promoChannelList, PromoAccountDTO.class);
+        List<PromoAccountDTO> promoAccountDTOList = promoChannelList.stream()
+                .map(promoAccount -> BeanUtil.copy(promoAccount, PromoAccountDTO.class))
+                .collect(Collectors.toList());
         Map<Long, PromoMediaDTO> promoMediaMap = promoMediaService.promoMediaMap();
         promoAccountDTOList.forEach(promoAccountDTO -> {
             Long mediaId = promoAccountDTO.getMediaId();
@@ -255,7 +262,10 @@ public class PromoAccountServiceImpl extends ServiceImpl<PromoAccountMapper, Pro
                 .eq(mediaId != null, PromoAccount::getMediaId, mediaId)
                 .eq(Strings.isNotBlank(account), PromoAccount::getAccount, account)
                 .eq(accountType != null, PromoAccount::getAccountType, accountType));
-        List<PromoAccountDTO> promoAccountDTOList = BeanUtils.copyList(promoAccountList, PromoAccountDTO.class);
+
+        List<PromoAccountDTO> promoAccountDTOList = promoAccountList.stream()
+                .map(promoAccount -> BeanUtil.copy(promoAccount, PromoAccountDTO.class))
+                .collect(Collectors.toList());
         return promoAccountDTOList.stream().collect(Collectors.toMap(PromoAccountDTO::getId, Function.identity()));
     }
 }

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

@@ -7,11 +7,10 @@ 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.enums.DeleteEnum;
-import com.zanxiang.game.module.base.enums.PromoAccountTypeEnum;
-import com.zanxiang.game.module.base.enums.PromoProviderEnum;
-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.PromoAccountTypeEnum;
+import com.zanxiang.game.module.base.pojo.enums.PromoProviderEnum;
+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.PromoChannelAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PromoChannelListParam;
@@ -22,6 +21,7 @@ import com.zanxiang.game.module.mybatis.entity.PromoAccount;
 import com.zanxiang.game.module.mybatis.entity.PromoChannel;
 import com.zanxiang.game.module.mybatis.entity.PromoSite;
 import com.zanxiang.game.module.mybatis.mapper.PromoChannelMapper;
+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;
@@ -98,7 +98,7 @@ public class PromoChannelServiceImpl extends ServiceImpl<PromoChannelMapper, Pro
 
     private PromoChannelListVO toVo(Map<Long, PromoAccountDTO> promoAccountMap, Map<Long, PromoMediaDTO> promoMediaMap, PromoChannel promoChannel,
                                     Map<Long, PromoSiteDTO> promoSiteMap, Map<Long, GameDTO> gameMap, Map<Long, GameCategoryDTO> gameCategoryMap) {
-        PromoChannelListVO promoChannelListVO = BeanUtils.copy(promoChannel, PromoChannelListVO.class);
+        PromoChannelListVO promoChannelListVO = BeanUtil.copy(promoChannel, PromoChannelListVO.class);
         if (Objects.isNull(promoChannelListVO)) {
             return null;
         }
@@ -176,7 +176,9 @@ public class PromoChannelServiceImpl extends ServiceImpl<PromoChannelMapper, Pro
     public List<PromoChannelChoiceVO> promoChannelChoiceList() {
         List<PromoChannel> promoChannelList = super.list(new LambdaQueryWrapper<PromoChannel>().
                 select(PromoChannel::getId, PromoChannel::getChannel));
-        return BeanUtils.copyList(promoChannelList, PromoChannelChoiceVO.class);
+        return promoChannelList.stream()
+                .map(promoChannel -> BeanUtil.copy(promoChannel, PromoChannelChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
@@ -186,7 +188,9 @@ public class PromoChannelServiceImpl extends ServiceImpl<PromoChannelMapper, Pro
         if (CollectionUtils.isEmpty(promoChannelList)) {
             return Collections.emptyMap();
         }
-        List<PromoChannelDTO> promoChannelDTOList = BeanUtils.copyList(promoChannelList, PromoChannelDTO.class);
+        List<PromoChannelDTO> promoChannelDTOList = promoChannelList.stream()
+                .map(promoChannel -> BeanUtil.copy(promoChannel, PromoChannelDTO.class))
+                .collect(Collectors.toList());
         Map<Long, PromoMediaDTO> promoMediaMap = promoMediaService.promoMediaMap();
         promoChannelDTOList.forEach(promoChannelDTO -> {
             Long mediaId = promoChannelDTO.getMediaId();
@@ -203,7 +207,9 @@ public class PromoChannelServiceImpl extends ServiceImpl<PromoChannelMapper, Pro
         if (CollectionUtils.isEmpty(promoChannelList)) {
             return Collections.emptyMap();
         }
-        List<PromoChannelDTO> promoChannelDTOList = BeanUtils.copyList(promoChannelList, PromoChannelDTO.class);
+        List<PromoChannelDTO> promoChannelDTOList = promoChannelList.stream()
+                .map(promoChannel -> BeanUtil.copy(promoChannel, PromoChannelDTO.class))
+                .collect(Collectors.toList());
         Map<Long, PromoMediaDTO> promoMediaMap = promoMediaService.promoMediaMap();
         promoChannelDTOList.forEach(promoChannelDTO -> {
             Long mediaId = promoChannelDTO.getMediaId();

+ 11 - 7
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PromoMediaServiceImpl.java

@@ -6,10 +6,9 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 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.enums.DeleteEnum;
-import com.zanxiang.game.module.base.enums.PromoMediaTypeEnum;
-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.PromoMediaTypeEnum;
+import com.zanxiang.game.module.base.pojo.enums.StatusEnum;
 import com.zanxiang.game.module.manage.pojo.dto.PromoMediaDTO;
 import com.zanxiang.game.module.manage.pojo.params.PromoMediaAddUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.PromoMediaListParam;
@@ -18,6 +17,7 @@ import com.zanxiang.game.module.manage.pojo.vo.PromoMediaListVO;
 import com.zanxiang.game.module.manage.service.IPromoMediaService;
 import com.zanxiang.game.module.mybatis.entity.PromoMedia;
 import com.zanxiang.game.module.mybatis.mapper.PromoMediaMapper;
+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;
@@ -45,7 +45,9 @@ public class PromoMediaServiceImpl extends ServiceImpl<PromoMediaMapper, PromoMe
         if (CollectionUtils.isEmpty(promoMediaList)) {
             return Collections.emptyMap();
         }
-        List<PromoMediaDTO> promoMediaDTOList = BeanUtils.copyList(promoMediaList, PromoMediaDTO.class);
+        List<PromoMediaDTO> promoMediaDTOList = promoMediaList.stream()
+                .map(promoMedia -> BeanUtil.copy(promoMedia, PromoMediaDTO.class))
+                .collect(Collectors.toList());
         return promoMediaDTOList.stream().collect(Collectors.toMap(PromoMediaDTO::getId, Function.identity()));
     }
 
@@ -53,7 +55,9 @@ public class PromoMediaServiceImpl extends ServiceImpl<PromoMediaMapper, PromoMe
     public List<PromoMediaChoiceVO> promoMediaChoiceList() {
         List<PromoMedia> promoMediaList = super.list(new LambdaQueryWrapper<PromoMedia>().
                 select(PromoMedia::getId, PromoMedia::getName));
-        return BeanUtils.copyList(promoMediaList, PromoMediaChoiceVO.class);
+        return promoMediaList.stream()
+                .map(promoMedia -> BeanUtil.copy(promoMedia, PromoMediaChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
@@ -67,7 +71,7 @@ public class PromoMediaServiceImpl extends ServiceImpl<PromoMediaMapper, PromoMe
     }
 
     private PromoMediaListVO toVo(PromoMedia promoMedia) {
-        PromoMediaListVO promoMediaListVO = BeanUtils.copy(promoMedia, PromoMediaListVO.class);
+        PromoMediaListVO promoMediaListVO = BeanUtil.copy(promoMedia, PromoMediaListVO.class);
         if (Objects.isNull(promoMediaListVO)) {
             return null;
         }

+ 10 - 7
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PromoSiteServiceImpl.java

@@ -6,9 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 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.enums.DeleteEnum;
-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.pojo.dto.PromoMediaDTO;
 import com.zanxiang.game.module.manage.pojo.dto.PromoSiteDTO;
 import com.zanxiang.game.module.manage.pojo.params.PromoSiteAddOrUpdateParam;
@@ -20,6 +19,7 @@ import com.zanxiang.game.module.manage.service.IPromoSiteService;
 import com.zanxiang.game.module.mybatis.entity.PromoMedia;
 import com.zanxiang.game.module.mybatis.entity.PromoSite;
 import com.zanxiang.game.module.mybatis.mapper.PromoSiteMapper;
+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;
@@ -53,14 +53,17 @@ public class PromoSiteServiceImpl extends ServiceImpl<PromoSiteMapper, PromoSite
         if (CollectionUtils.isEmpty(promoSiteList)) {
             return Collections.emptyMap();
         }
-        List<PromoSiteDTO> promoSiteDTOList = BeanUtils.copyList(promoSiteList, PromoSiteDTO.class);
-        return promoSiteDTOList.stream().collect(Collectors.toMap(PromoSiteDTO::getId, Function.identity()));
+        return promoSiteList.stream()
+                .map(promoSite -> BeanUtil.copy(promoSite, PromoSiteDTO.class))
+                .collect(Collectors.toMap(PromoSiteDTO::getId, Function.identity()));
     }
 
     @Override
     public List<PromoSiteLinkageChoiceVO> promoSiteLinkageChoiceList() {
         List<PromoSite> promoSiteList = super.list();
-        List<PromoSiteLinkageChoiceVO> choiceVOList = BeanUtils.copyList(promoSiteList, PromoSiteLinkageChoiceVO.class);
+        List<PromoSiteLinkageChoiceVO> choiceVOList = promoSiteList.stream()
+                .map(promoSite -> BeanUtil.copy(promoSite, PromoSiteLinkageChoiceVO.class))
+                .collect(Collectors.toList());
         Map<Long, PromoMediaDTO> promoMediaMap = promoMediaService.promoMediaMap();
         choiceVOList.forEach(promoAccountDTO -> {
             Long mediaId = promoAccountDTO.getMediaId();
@@ -86,7 +89,7 @@ public class PromoSiteServiceImpl extends ServiceImpl<PromoSiteMapper, PromoSite
         if (Objects.isNull(promoSite)) {
             return null;
         }
-        PromoSiteListVO promoSiteListVO = BeanUtils.copy(promoSite, PromoSiteListVO.class);
+        PromoSiteListVO promoSiteListVO = BeanUtil.copy(promoSite, PromoSiteListVO.class);
         PromoMedia promoMedia = promoMediaService.getById(promoSiteListVO.getMediaId());
         if (promoMedia != null) {
             promoSiteListVO.setMediaName(promoMedia.getName());

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

@@ -2,15 +2,16 @@ package com.zanxiang.game.module.manage.service.impl;
 
 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.vo.UserAddressVO;
 import com.zanxiang.game.module.manage.service.IUserAddressService;
 import com.zanxiang.game.module.mybatis.entity.UserAddress;
 import com.zanxiang.game.module.mybatis.mapper.UserAddressMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @author : lingfeng
@@ -23,8 +24,9 @@ public class UserAddressServiceImpl extends ServiceImpl<UserAddressMapper, UserA
 
     @Override
     public List<UserAddressVO> list(Long userId) {
-        List<UserAddress> addressList = super.list(new LambdaQueryWrapper<UserAddress>().eq(UserAddress::getUserId, userId));
-        return BeanUtils.copyList(addressList, UserAddressVO.class);
+        return super.list(new LambdaQueryWrapper<UserAddress>().eq(UserAddress::getUserId, userId))
+                .stream().map(userAddress -> BeanUtil.copy(userAddress, UserAddressVO.class))
+                .collect(Collectors.toList());
     }
 
 }

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

@@ -6,8 +6,7 @@ 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.erp.security.util.SecurityUtil;
-import com.zanxiang.game.module.base.enums.BanStatusEnum;
-import com.zanxiang.game.module.base.utils.BeanUtils;
+import com.zanxiang.game.module.base.pojo.enums.BanStatusEnum;
 import com.zanxiang.game.module.manage.pojo.dto.UserDTO;
 import com.zanxiang.game.module.manage.pojo.params.UserBanListParam;
 import com.zanxiang.game.module.manage.pojo.params.UserBanUpdateParam;
@@ -17,6 +16,7 @@ import com.zanxiang.game.module.manage.service.IUserService;
 import com.zanxiang.game.module.mybatis.entity.User;
 import com.zanxiang.game.module.mybatis.entity.UserBan;
 import com.zanxiang.game.module.mybatis.mapper.UserBanMapper;
+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;
@@ -58,7 +58,7 @@ public class UserBanServiceImpl extends ServiceImpl<UserBanMapper, UserBan> impl
         if (Objects.isNull(userBan)) {
             return null;
         }
-        return BeanUtils.copy(userBan, UserBanVO.class);
+        return BeanUtil.copy(userBan, UserBanVO.class);
     }
 
     @Override

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

@@ -3,7 +3,6 @@ package com.zanxiang.game.module.manage.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 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.dto.GameDTO;
 import com.zanxiang.game.module.manage.pojo.dto.GameUserRoleDTO;
@@ -15,6 +14,7 @@ import com.zanxiang.game.module.manage.service.IGameUserRoleService;
 import com.zanxiang.game.module.manage.service.IUserLoginLogService;
 import com.zanxiang.game.module.mybatis.entity.UserLoginLog;
 import com.zanxiang.game.module.mybatis.mapper.UserLoginLogMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -47,7 +47,7 @@ public class UserLoginLogServiceImpl extends ServiceImpl<UserLoginLogMapper, Use
     }
 
     private UserRoleLoginVO toVo(UserLoginLog userLoginLog) {
-        UserRoleLoginVO roleLoginVO = BeanUtils.copy(userLoginLog, UserRoleLoginVO.class);
+        UserRoleLoginVO roleLoginVO = BeanUtil.copy(userLoginLog, UserRoleLoginVO.class);
         if (userLoginLog == null) {
             return null;
         }

+ 39 - 64
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/UserServiceImpl.java

@@ -7,19 +7,18 @@ 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.erp.security.util.SecurityUtil;
 import com.zanxiang.game.module.manage.pojo.dto.*;
 import com.zanxiang.game.module.manage.pojo.params.UserListParam;
 import com.zanxiang.game.module.manage.pojo.params.UserUpdateParam;
-import com.zanxiang.game.module.manage.pojo.vo.GameUserVO;
 import com.zanxiang.game.module.manage.pojo.vo.UserCardVO;
 import com.zanxiang.game.module.manage.pojo.vo.UserListVO;
 import com.zanxiang.game.module.manage.pojo.vo.UserVO;
 import com.zanxiang.game.module.manage.service.*;
-import com.zanxiang.game.module.mybatis.entity.PromoAccount;
-import com.zanxiang.game.module.mybatis.entity.PromoChannel;
+import com.zanxiang.game.module.mybatis.entity.Agent;
 import com.zanxiang.game.module.mybatis.entity.User;
 import com.zanxiang.game.module.mybatis.mapper.UserMapper;
+import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.encryption.Md5Util;
 import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
@@ -46,15 +45,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
     @Autowired
     private IGameService gameService;
 
-    @Autowired
-    private IGameUserService gameUserService;
-
-    @Autowired
-    private IPromoChannelService promoChannelService;
-
-    @Autowired
-    private IPromoAccountService promoAccountService;
-
     @Autowired
     private IUserService userService;
 
@@ -67,19 +57,19 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
     @Autowired
     private IUserCardService userCardService;
 
+    @Autowired
+    private IAgentService agentService;
+
     @Override
     public IPage<UserListVO> list(UserListParam param) {
         //渠道列表
-        List<Long> agentIdList;
-        if (param.getChannelId() == null) {
-            agentIdList = promoChannelService.listByAccountOrPitcherId(param.getAccountId(), param.getPitcherId());
-        } else {
-            agentIdList = Collections.singletonList(param.getChannelId());
-        }
+        List<AgentDTO> agentDTOList = agentService.listUserAgent(param.getAccountId(), param.getPitcherId(), param.getChannelId());
         //根据条件, 匹配渠道
-        if (agentIdList != null && agentIdList.isEmpty()) {
+        if (CollectionUtils.isEmpty(agentDTOList) && !SecurityUtil.isAdmin()) {
             return new Page<>();
         }
+        //渠道id列表
+        List<Long> agentIdList = agentDTOList.stream().map(AgentDTO::getId).collect(Collectors.toList());
         //游戏条件处理
         Map<Long, GameDTO> gameMap = gameService.gameCondition(param.getCpId(), param.getGameId(), param.getGameCategoryId());
         //根据条件, 匹配不到游戏
@@ -88,7 +78,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         }
         //玩家条件处理
         Map<Long, UserDTO> userMap = userService.userCondition(param.getUserId(), agentIdList, param.getUserName(),
-                param.getNickname(), param.getRegIp(), param.getAdId());
+                param.getNickname(), param.getRegIp());
         //根据条件, 匹配不到玩家
         if (userMap != null && userMap.isEmpty()) {
             return new Page<>();
@@ -96,9 +86,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         //相关用户id
         Set<Long> userIdSet = userMap == null ? null : userMap.keySet();
         Map<Long, CpDTO> cpMap = cpService.cpMap();
-        Map<Long, PromoChannelDTO> channelMap = promoChannelService.promoChannelMap();
+        Map<Long, AgentDTO> agentMap = agentDTOList.stream().collect(Collectors.toMap(AgentDTO::getId, Function.identity()));
         Map<Long, GameCategoryDTO> gameCategoryMap = gameCategoryService.gameCategoryMap();
-        Map<Long, PromoAccountDTO> promoAccountMap = promoAccountService.promoAccountMap();
         //执行查询
         return page(param.toPage(), new QueryWrapper<User>().lambda()
                 .eq(param.getUserId() != null, User::getId, param.getUserId())
@@ -117,19 +106,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
                 .le(param.getRechargeEndDate() != null, User::getLastRechargeTime, param.getRechargeEndDate() == null ? null : LocalDateTime.of(param.getRechargeEndDate(), LocalTime.MAX))
                 .gt(Objects.equals(param.getIsRecharge(), Boolean.TRUE), User::getRechargeCount, 0)
                 .eq(Objects.equals(param.getIsRecharge(), Boolean.FALSE), User::getRechargeCount, 0)
-                .eq(param.getVipLevel() != null && param.getVipLevel() <= 10, User::getVipMax, param.getVipLevel())
-                .gt(param.getVipLevel() != null && param.getVipLevel() > 10, User::getVipMax, param.getVipLevel())
                 .eq(param.getStatus() != null, User::getStatus, param.getStatus())
                 .eq(param.getChannelId() != null, User::getAgentId, param.getChannelId())
-                .eq(param.getCustomerId() != null, User::getCustomerId, param.getCustomerId())
-                .eq(param.getIsGs() != null, User::getIsGs, param.getIsGs())
                 .orderByDesc(User::getCreateTime)
-        ).convert(u -> this.toVo(u, userMap, gameMap, promoAccountMap, channelMap, cpMap, gameCategoryMap));
+        ).convert(u -> this.toVo(u, userMap, gameMap, cpMap, gameCategoryMap, agentMap));
     }
 
-    private UserListVO toVo(User user, Map<Long, UserDTO> userMap, Map<Long, GameDTO> gameMap, Map<Long, PromoAccountDTO> promoAccountMap,
-                            Map<Long, PromoChannelDTO> channelMap, Map<Long, CpDTO> cpMap, Map<Long, GameCategoryDTO> gameCategoryMap) {
-        UserListVO userListVO = BeanUtils.copy(user, UserListVO.class);
+    private UserListVO toVo(User user, Map<Long, UserDTO> userMap, Map<Long, GameDTO> gameMap, Map<Long, CpDTO> cpMap,
+                            Map<Long, GameCategoryDTO> gameCategoryMap, Map<Long, AgentDTO> agentMap) {
+        UserListVO userListVO = BeanUtil.copy(user, UserListVO.class);
         if (Objects.isNull(userListVO)) {
             return null;
         }
@@ -142,9 +127,16 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
             userListVO.setRegIp(userDTO.getIp());
             userListVO.setUsername(userDTO.getUsername());
             userListVO.setNickname(userDTO.getNickname());
+            //渠道信息
             userListVO.setAgentId(userDTO.getAgentId());
-            userListVO.setChannel(channelMap.get(userDTO.getAgentId()) == null ? null : channelMap.get(userDTO.getAgentId()).getChannel());
-            userListVO.setAdId(userDTO.getAdId());
+            AgentDTO lastAgentDTO = agentMap.get(userDTO.getAgentId());
+            if (lastAgentDTO != null) {
+                userListVO.setAgentName(lastAgentDTO.getAgentName());
+                userListVO.setAccountId(lastAgentDTO.getId());
+                userListVO.setPitcherId(lastAgentDTO.getCreateBy());
+                userListVO.setPitcherName(lastAgentDTO.getCreateByName());
+                userListVO.setAccountType(lastAgentDTO.getAccountType());
+            }
         }
         GameDTO gameDTO = CollectionUtils.isEmpty(gameMap) ? null : gameMap.get(userListVO.getGameId());
         if (gameDTO == null) {
@@ -157,18 +149,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
             userListVO.setCpId(gameDTO.getCpId());
             userListVO.setCpName(cpMap.get(gameDTO.getCpId()) == null ? null : cpMap.get(gameDTO.getCpId()).getCpName());
         }
-        PromoChannelDTO promoChannelDTO = channelMap.get(userListVO.getAgentId());
-        if (promoChannelDTO != null) {
-            PromoAccountDTO promoAccountDTO = promoAccountMap.get(promoChannelDTO.getAccountId());
-            if (promoAccountDTO != null) {
-                userListVO.setAccountId(promoAccountDTO.getId());
-                userListVO.setAccountName(promoAccountDTO.getName());
-                userListVO.setPitcherId(promoAccountDTO.getPitcherId());
-                userListVO.setPitcherName(promoAccountDTO.getPitcherName());
-                userListVO.setMediaId(promoAccountDTO.getMediaId());
-                userListVO.setMediaName(promoAccountDTO.getMediaName());
-            }
-        }
         return userListVO;
     }
 
@@ -197,7 +177,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
     public UserVO getUserInfo(Long userId) {
         //查询用户信息
         User user = super.getById(userId);
-        UserVO userVO = BeanUtils.copy(user, UserVO.class);
+        UserVO userVO = BeanUtil.copy(user, UserVO.class);
         if (userVO == null) {
             throw new BaseException("用户信息不存在!");
         }
@@ -222,41 +202,35 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
             userVO.setRegGame(gameDTO.getName());
         }
         //渠道
-        PromoChannel promoChannel = promoChannelService.getById(user.getAgentId());
-        if (promoChannel != null) {
-            userVO.setChannelName(promoChannel.getChannel());
-            PromoAccount promoAccount = promoAccountService.getById(promoChannel.getAccountId());
-            userVO.setRegFrom(promoAccount.getAccount());
-        }
-        //vip等级
-        GameUserVO maxVipGameUser = gameUserService.getMaxVipGameUser(userId);
-        if (maxVipGameUser != null) {
-            userVO.setVipMax(maxVipGameUser.getRoleVipMax());
+        Agent agent = agentService.getById(user.getAgentId());
+        if (agent != null) {
+            userVO.setChannelName(agent.getAgentName());
+            userVO.setRegFrom(agent.getAccountType());
         }
         return userVO;
     }
 
     @Override
-    public Map<Long, UserDTO> userCondition(Long userId, List<Long> agentIdList, String userName, String nickname,
-                                            String regIp, String adId) {
+    public Map<Long, UserDTO> userCondition(Long userId, List<Long> agentIdList, String userName, String nickname, String regIp) {
         //用户信息条件处理
         if (userId == null && CollectionUtils.isEmpty(agentIdList) && Strings.isBlank(userName)
-                && Strings.isBlank(nickname) && Strings.isBlank(regIp) && Strings.isBlank(adId)) {
+                && Strings.isBlank(nickname) && Strings.isBlank(regIp)) {
             return null;
         }
         //查询
         List<User> userList = super.list(new LambdaQueryWrapper<User>()
                 .eq(userId != null, User::getId, userId)
-                .eq(Strings.isNotBlank(adId), User::getAdId, adId)
                 .in(CollectionUtils.isNotEmpty(agentIdList), User::getAgentId, agentIdList)
                 .eq(Strings.isNotBlank(regIp), User::getIp, regIp)
                 .like(Strings.isNotBlank(userName), User::getUsername, userName)
                 .like(Strings.isNotBlank(nickname), User::getNickname, nickname)
-                .select(User::getId, User::getUsername, User::getNickname, User::getIp, User::getCreateTime, User::getAgentId, User::getAdId));
+                .select(User::getId, User::getUsername, User::getNickname, User::getIp, User::getCreateTime, User::getAgentId));
         if (CollectionUtils.isEmpty(userList)) {
             return Collections.emptyMap();
         }
-        List<UserDTO> list = BeanUtils.copyList(userList, UserDTO.class);
+        List<UserDTO> list = userList.stream()
+                .map(user -> BeanUtil.copy(user, UserDTO.class))
+                .collect(Collectors.toList());
         //构造返回
         return list.stream().collect(Collectors.toMap(UserDTO::getId, Function.identity()));
     }
@@ -271,14 +245,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         if (CollectionUtils.isEmpty(userList)) {
             return Collections.emptyMap();
         }
-        List<UserDTO> list = BeanUtils.copyList(userList, UserDTO.class);
+        List<UserDTO> list = userList.stream().map(user -> BeanUtil.copy(user, UserDTO.class))
+                .collect(Collectors.toList());
         //构造返回
         return list.stream().collect(Collectors.toMap(UserDTO::getId, Function.identity()));
     }
 
     @Override
     public UserDTO getById(Long userId) {
-        return BeanUtils.copy(super.getById(userId), UserDTO.class);
+        return BeanUtil.copy(super.getById(userId), UserDTO.class);
     }
 
 }

+ 0 - 30
game-module/game-module-mybatis/src/main/java/com/zanxiang/game/module/mybatis/entity/GameUser.java

@@ -32,16 +32,6 @@ public class GameUser {
      */
     private Long userId;
 
-    /**
-     * 所属渠道ID
-     */
-    private Long agentId;
-
-    /**
-     * 导量的渠道ID
-     */
-    private Long guidedAgentId;
-
     /**
      * 游戏ID
      */
@@ -67,31 +57,11 @@ public class GameUser {
      */
     private LocalDateTime lastRechargeTime;
 
-    /**
-     * 平台币余额
-     */
-    private BigDecimal platformCoin;
-
-    /**
-     * 是否GS
-     */
-    private Boolean isGs;
-
-    /**
-     * 客服id
-     */
-    private Long customerId;
-
     /**
      * 创角数
      */
     private Integer roleCount;
 
-    /**
-     * 拥有角色最高vip等级
-     */
-    private Integer roleVipMax;
-
     /**
      * 开始玩时间
      */

+ 5 - 18
game-module/game-module-mybatis/src/main/java/com/zanxiang/game/module/mybatis/entity/GameUserRole.java

@@ -78,20 +78,15 @@ public class GameUserRole {
     private Long rolePower;
 
     /**
-     * 平台币余额
+     * 充值次数
      */
-    private BigDecimal platformCoin;
+    private Integer rechargeCount;
 
     /**
      * 充值金额
      */
     private BigDecimal rechargeMoney;
 
-    /**
-     * 充值次数
-     */
-    private Integer rechargeCount;
-
     /**
      * 最近充值时间
      */
@@ -108,14 +103,9 @@ public class GameUserRole {
     private String os;
 
     /**
-     * 游戏区服id
-     */
-    private Long regionalId;
-
-    /**
-     * 游戏区服名称
+     * 角色最后登录时间
      */
-    private String regionalName;
+    private LocalDateTime lastLoginTime;
 
     /**
      * 创建时间
@@ -127,8 +117,5 @@ public class GameUserRole {
      */
     private LocalDateTime updateTime;
 
-    /**
-     * 角色最后登录时间
-     */
-    private LocalDateTime lastLoginTime;
+
 }

+ 24 - 44
game-module/game-module-mybatis/src/main/java/com/zanxiang/game/module/mybatis/entity/User.java

@@ -29,7 +29,12 @@ public class User {
     private Long id;
 
     /**
-     * 所属渠道ID
+     * 注册渠道id
+     */
+    private Long regAgentId;
+
+    /**
+     * 最新渠道id
      */
     private Long agentId;
 
@@ -53,11 +58,6 @@ public class User {
      */
     private String password;
 
-    /**
-     * 绑定邮箱
-     */
-    private String email;
-
     /**
      * 绑定手机号码
      */
@@ -74,24 +74,24 @@ public class User {
     private String sessionKey;
 
     /**
-     * 绑定支付宝账号
+     * 状态, 0 正常 1 封禁
      */
-    private String aliPay;
+    private Integer status;
 
     /**
-     * 客户端类型, 1 : 安卓app
+     * 头像
      */
-    private Integer deviceType;
+    private String avatar;
 
     /**
-     * 状态, 0 正常 1 封禁
+     * 绑定支付宝账号
      */
-    private Integer status;
+    private String aliPay;
 
     /**
-     * 头像
+     * 绑定邮箱
      */
-    private String avatar;
+    private String email;
 
     /**
      * 充值次数
@@ -108,50 +108,30 @@ public class User {
      */
     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地址
@@ -169,14 +149,14 @@ public class User {
     private String androidId;
 
     /**
-     * 用户注册ip
+     * 注册时间
      */
-    private String ip;
+    private LocalDateTime createTime;
 
     /**
-     * 归因广告id
+     * 更改时间
      */
-    private String adId;
+    private LocalDateTime updateTime;
 
     /**
      * 获取用户显示手机号

+ 0 - 6
game-module/game-module-sdk/pom.xml

@@ -113,12 +113,6 @@
             <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>
-            <version>${project.version}</version>
-        </dependency>
     </dependencies>
 
     <build>

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/adapter/ArgumentAdapter.java

@@ -1,6 +1,6 @@
 package com.zanxiang.game.module.sdk.adapter;
 
-import com.zanxiang.game.module.base.enums.HttpStatusEnum;
+import com.zanxiang.game.module.base.pojo.enums.HttpStatusEnum;
 import com.zanxiang.game.module.mybatis.entity.GameExt;
 import com.zanxiang.game.module.sdk.annotation.ValidLogin;
 import com.zanxiang.game.module.sdk.pojo.dto.UserTokenDTO;

+ 2 - 2
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/adapter/WebHandlerAdapter.java

@@ -1,9 +1,9 @@
 package com.zanxiang.game.module.sdk.adapter;
 
-import com.zanxiang.game.module.base.enums.DeviceTypeEnum;
-import com.zanxiang.game.module.base.enums.HttpStatusEnum;
+import com.zanxiang.game.module.base.pojo.enums.HttpStatusEnum;
 import com.zanxiang.game.module.mybatis.entity.GameExt;
 import com.zanxiang.game.module.sdk.annotation.UnSignCheck;
+import com.zanxiang.game.module.sdk.enums.DeviceTypeEnum;
 import com.zanxiang.game.module.sdk.service.IGameExtService;
 import com.zanxiang.game.module.sdk.util.SignUtil;
 import com.zanxiang.module.util.exception.BaseException;

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/controller/PayController.java

@@ -1,6 +1,6 @@
 package com.zanxiang.game.module.sdk.controller;
 
-import com.zanxiang.game.module.base.enums.PayWayEnum;
+import com.zanxiang.game.module.base.pojo.enums.PayWayEnum;
 import com.zanxiang.game.module.sdk.annotation.UnSignCheck;
 import com.zanxiang.game.module.sdk.annotation.ValidLogin;
 import com.zanxiang.game.module.sdk.pojo.param.ProductPayParam;

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/CallBackEnum.java → game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/CallBackEnum.java

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

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/DeviceTypeEnum.java → game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/DeviceTypeEnum.java

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

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/ExpireTimeEnum.java → game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/ExpireTimeEnum.java

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

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/OrderStateEnum.java → game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/OrderStateEnum.java

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

+ 1 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/enums/SmsTypeEnum.java → game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/enums/SmsTypeEnum.java

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

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/listener/OrderPaySuccessListener.java

@@ -57,7 +57,7 @@ public class OrderPaySuccessListener {
         //商户号额度统计更新
         performOrderService.payMerchantTotal(platformOrderDTO);
         //订单回传
-        callBackService.orderCallBack(platformOrderDTO);
+//        callBackService.orderCallBack(platformOrderDTO);
         log.info("订单:{} 支付成功履约监听逻辑 ------end---------", event.getOrderId());
     }
 }

+ 67 - 26
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/pojo/dto/UserDTO.java

@@ -2,6 +2,7 @@ package com.zanxiang.game.module.sdk.pojo.dto;
 
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 
 /**
@@ -18,9 +19,19 @@ public class UserDTO {
     private Long id;
 
     /**
-     * 所属渠道ID
+     * 注册渠道id
      */
-    private Long agentId;
+    private Long regAgentId;
+
+    /**
+     * 最新渠道id
+     */
+    private Long lastAgentId;
+
+    /**
+     * 注册游戏id
+     */
+    private Long gameId;
 
     /**
      * 用户名
@@ -33,19 +44,39 @@ public class UserDTO {
     private String nickname;
 
     /**
-     * 注册手机号
+     * 密码
      */
-    private String regMobile;
+    private String password;
 
     /**
-     * 注册邮箱
+     * 绑定手机号码
      */
-    private String regEmail;
+    private String mobile;
 
     /**
-     * 密码
+     * 微信用户openId
      */
-    private String password;
+    private String openId;
+
+    /**
+     * 微信用户会话密钥
+     */
+    private String sessionKey;
+
+    /**
+     * 状态, 0 正常 1 封禁
+     */
+    private Integer status;
+
+    /**
+     * 头像
+     */
+    private String avatar;
+
+    /**
+     * 绑定支付宝账号
+     */
+    private String aliPay;
 
     /**
      * 绑定邮箱
@@ -53,49 +84,59 @@ public class UserDTO {
     private String email;
 
     /**
-     * 绑定手机号码
+     * 充值次数
      */
-    private String mobile;
+    private Integer rechargeCount;
 
     /**
-     * 微信小游戏用户openId
+     * 充值金额
      */
-    private String openId;
+    private BigDecimal rechargeMoney;
 
     /**
-     * 微信用户会话密钥
+     * 最近充值时间
      */
-    private String sessionKey;
+    private LocalDateTime lastRechargeTime;
 
     /**
-     * 设备来源 mobile,android,iphone,ipad,web,pc,mac,wxapp
+     * 创角数
      */
-    private String fromDevice;
+    private Integer roleCount;
 
     /**
-     * 设备ID android 为imei ios 为idfa
+     * 是否实名认证,0未实名认证,1成年人,2未成年人
      */
-    private String deviceId;
+    private Integer authentication;
 
     /**
-     * 设备类型
+     * 客户端类型, 1:安卓app, 2: 苹果iosApp, 3: h5网页, 4 : 小程序(小游戏)
      */
-    private String deviceType;
+    private Integer deviceType;
 
     /**
-     * -1 为冻结状态, 1 为试玩状态 2为正常状态
+     * 客户端操作系统, android, ios, windows, mac
      */
-    private Integer status;
+    private String deviceSystem;
 
     /**
-     * 头像
+     * 用户注册ip
      */
-    private String avatar;
+    private String ip;
+
+    /**
+     * 用户设备mac地址
+     */
+    private String mac;
+
+    /**
+     * 设备唯一编号IMEI
+     */
+    private String imei;
 
     /**
-     * 渠道
+     * 安卓id, (仅安卓设备才有值)
      */
-    private Long channel;
+    private String androidId;
 
     /**
      * 注册时间

+ 4 - 6
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/IPromoChannelService.java → game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/IAgentService.java

@@ -1,17 +1,15 @@
 package com.zanxiang.game.module.sdk.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.zanxiang.game.module.mybatis.entity.PromoChannel;
+import com.zanxiang.game.module.mybatis.entity.Agent;
 
 /**
- * @author : lingfeng
- * @time : 2022-10-31
- * @description : 推广渠道
+ * @author bilingfeng
  */
-public interface IPromoChannelService extends IService<PromoChannel> {
+public interface IAgentService extends IService<Agent> {
 
     /**
-     * 被渠道代理id
+     * 根据前端参数获取渠道信息
      *
      * @param channel 通道
      * @return {@link Long}

+ 13 - 16
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/ICallBackService.java

@@ -1,8 +1,5 @@
 package com.zanxiang.game.module.sdk.service;
 
-import com.zanxiang.game.module.mybatis.entity.User;
-import com.zanxiang.game.module.sdk.pojo.dto.PlatformOrderDTO;
-
 /**
  * @author : lingfeng
  * @time : 2022-11-10
@@ -10,17 +7,17 @@ import com.zanxiang.game.module.sdk.pojo.dto.PlatformOrderDTO;
  */
 public interface ICallBackService {
 
-    /**
-     * 用户回传
-     *
-     * @param user 用户
-     */
-    void userCallBack(User user);
-
-    /**
-     * 订单回传
-     *
-     * @param orderInfo 订单信息
-     */
-    void orderCallBack(PlatformOrderDTO orderInfo);
+//    /**
+//     * 用户回传
+//     *
+//     * @param user 用户
+//     */
+//    void userCallBack(User user);
+//
+//    /**
+//     * 订单回传
+//     *
+//     * @param orderInfo 订单信息
+//     */
+//    void orderCallBack(PlatformOrderDTO orderInfo);
 }

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/ISmsService.java

@@ -1,6 +1,6 @@
 package com.zanxiang.game.module.sdk.service;
 
-import com.zanxiang.game.module.base.enums.HttpStatusEnum;
+import com.zanxiang.game.module.base.pojo.enums.HttpStatusEnum;
 import com.zanxiang.game.module.sdk.pojo.param.SmsCheckParam;
 import com.zanxiang.game.module.sdk.pojo.param.SmsSendParam;
 import com.zanxiang.game.module.sdk.pojo.param.UserData;

+ 2 - 2
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/api/WxApiService.java

@@ -1,8 +1,8 @@
 package com.zanxiang.game.module.sdk.service.api;
 
-import com.zanxiang.game.module.base.enums.ExpireTimeEnum;
-import com.zanxiang.game.module.base.enums.PayApplicationTypeEnum;
+import com.zanxiang.game.module.base.pojo.enums.PayApplicationTypeEnum;
 import com.zanxiang.game.module.sdk.constant.RedisKeyConstant;
+import com.zanxiang.game.module.sdk.enums.ExpireTimeEnum;
 import com.zanxiang.game.module.sdk.util.RedisUtil;
 import com.zanxiang.module.util.JsonUtil;
 import com.zanxiang.module.util.URIUtil;

+ 21 - 0
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/AgentServiceImpl.java

@@ -0,0 +1,21 @@
+package com.zanxiang.game.module.sdk.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.game.module.mybatis.entity.Agent;
+import com.zanxiang.game.module.mybatis.mapper.AgentMapper;
+import com.zanxiang.game.module.sdk.service.IAgentService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author bilingfeng
+ */
+@Slf4j
+@Service
+public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements IAgentService {
+
+    @Override
+    public Long getAgentIdByChannel(String channel) {
+        return null;
+    }
+}

+ 81 - 98
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/CallBackServiceImpl.java

@@ -1,30 +1,12 @@
 package com.zanxiang.game.module.sdk.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.zanxiang.advertising.oceanengine.track.base.pojo.PlatformServer;
-import com.zanxiang.advertising.oceanengine.track.base.pojo.dto.AppOrderRpcDTO;
-import com.zanxiang.advertising.oceanengine.track.base.pojo.dto.UserRegisterRpcDTO;
-import com.zanxiang.advertising.oceanengine.track.base.pojo.rpc.IAppOrderRpc;
-import com.zanxiang.advertising.oceanengine.track.base.pojo.rpc.IAppUserRpc;
-import com.zanxiang.advertising.oceanengine.track.base.pojo.vo.AppReportLogRpcVO;
-import com.zanxiang.game.module.base.enums.CallBackEnum;
-import com.zanxiang.game.module.base.enums.OsEnum;
-import com.zanxiang.game.module.mybatis.entity.Order;
-import com.zanxiang.game.module.mybatis.entity.User;
-import com.zanxiang.game.module.sdk.enums.PayTypeEnum;
-import com.zanxiang.game.module.sdk.pojo.dto.PlatformOrderDTO;
 import com.zanxiang.game.module.sdk.service.ICallBackService;
 import com.zanxiang.game.module.sdk.service.IOrderService;
 import com.zanxiang.game.module.sdk.service.IUserService;
-import com.zanxiang.module.util.JsonUtil;
-import com.zanxiang.module.util.pojo.ResultVO;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.math.BigDecimal;
-
 /**
  * @author : lingfeng
  * @time : 2022-11-10
@@ -40,86 +22,87 @@ public class CallBackServiceImpl implements ICallBackService {
     @Autowired
     private IOrderService orderService;
 
-    @DubboReference(providedBy = PlatformServer.SERVER_DUBBO_NAME)
-    private IAppUserRpc appUserRpc;
-
-    @DubboReference(providedBy = PlatformServer.SERVER_DUBBO_NAME)
-    private IAppOrderRpc appOrderRpc;
-
-    @Override
-    public void userCallBack(User user) {
-        if (user == null) {
-            return;
-        }
-        log.error("用户注册回传, userId : {}", user.getId());
-        UserRegisterRpcDTO dto = UserRegisterRpcDTO.builder()
-                .appKey(String.valueOf(user.getGameId()))
-                .userId(String.valueOf(user.getId()))
-                .username(user.getUsername())
-                .mac(user.getMac())
-                .imei(user.getImei())
-                .androidId(user.getAndroidId())
-                .ip(user.getIp())
-                .osType(OsEnum.getByName(user.getDeviceSystem()))
-                .registerTime(user.getCreateTime())
-                .build();
-        //调接口
-        ResultVO<AppReportLogRpcVO> result;
-        try {
-            result = appUserRpc.register(dto);
-        } catch (Exception e) {
-            log.error("用户注册回传上报异常, user : {}, e : {}", JsonUtil.toString(user), e.getMessage());
-            return;
-        }
-        log.error("用户注册回传结果, userId : {}, result : {}", user.getId(), JsonUtil.toString(result));
-        String adId = "AD_ID";
-        //成功
-        if (result.isSuccess() && result.getData() != null && result.getData().getAid() != null) {
-            adId = result.getData().getAid().toString();
-        }
-        //更新数据库
-        userService.update(new LambdaUpdateWrapper<User>().set(User::getAdId, adId).eq(User::getId, user.getId()));
-    }
 
-    @Override
-    public void orderCallBack(PlatformOrderDTO orderInfo) {
-        if (orderInfo == null) {
-            return;
-        }
-        log.error("用户注册回传, orderId : {}", orderInfo.getOrderId());
-        AppOrderRpcDTO dto = AppOrderRpcDTO.builder()
-                .appKey(String.valueOf(orderInfo.getGameId()))
-                .orderId(orderInfo.getOrderId())
-                .userId(String.valueOf(orderInfo.getUserId()))
-                .amount(orderInfo.getAmount().multiply(new BigDecimal("100")).longValue())
-                .realAmount(orderInfo.getRealAmount().multiply(new BigDecimal("100")).longValue())
-                .tranNo(orderInfo.getMerchantOrderNo())
-                .orderStatus(orderInfo.getStatus())
-                .payType(PayTypeEnum.getByPayType(orderInfo.getPayWayId()))
-                .payTime(orderInfo.getPayTime())
-                .createTime(orderInfo.getCreateTime())
-                .build();
-        //调接口
-        ResultVO<AppReportLogRpcVO> result;
-        try {
-            result = appOrderRpc.order(dto);
-        } catch (Exception e) {
-            log.error("订单回传上报异常, orderInfo : {}, e : {}", JsonUtil.toString(orderInfo), e.getMessage());
-            return;
-        }
-        log.error("订单回传结果, orderId : {}, result : {}", orderInfo.getOrderId(), JsonUtil.toString(result));
-        String adId = "AD_ID";
-        Integer callBackStatus = CallBackEnum.FAIL_CALL_BACK.getCallBackStatus();
-        //成功
-        if (result.isSuccess() && result.getData() != null && result.getData().getAid() != null) {
-            adId = result.getData().getAid().toString();
-            callBackStatus = CallBackEnum.SUCCESS_CALL_BACK.getCallBackStatus();
-        }
-        //更新数据库
-        orderService.update(new LambdaUpdateWrapper<Order>()
-                .set(Order::getAdId, adId)
-                .set(Order::getCallBackStatus, callBackStatus)
-                .eq(Order::getOrderId, orderInfo.getOrderId()));
-    }
+//    @DubboReference(providedBy = PlatformServer.SERVER_DUBBO_NAME)
+//    private IAppUserRpc appUserRpc;
+//
+//    @DubboReference(providedBy = PlatformServer.SERVER_DUBBO_NAME)
+//    private IAppOrderRpc appOrderRpc;
+//
+//    @Override
+//    public void userCallBack(User user) {
+//        if (user == null) {
+//            return;
+//        }
+//        log.error("用户注册回传, userId : {}", user.getId());
+//        UserRegisterRpcDTO dto = UserRegisterRpcDTO.builder()
+//                .appKey(String.valueOf(user.getGameId()))
+//                .userId(String.valueOf(user.getId()))
+//                .username(user.getUsername())
+//                .mac(user.getMac())
+//                .imei(user.getImei())
+//                .androidId(user.getAndroidId())
+//                .ip(user.getIp())
+//                .osType(OsEnum.getByName(user.getDeviceSystem()))
+//                .registerTime(user.getCreateTime())
+//                .build();
+//        //调接口
+//        ResultVO<AppReportLogRpcVO> result;
+//        try {
+//            result = appUserRpc.register(dto);
+//        } catch (Exception e) {
+//            log.error("用户注册回传上报异常, user : {}, e : {}", JsonUtil.toString(user), e.getMessage());
+//            return;
+//        }
+//        log.error("用户注册回传结果, userId : {}, result : {}", user.getId(), JsonUtil.toString(result));
+//        String adId = "AD_ID";
+//        //成功
+//        if (result.isSuccess() && result.getData() != null && result.getData().getAid() != null) {
+//            adId = result.getData().getAid().toString();
+//        }
+//        //更新数据库
+//        userService.update(new LambdaUpdateWrapper<User>().set(User::getAdId, adId).eq(User::getId, user.getId()));
+//    }
+//
+//    @Override
+//    public void orderCallBack(PlatformOrderDTO orderInfo) {
+//        if (orderInfo == null) {
+//            return;
+//        }
+//        log.error("用户注册回传, orderId : {}", orderInfo.getOrderId());
+//        AppOrderRpcDTO dto = AppOrderRpcDTO.builder()
+//                .appKey(String.valueOf(orderInfo.getGameId()))
+//                .orderId(orderInfo.getOrderId())
+//                .userId(String.valueOf(orderInfo.getUserId()))
+//                .amount(orderInfo.getAmount().multiply(new BigDecimal("100")).longValue())
+//                .realAmount(orderInfo.getRealAmount().multiply(new BigDecimal("100")).longValue())
+//                .tranNo(orderInfo.getMerchantOrderNo())
+//                .orderStatus(orderInfo.getStatus())
+//                .payType(PayTypeEnum.getByPayType(orderInfo.getPayWayId()))
+//                .payTime(orderInfo.getPayTime())
+//                .createTime(orderInfo.getCreateTime())
+//                .build();
+//        //调接口
+//        ResultVO<AppReportLogRpcVO> result;
+//        try {
+//            result = appOrderRpc.order(dto);
+//        } catch (Exception e) {
+//            log.error("订单回传上报异常, orderInfo : {}, e : {}", JsonUtil.toString(orderInfo), e.getMessage());
+//            return;
+//        }
+//        log.error("订单回传结果, orderId : {}, result : {}", orderInfo.getOrderId(), JsonUtil.toString(result));
+//        String adId = "AD_ID";
+//        Integer callBackStatus = CallBackEnum.FAIL_CALL_BACK.getCallBackStatus();
+//        //成功
+//        if (result.isSuccess() && result.getData() != null && result.getData().getAid() != null) {
+//            adId = result.getData().getAid().toString();
+//            callBackStatus = CallBackEnum.SUCCESS_CALL_BACK.getCallBackStatus();
+//        }
+//        //更新数据库
+//        orderService.update(new LambdaUpdateWrapper<Order>()
+//                .set(Order::getAdId, adId)
+//                .set(Order::getCallBackStatus, callBackStatus)
+//                .eq(Order::getOrderId, orderInfo.getOrderId()));
+//    }
 
 }

+ 2 - 2
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameAppletServiceImpl.java

@@ -2,11 +2,11 @@ package com.zanxiang.game.module.sdk.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.HttpStatusEnum;
-import com.zanxiang.game.module.base.enums.OrderStateEnum;
+import com.zanxiang.game.module.base.pojo.enums.HttpStatusEnum;
 import com.zanxiang.game.module.mybatis.entity.GameApplet;
 import com.zanxiang.game.module.mybatis.entity.Order;
 import com.zanxiang.game.module.mybatis.mapper.GameAppletMapper;
+import com.zanxiang.game.module.sdk.enums.OrderStateEnum;
 import com.zanxiang.game.module.sdk.pojo.dto.*;
 import com.zanxiang.game.module.sdk.pojo.param.UserData;
 import com.zanxiang.game.module.sdk.pojo.vo.GameAppletVO;

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameExtServiceImpl.java

@@ -2,10 +2,10 @@ package com.zanxiang.game.module.sdk.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.ExpireTimeEnum;
 import com.zanxiang.game.module.mybatis.entity.GameExt;
 import com.zanxiang.game.module.mybatis.mapper.GameExtMapper;
 import com.zanxiang.game.module.sdk.constant.RedisKeyConstant;
+import com.zanxiang.game.module.sdk.enums.ExpireTimeEnum;
 import com.zanxiang.game.module.sdk.service.IGameExtService;
 import com.zanxiang.game.module.sdk.util.RedisUtil;
 import lombok.extern.slf4j.Slf4j;

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GamePayStrategyServiceImpl.java

@@ -2,7 +2,7 @@ package com.zanxiang.game.module.sdk.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.StatusEnum;
+import com.zanxiang.game.module.base.pojo.enums.StatusEnum;
 import com.zanxiang.game.module.mybatis.entity.GamePayStrategy;
 import com.zanxiang.game.module.mybatis.mapper.GameStrategyMapper;
 import com.zanxiang.game.module.sdk.pojo.param.UserData;

+ 6 - 4
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GamePayWayServiceImpl.java

@@ -3,9 +3,8 @@ package com.zanxiang.game.module.sdk.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.enums.DeleteEnum;
-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.mybatis.entity.GamePayWay;
 import com.zanxiang.game.module.mybatis.mapper.GamePayWayMapper;
 import com.zanxiang.game.module.sdk.pojo.dto.GamePayWayDTO;
@@ -16,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @author xufeng
@@ -60,6 +60,8 @@ public class GamePayWayServiceImpl extends ServiceImpl<GamePayWayMapper, GamePay
             log.error("参数错误, 游戏支付配置信息不存在, gameId : {}", gameId);
             throw new BaseException("参数错误, 游戏支付配置信息不存在");
         }
-        return BeanUtils.copyList(gamePayWayList, GamePayWayDTO.class);
+        return gamePayWayList.stream()
+                .map(gamePayWay -> BeanUtil.copy(gamePayWay, GamePayWayDTO.class))
+                .collect(Collectors.toList());
     }
 }

+ 0 - 2
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameUserRoleServiceImpl.java

@@ -80,7 +80,6 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
                     .set(GameUserRole::getServerName, param.getServerName())
                     .set(param.getRoleVipLevel() != null, GameUserRole::getRoleVipLevel, param.getRoleVipLevel())
                     .set(param.getRolePower() != null, GameUserRole::getRolePower, param.getRolePower())
-                    .set(param.getPlatformCoin() != null, GameUserRole::getPlatformCoin, param.getPlatformCoin())
                     .set(GameUserRole::getUpdateTime, param.getRoleGradeUpdateTime() == null || param.getRoleGradeUpdateTime() <= 0 ? LocalDateTime.now() : DateUtil.secondToLocalDateTime(param.getRoleGradeUpdateTime()))
                     .eq(GameUserRole::getGameId, userData.getGameId())
                     .eq(GameUserRole::getRoleId, param.getRoleId()));
@@ -119,7 +118,6 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
                 .roleLevel(param.getRoleLevel())
                 .roleVipLevel(param.getRoleVipLevel())
                 .rolePower(param.getRolePower())
-                .platformCoin(param.getPlatformCoin())
                 .os(userData.getDeviceSystem())
                 .createTime(param.getRoleGradeUpdateTime() == null || param.getRoleGradeUpdateTime() <= 0 ? LocalDateTime.now() : DateUtil.secondToLocalDateTime(param.getRoleGradeUpdateTime()))
                 .updateTime(LocalDateTime.now())

+ 0 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameUserServiceImpl.java

@@ -31,7 +31,6 @@ public class GameUserServiceImpl extends ServiceImpl<GameUserMapper, GameUser> i
         }
         super.save(GameUser.builder()
                 .userId(user.getId())
-                .agentId(user.getAgentId())
                 .gameId(user.getGameId())
                 .nickname(user.getNickname())
                 .createTime(LocalDateTime.now())

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/IpBanServiceImpl.java

@@ -2,7 +2,7 @@ package com.zanxiang.game.module.sdk.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.BanStatusEnum;
+import com.zanxiang.game.module.base.pojo.enums.BanStatusEnum;
 import com.zanxiang.game.module.mybatis.entity.IpBan;
 import com.zanxiang.game.module.mybatis.mapper.IpBanMapper;
 import com.zanxiang.game.module.sdk.service.IIpBanService;

+ 14 - 13
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/LoginServiceImpl.java

@@ -2,14 +2,14 @@ package com.zanxiang.game.module.sdk.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.zanxiang.game.module.base.enums.BanStatusEnum;
-import com.zanxiang.game.module.base.enums.HttpStatusEnum;
-import com.zanxiang.game.module.base.enums.SmsTypeEnum;
+import com.zanxiang.game.module.base.pojo.enums.BanStatusEnum;
+import com.zanxiang.game.module.base.pojo.enums.HttpStatusEnum;
 import com.zanxiang.game.module.mybatis.entity.GameExt;
 import com.zanxiang.game.module.mybatis.entity.User;
 import com.zanxiang.game.module.mybatis.entity.UserCard;
 import com.zanxiang.game.module.mybatis.entity.UserShare;
 import com.zanxiang.game.module.sdk.enums.LoginTypeEnum;
+import com.zanxiang.game.module.sdk.enums.SmsTypeEnum;
 import com.zanxiang.game.module.sdk.pojo.dto.GameAppletDTO;
 import com.zanxiang.game.module.sdk.pojo.dto.UserDTO;
 import com.zanxiang.game.module.sdk.pojo.param.LoginMobileParam;
@@ -57,9 +57,6 @@ public class LoginServiceImpl implements IRegisterLoginService {
     @Autowired
     private IWordCheckService wordCheckService;
 
-    @Autowired
-    private IPromoChannelService promoChannelService;
-
     @Autowired
     private IUserCardService userCardService;
 
@@ -84,6 +81,9 @@ public class LoginServiceImpl implements IRegisterLoginService {
     @Autowired
     private IUserShareService userShareService;
 
+    @Autowired
+    private IAgentService agentService;
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public ResultVO<UserLoginVO> loginWxCode(LoginVxCodeParam param, UserData userData) {
@@ -122,10 +122,10 @@ public class LoginServiceImpl implements IRegisterLoginService {
         Long agentId;
         Long fromUserId = null;
         if (param.getShareUserId() == null) {
-            agentId = promoChannelService.getAgentIdByChannel(userData.getChannel());
+            agentId = agentService.getAgentIdByChannel(userData.getChannel());
         } else {
             UserDTO userDTO = userService.getUserByUserId(param.getShareUserId());
-            agentId = userDTO.getAgentId();
+            agentId = userDTO.getLastAgentId();
             fromUserId = userDTO.getId();
         }
         //构造用户信息
@@ -135,7 +135,7 @@ public class LoginServiceImpl implements IRegisterLoginService {
         //创建用户信息
         userService.save(user);
         gameUserService.createGameUser(user);
-        callBackService.userCallBack(user);
+//        callBackService.userCallBack(user);
         //返回登录信息
         if (fromUserId == null) {
             return ResultVO.ok(this.createUserLoginVO(user, userData));
@@ -194,12 +194,12 @@ public class LoginServiceImpl implements IRegisterLoginService {
                 return ResultVO.fail(checkRegisterEnum.getMsg());
             }
             //创建用户信息
-            Long agentId = promoChannelService.getAgentIdByChannel(userData.getChannel());
+            Long agentId = agentService.getAgentIdByChannel(userData.getChannel());
             user = transform(userData, agentId, username);
             user.setPassword(password);
             userService.save(user);
             gameUserService.createGameUser(user);
-            callBackService.userCallBack(user);
+//            callBackService.userCallBack(user);
         }
         //返回登录信息
         return ResultVO.ok(this.createUserLoginVO(user, userData));
@@ -224,12 +224,12 @@ public class LoginServiceImpl implements IRegisterLoginService {
                 .eq(User::getGameId, userData.getGameId()).eq(User::getMobile, mobile));
         //用户信息不存在, 直接注册
         if (user == null) {
-            Long agentId = promoChannelService.getAgentIdByChannel(userData.getChannel());
+            Long agentId = agentService.getAgentIdByChannel(userData.getChannel());
             user = transform(userData, agentId, mobile);
             user.setMobile(mobile);
             userService.save(user);
             gameUserService.createGameUser(user);
-            callBackService.userCallBack(user);
+//            callBackService.userCallBack(user);
         } else {
             //判断账号是否停用
             if (Objects.equals(BanStatusEnum.BAN_STATUS.getStatus(), user.getStatus())) {
@@ -303,6 +303,7 @@ public class LoginServiceImpl implements IRegisterLoginService {
     private User transform(UserData userData, Long agentId, String userName) {
         //构造用户信息
         return User.builder()
+                .regAgentId(agentId)
                 .agentId(agentId)
                 .gameId(userData.getGameId())
                 .username(userName)

+ 3 - 3
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/OrderPayServiceImpl.java

@@ -1,11 +1,11 @@
 package com.zanxiang.game.module.sdk.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.zanxiang.game.module.base.enums.DeviceTypeEnum;
-import com.zanxiang.game.module.base.enums.OrderStateEnum;
-import com.zanxiang.game.module.base.enums.PayDeviceEnum;
+import com.zanxiang.game.module.base.pojo.enums.PayDeviceEnum;
 import com.zanxiang.game.module.mybatis.entity.Order;
 import com.zanxiang.game.module.mybatis.entity.OrderPayParam;
+import com.zanxiang.game.module.sdk.enums.DeviceTypeEnum;
+import com.zanxiang.game.module.sdk.enums.OrderStateEnum;
 import com.zanxiang.game.module.sdk.enums.PayTypeEnum;
 import com.zanxiang.game.module.sdk.pojo.dto.GamePayWayDTO;
 import com.zanxiang.game.module.sdk.pojo.dto.PayApplicationDTO;

+ 5 - 8
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/OrderServiceImpl.java

@@ -2,16 +2,16 @@ package com.zanxiang.game.module.sdk.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.CallBackEnum;
-import com.zanxiang.game.module.base.enums.OrderStateEnum;
-import com.zanxiang.game.module.base.utils.BeanUtils;
 import com.zanxiang.game.module.mybatis.entity.*;
 import com.zanxiang.game.module.mybatis.mapper.OrderMapper;
+import com.zanxiang.game.module.sdk.enums.CallBackEnum;
+import com.zanxiang.game.module.sdk.enums.OrderStateEnum;
 import com.zanxiang.game.module.sdk.pojo.dto.GamePayWayDTO;
 import com.zanxiang.game.module.sdk.pojo.dto.PlatformOrderDTO;
 import com.zanxiang.game.module.sdk.pojo.param.ProductPayParam;
 import com.zanxiang.game.module.sdk.pojo.param.UserData;
 import com.zanxiang.game.module.sdk.service.*;
+import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.exception.BaseException;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.RandomStringUtils;
@@ -32,9 +32,6 @@ import java.time.format.DateTimeFormatter;
 @Service
 public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {
 
-    @Autowired
-    private IPromoChannelService promoChannelService;
-
     @Autowired
     private IGameService gameService;
 
@@ -88,7 +85,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         //构造订单
         super.save(Order.builder()
                 .orderId(orderNum)
-                .agentId(promoChannelService.getAgentIdByChannel(userData.getChannel()))
+                .agentId(user.getAgentId())
                 .cpId(game.getCpId())
                 .cpOrderId(payParam.getOrderId())
                 .userId(userData.getUserId())
@@ -144,6 +141,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
     @Override
     public PlatformOrderDTO getByOrderId(String orderId) {
         Order order = getOne(new LambdaQueryWrapper<Order>().eq(Order::getOrderId, orderId));
-        return BeanUtils.copy(order, PlatformOrderDTO.class);
+        return BeanUtil.copy(order, PlatformOrderDTO.class);
     }
 }

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/PayApplicationServiceImpl.java

@@ -2,7 +2,7 @@ package com.zanxiang.game.module.sdk.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.base.enums.HttpStatusEnum;
+import com.zanxiang.game.module.base.pojo.enums.HttpStatusEnum;
 import com.zanxiang.game.module.mybatis.entity.PayApplication;
 import com.zanxiang.game.module.mybatis.entity.PayMerchant;
 import com.zanxiang.game.module.mybatis.mapper.PayApplicationMapper;

+ 3 - 2
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/PayMerchantServiceImpl.java

@@ -3,7 +3,6 @@ package com.zanxiang.game.module.sdk.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.mybatis.entity.PayMerchant;
 import com.zanxiang.game.module.mybatis.mapper.PayMerchantMapper;
 import com.zanxiang.game.module.sdk.pojo.dto.PayMerchantDTO;
@@ -14,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 游戏支付商户配置表 服务实现类
@@ -49,6 +49,7 @@ public class PayMerchantServiceImpl extends ServiceImpl<PayMerchantMapper, PayMe
             log.error("参数错误, 符合条件的商户不存在, ids : {}", merchantNoList);
             throw new BaseException("参数错误, 符合条件的商户不存在");
         }
-        return BeanUtils.copyList(payMerchantList, PayMerchantDTO.class);
+        return payMerchantList.stream().map(payMerchant -> BeanUtil.copy(payMerchant, PayMerchantDTO.class))
+                .collect(Collectors.toList());
     }
 }

+ 2 - 2
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/PerformOrderServiceImpl.java

@@ -3,9 +3,9 @@ package com.zanxiang.game.module.sdk.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.zanxiang.game.module.base.enums.CpStatusEnum;
-import com.zanxiang.game.module.base.enums.OrderStateEnum;
+import com.zanxiang.game.module.base.pojo.enums.CpStatusEnum;
 import com.zanxiang.game.module.mybatis.entity.*;
+import com.zanxiang.game.module.sdk.enums.OrderStateEnum;
 import com.zanxiang.game.module.sdk.pojo.dto.PayMerchantDTO;
 import com.zanxiang.game.module.sdk.pojo.dto.PlatformOrderDTO;
 import com.zanxiang.game.module.sdk.pojo.result.PushCpResult;

+ 0 - 32
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/PromoChannelServiceImpl.java

@@ -1,32 +0,0 @@
-package com.zanxiang.game.module.sdk.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zanxiang.game.module.mybatis.entity.PromoChannel;
-import com.zanxiang.game.module.mybatis.mapper.PromoChannelMapper;
-import com.zanxiang.game.module.sdk.service.IPromoChannelService;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.logging.log4j.util.Strings;
-import org.springframework.stereotype.Service;
-
-/**
- * @author : lingfeng
- * @time : 2022-10-31
- * @description : 推广渠道
- */
-@Slf4j
-@Service
-public class PromoChannelServiceImpl extends ServiceImpl<PromoChannelMapper, PromoChannel> implements IPromoChannelService {
-
-    @Override
-    public Long getAgentIdByChannel(String channel) {
-        if (Strings.isBlank(channel)) {
-            return 0L;
-        }
-        PromoChannel promoChannel = this.getOne(new LambdaQueryWrapper<PromoChannel>().eq(PromoChannel::getChannel, channel));
-        if (promoChannel == null) {
-            return 0L;
-        }
-        return promoChannel.getId();
-    }
-}

+ 3 - 3
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/SmsServiceImpl.java

@@ -1,9 +1,9 @@
 package com.zanxiang.game.module.sdk.service.impl;
 
-import com.zanxiang.game.module.base.enums.ExpireTimeEnum;
-import com.zanxiang.game.module.base.enums.HttpStatusEnum;
-import com.zanxiang.game.module.base.enums.SmsTypeEnum;
+import com.zanxiang.game.module.base.pojo.enums.HttpStatusEnum;
 import com.zanxiang.game.module.sdk.constant.RedisKeyConstant;
+import com.zanxiang.game.module.sdk.enums.ExpireTimeEnum;
+import com.zanxiang.game.module.sdk.enums.SmsTypeEnum;
 import com.zanxiang.game.module.sdk.pojo.dto.UserDTO;
 import com.zanxiang.game.module.sdk.pojo.param.SmsCheckParam;
 import com.zanxiang.game.module.sdk.pojo.param.SmsSendParam;

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů