From e030255c23c7ba3e2cbad1036a810d6d72fa864f Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期四, 26 十月 2023 18:04:58 +0800
Subject: [PATCH] 修改bug

---
 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java
index e36fd4f..cfcfb40 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java
@@ -192,6 +192,11 @@
                 incomeVOS.add(temp);
             }
         }
+        // query权限设置 获取运营商下的门店集合
+
+        if (roleType==2){
+            competitionQuery.setOperatorId(UserExt.getUser().getObjectId());
+        }
         // 报名活动
         List<PaymentCompetition> competitions = competitionClient.listAllPayment(competitionQuery);
         for (PaymentCompetition competition : competitions) {
@@ -715,6 +720,9 @@
     @RequestMapping(value = "/backStore")
     @ResponseBody
     public Object backStore(Integer id) {
+        if(UserExt.getUser().getObjectType()==3){
+            id = UserExt.getUser().getObjectId();
+        }
         HashMap<String, Object> map = new HashMap<>();
         List<Integer> userPt = appUserClient.getUserStore(id);
         if(userPt.size()==0){
@@ -857,7 +865,7 @@
     @RequestMapping(value = "/courseYys")
     @ResponseBody
     public Object courseYys(Integer id) {
-        List<Integer> userPt = appUserClient.getUserPt(Arrays.asList(id));
+        List<Integer> userPt = appUserClient.getUserYYs(id);
         HashMap<String, Object> map = coursePackagePaymentClient.coursePt(userPt);
         return map;
     }
@@ -879,6 +887,9 @@
     @RequestMapping(value = "/userAndVipStore")
     @ResponseBody
     public Object userAndVipStore(Integer id) {
+        if(UserExt.getUser().getObjectType()==3){
+            id = UserExt.getUser().getObjectId();
+        }
         HashMap<String, Object> map = appUserClient.userAndVipStore(id);
         return map;
     }
@@ -943,6 +954,12 @@
     @RequestMapping(value = "/actStore")
     @ResponseBody
     public Object actStore(Integer id) {
+
+
+        Integer objectType = UserExt.getUser().getObjectType();
+        if(objectType==3){
+            id = UserExt.getUser().getObjectId();
+        }
         List<Integer> userPt = appUserClient.getUserStore(id);
         HashMap<String, Object> map = competitionClient.actPt(userPt);
 
@@ -1105,6 +1122,10 @@
         // 找出平台的用户
         List<User> list = sysUserService.list(new LambdaQueryWrapper<User>().eq(User::getObjectType, 2));
         List<Integer> ids = list.stream().map(User::getId).collect(Collectors.toList());
+        Integer objectType = UserExt.getUser().getObjectType();
+        if(objectType==3){
+            id = UserExt.getUser().getObjectId();
+        }
         List<Integer> userIds = appUserClient.getUserStore(id);
         QueryDataFee queryDataFee = new QueryDataFee(time, userIds);
         // 会员费
@@ -1363,6 +1384,9 @@
     @RequestMapping("/stuUserDataStore")
     @ResponseBody
     public Object stuUserDataStore(Integer id) {
+        if(UserExt.getUser().getObjectType()==3){
+            id = UserExt.getUser().getObjectId();
+        }
         ArrayList<Integer> objects = new ArrayList<>();
         objects.add(1);
         HashMap<String, Object> map = appUserClient.queryUserAgeStore(id);
@@ -1398,6 +1422,10 @@
     @RequestMapping("/selectStoreJx")
     @ResponseBody
     public Object selectStoreJx(Integer id) {
+        Integer objectType = UserExt.getUser().getObjectType();
+        if(objectType==3){
+            id = UserExt.getUser().getObjectId();
+        }
         ArrayList<Integer> objects = new ArrayList<>();
         objects.add(1);
         HashMap<String, Object> map1 = appUserClient.queryUserAgeStore1(id);

--
Gitblit v1.7.1