From ae9bfd2d66f68a553786ac78b12f4390e65e4e09 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期五, 24 十一月 2023 18:30:18 +0800 Subject: [PATCH] 后台bug修改 --- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/DataStatisticsController.java | 42 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 39 insertions(+), 3 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..29f5cb4 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) { @@ -230,6 +235,7 @@ List<PointMerchandiseIncomeVo> amount = pointMercharsClient.getAmount(); for (PointMerchandiseIncomeVo pointMerchandiseIncomeVo : amount) { IncomeVO temp = new IncomeVO(); + if (pointMerchandiseIncomeVo==null) continue; temp.setInsertTime(pointMerchandiseIncomeVo.getInsertTime()); if (pointMerchandiseIncomeVo.getCash()!=null){ temp.setAmount(pointMerchandiseIncomeVo.getCash()); @@ -715,6 +721,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 +866,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 +888,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 +955,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 +1123,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); // 会员费 @@ -1206,8 +1228,15 @@ @RequestMapping("/store") public String store(Model model) { Integer objectType = UserExt.getUser().getObjectType(); - List<TStore> list = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getState, 1)); - model.addAttribute("list",list); + List<TStore> tStores = new ArrayList<>(); + + if (objectType == 2){ + tStores = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getState, 1).eq(TStore::getOperatorId,UserExt.getUser().getObjectId())); + } + if (objectType == 3){ + tStores = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getState, 1).eq(TStore::getId,UserExt.getUser().getObjectId())); + } + model.addAttribute("list",tStores); model.addAttribute("objectType",objectType); model.addAttribute("objectId",UserExt.getUser().getObjectId()); return PREFIX + "storeIncome.html"; @@ -1363,6 +1392,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 +1430,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