zhaoxian il y a 2 ans
Parent
commit
2063d6584f

+ 14 - 9
ruixuan-live/src/main/java/com/ruixuan/report/service/impl/KuaishouLiveAccountReportServiceImpl.java

@@ -207,19 +207,24 @@ public class KuaishouLiveAccountReportServiceImpl implements IKuaishouLiveAccoun
     }
 
     @Override
-    public JSONObject getOperateCostTrendChartList(Long userId, String startDate, String endDate) {
+    public JSONObject getOperateCostTrendChartList(Long userId, String queryType, String startDate, String endDate) {
         String roleKey = sysUserService.getRoleKeyByUserId(userId);
         List<Long> userList;
-        if ("admin".equals(roleKey) || "directorOperations".equals(roleKey)) {
-            //查看所有
-            userList = null;
-        } else if ("operationsManager".equals(roleKey)) {
-            //运营经理 可以看自己部门所有人的(自己和下属的)
-            Long deptId = deptService.getDeptIdByUserId(userId);
-            userList = deptService.getDeptUserListByDeptId(deptId);
-        } else {
+        if ("1".equals(queryType)) {
             userList = Arrays.asList(userId);
+        } else {
+            if ("admin".equals(roleKey) || "directorOperations".equals(roleKey)) {
+                //查看所有
+                userList = null;
+            } else if ("operationsManager".equals(roleKey)) {
+                //运营经理 可以看自己部门所有人的(自己和下属的)
+                Long deptId = deptService.getDeptIdByUserId(userId);
+                userList = deptService.getDeptUserListByDeptId(deptId);
+            } else {
+                userList = Arrays.asList(userId);
+            }
         }
+
         //整理入参时间
         Map<String, Object> map = getDateTime(startDate, endDate);
         map.put("userList", userList);