From 06c7348b197ede0b68e6d02f019bf81892329b88 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 19 三月 2024 18:07:12 +0800 Subject: [PATCH] 修改bug --- cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java index 85c9a57..b3ea633 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java @@ -226,10 +226,12 @@ String endTime = (String) stringObjectMap.get("endTime"); stringObjectMap.put("timeValue", startTime + "至" + endTime); int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() - .eq(UserPointsMerchandise::getPointsMerchandiseId, o)); + .eq(UserPointsMerchandise::getPointsMerchandiseId, o) + .eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1)); int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() .eq(UserPointsMerchandise::getPointsMerchandiseId, o) - .eq(UserPointsMerchandise::getStatus, 2)); + .eq(UserPointsMerchandise::getStatus, 2) + .eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1)); stringObjectMap.put("hasExchangeQty", count1); stringObjectMap.put("hasPickQty", count2); @@ -1361,7 +1363,6 @@ @PostMapping("/base/pointMerchars/updateDetailsUserPointMercase") public void updateDetailsUserPointMercase(@RequestBody UserPointsMerchandise merchandise) { merchandise.setUserId(null); - merchandise.setPointsMerchandiseId(null); upmseService.updateById(merchandise); } @@ -1440,8 +1441,6 @@ @PostMapping("/base/pointMerchars/getConsumeDetails") public List<ConsumeDetail> getConsumeDetails(@RequestBody BillingDataRequestVo requestVo) { return upmseService.getConsumeDetails(requestVo); - - } @@ -1710,12 +1709,19 @@ } }else if (byId.getUseScope()==4){ // 如果是指定场地 - List<Integer> collect1 = list.stream().map(PointsMerchandiseStore::getSiteId).collect(Collectors.toList()); + List<Integer> collect1 = list.stream().map(PointsMerchandiseStore::getSiteId).distinct().collect(Collectors.toList()); int temp =0; List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList()); + List<Store> stores1 = new ArrayList<>(); + for (Integer integer : collect) { + List<Integer> list1 = new ArrayList<>(); + list1.add(integer); + List<Store> stores = stoClient.queryStoreByIds(list1); + stores1.addAll(stores); + } List<Store> stores = stoClient.queryStoreByIds(collect); while (temp!=collect1.size()){ - for (Store store : stores) { + for (Store store : stores1) { Integer integer = collect1.get(temp); Site site = siteClient.querySiteById(integer); StoreVos storeVos1 = new StoreVos(); -- Gitblit v1.7.1