From 032f7c07e272dae9a857ed76b480dc391dc4073f Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 12 三月 2024 14:18:47 +0800 Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0 --- cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java | 30 +++++++++++++++++++++++++++--- 1 files changed, 27 insertions(+), 3 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 7984939..ccf26b4 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 @@ -909,11 +909,27 @@ list4.add(43); detailsResponse.setRid(list4); } - } } //====================================================== } + }else{ + // todo 返回门店id 和场地id + // 查询指定场地 + List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>() + .eq(PointsMerchandiseStore::getPointsMerchandiseId, merchandise.getId())); + // 门店 + ArrayList<Integer> list3 = new ArrayList<>(); + // 场地 + ArrayList<Integer> list4 = new ArrayList<>(); + for (PointsMerchandiseStore temp : list) { + Integer storeId = temp.getStoreId(); + Integer siteId = temp.getSiteId(); + list3.add(storeId); + list4.add(siteId); + } + detailsResponse.setRid(list4); + detailsResponse.setSid(list3); } @@ -1531,6 +1547,7 @@ List<Map<String, Object>> mapList = new ArrayList<>(); LambdaQueryWrapper<UserPointsMerchandise> userPointsMerchandiseLambdaQueryWrapper = new LambdaQueryWrapper<>(); userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getPointsMerchandiseId, pointMercharsPayedVo.getId()); + userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1); if (ToolUtil.isNotEmpty(pointMercharsPayedVo.getStatus())) { userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getStatus, pointMercharsPayedVo.getStatus()); } @@ -1693,12 +1710,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