|
@@ -1,5 +1,6 @@
|
|
package com.zanxiang.game.data.serve.service.impl;
|
|
package com.zanxiang.game.data.serve.service.impl;
|
|
|
|
|
|
|
|
+import com.zanxiang.erp.security.util.SecurityUtil;
|
|
import com.zanxiang.game.data.serve.pojo.entity.AdsOverallSummary;
|
|
import com.zanxiang.game.data.serve.pojo.entity.AdsOverallSummary;
|
|
import com.zanxiang.game.data.serve.pojo.param.AdsOverallSummaryParam;
|
|
import com.zanxiang.game.data.serve.pojo.param.AdsOverallSummaryParam;
|
|
import com.zanxiang.game.data.serve.pojo.vo.AdsOverallSummaryLineDataVO;
|
|
import com.zanxiang.game.data.serve.pojo.vo.AdsOverallSummaryLineDataVO;
|
|
@@ -164,10 +165,6 @@ public class AdsOverallSummaryServiceImpl implements IAdsOverallSummaryService {
|
|
//拼接游戏查询条件
|
|
//拼接游戏查询条件
|
|
cri.where().andEquals("gameId", param.getGameId());
|
|
cri.where().andEquals("gameId", param.getGameId());
|
|
}
|
|
}
|
|
- if (param.getPithcerId() != null) {
|
|
|
|
- //拼接投手查询条件
|
|
|
|
- cri.where().andEquals("pithcerId", param.getPithcerId());
|
|
|
|
- }
|
|
|
|
if (param.getAgentId() != null) {
|
|
if (param.getAgentId() != null) {
|
|
//拼接渠道查询条件
|
|
//拼接渠道查询条件
|
|
cri.where().andEquals("agentId", param.getAgentId());
|
|
cri.where().andEquals("agentId", param.getAgentId());
|
|
@@ -176,13 +173,17 @@ public class AdsOverallSummaryServiceImpl implements IAdsOverallSummaryService {
|
|
//拼接广告账户查询条件
|
|
//拼接广告账户查询条件
|
|
cri.where().andEquals("accountId", param.getAccountId());
|
|
cri.where().andEquals("accountId", param.getAccountId());
|
|
}
|
|
}
|
|
-
|
|
|
|
- /*
|
|
|
|
- * 普通用户只能查看自己的相关信息 默认传入的param里含有投手ID
|
|
|
|
- * 如果是组长 则需要排除掉 pitcher = -2 的所有数据
|
|
|
|
- * cri.where().andNotEquals("pithcerId", -2);
|
|
|
|
- * 如果是管理员账号 则不需要排除 pitcher = -2 的数据
|
|
|
|
- * */
|
|
|
|
|
|
+ //前端传递 pitcherId 根据 pitcherId 查询
|
|
|
|
+ if (param.getPitcherId() != null) {
|
|
|
|
+ //拼接投手查询条件
|
|
|
|
+ cri.where().andEquals("pitcherId", param.getPitcherId());
|
|
|
|
+ } else if (SecurityUtil.isManager()){
|
|
|
|
+ //前端没有传递 pitcherId 参数并且是管理员 查看所有数据 排除掉 pitcherId = -2 的数据
|
|
|
|
+ cri.where().andNotEquals("pitcherId", -2);
|
|
|
|
+ } else {
|
|
|
|
+ //前端没有传递 pitcherId 并且不是管理员 只能看自己的数据
|
|
|
|
+ cri.where().andEquals("pitcherId", SecurityUtil.getUserId());
|
|
|
|
+ }
|
|
|
|
|
|
//根据参数拼接条件
|
|
//根据参数拼接条件
|
|
switch (queryDays) {
|
|
switch (queryDays) {
|