Browse Source

修改内容:bug修复

lth 1 year ago
parent
commit
94e8386d99

+ 24 - 11
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsOrderDetailService.java

@@ -1,5 +1,6 @@
 package com.zanxiang.game.data.serve.service.impl;
 
+import com.github.sd4324530.jtuple.Tuple2;
 import com.google.common.base.CaseFormat;
 import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.data.serve.component.DataPowerComponent;
@@ -42,11 +43,10 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
 
     @Override
     public Page<AdsOrderDetailVO> listOfPage(AdsOrderDetailListDTO dto) {
-        /*Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
         List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
-        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();*/
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList(): Collections.singletonList(Long.parseLong(dto.getPitcherId()));
-        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : dto.getGameId();
+        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
+
         if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
             // 只有管理员才能查看全部数据
             dto.setPitcherId(SecurityUtil.getUserId().toString());
@@ -177,11 +177,9 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
 
     @Override
     public AdsOrderDetailTotalVO orderTotal(AdsOrderDetailTotalDTO dto) {
-        /*Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
         List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
-        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();*/
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList(): Collections.singletonList(Long.parseLong(dto.getPitcherId()));
-        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : dto.getGameId();
+        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -391,7 +389,12 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
                 	LEFT JOIN dm_game_order.t_cp e on a.source_system = e.source_system AND a.cp_id = e.id
                 	LEFT JOIN dm_game_order.t_game f on a.source_system = f.source_system AND a.game_id = f.id
                 	LEFT JOIN dm_game_order.t_game g on b.source_system = g.source_system AND b.game_id = g.id
-                	LEFT JOIN dm_game_order.t_game_server_merge h on a.source_system = h.source_system AND a.server_id = h.server_id AND g.super_game_id = h.game_id
+                	LEFT JOIN (
+                	    SELECT
+                            *
+                        FROM dm_game_order.t_game_server_merge
+                        WHERE is_delete = 0
+                	) h on a.source_system = h.source_system AND a.server_id = h.server_id AND g.super_game_id = h.game_id
                 	LEFT JOIN (
                 		SELECT
                 			source_system ,
@@ -472,7 +475,12 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
                 	LEFT JOIN dm_game_order.t_cp e on a.source_system = e.source_system AND a.cp_id = e.id
                 	LEFT JOIN dm_game_order.t_game f on a.source_system = f.source_system AND a.game_id = f.id
                 	LEFT JOIN dm_game_order.t_game g on b.source_system = g.source_system AND b.game_id = g.id
-                	LEFT JOIN dm_game_order.t_game_server_merge h on a.source_system = h.source_system AND a.server_id = h.server_id AND g.super_game_id = h.game_id
+                	LEFT JOIN (
+                	    SELECT
+                            *
+                        FROM dm_game_order.t_game_server_merge
+                        WHERE is_delete = 0
+                	) h on a.source_system = h.source_system AND a.server_id = h.server_id AND g.super_game_id = h.game_id
                 	LEFT JOIN (
                 		SELECT
                 			source_system ,
@@ -554,7 +562,12 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
                 	LEFT JOIN dm_game_order.t_cp e on a.source_system = e.source_system AND a.cp_id = e.id
                 	LEFT JOIN dm_game_order.t_game f on a.source_system = f.source_system AND a.game_id = f.id
                 	LEFT JOIN dm_game_order.t_game g on b.source_system = g.source_system AND b.game_id = g.id
-                	LEFT JOIN dm_game_order.t_game_server_merge h on a.source_system = h.source_system AND a.server_id = h.server_id AND g.super_game_id = h.game_id
+                	LEFT JOIN (
+                	    SELECT
+                            *
+                        FROM dm_game_order.t_game_server_merge
+                        WHERE is_delete = 0
+                	) h on a.source_system = h.source_system AND a.server_id = h.server_id AND g.super_game_id = h.game_id
                 	LEFT JOIN (
                 		SELECT
                 			source_system ,