|
@@ -1,5 +1,6 @@
|
|
package com.zanxiang.game.data.serve.service.impl;
|
|
package com.zanxiang.game.data.serve.service.impl;
|
|
|
|
|
|
|
|
+import com.github.sd4324530.jtuple.Tuple2;
|
|
import com.google.common.base.CaseFormat;
|
|
import com.google.common.base.CaseFormat;
|
|
import com.zanxiang.erp.security.util.SecurityUtil;
|
|
import com.zanxiang.erp.security.util.SecurityUtil;
|
|
import com.zanxiang.game.data.serve.component.DataPowerComponent;
|
|
import com.zanxiang.game.data.serve.component.DataPowerComponent;
|
|
@@ -42,11 +43,10 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Page<AdsOrderDetailVO> listOfPage(AdsOrderDetailListDTO dto) {
|
|
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> 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()) {
|
|
if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
|
|
// 只有管理员才能查看全部数据
|
|
// 只有管理员才能查看全部数据
|
|
dto.setPitcherId(SecurityUtil.getUserId().toString());
|
|
dto.setPitcherId(SecurityUtil.getUserId().toString());
|
|
@@ -177,11 +177,9 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public AdsOrderDetailTotalVO orderTotal(AdsOrderDetailTotalDTO dto) {
|
|
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> 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();
|
|
Criteria cri = Cnd.cri();
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
cri.where().andEquals("source_system", 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_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 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 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 (
|
|
LEFT JOIN (
|
|
SELECT
|
|
SELECT
|
|
source_system ,
|
|
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_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 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 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 (
|
|
LEFT JOIN (
|
|
SELECT
|
|
SELECT
|
|
source_system ,
|
|
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_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 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 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 (
|
|
LEFT JOIN (
|
|
SELECT
|
|
SELECT
|
|
source_system ,
|
|
source_system ,
|