From 2e2be7f7475b5e583b0cffd89c6d18db52c247a6 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 04 十二月 2023 14:59:05 +0800 Subject: [PATCH] 同步代码 --- cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java | 59 ++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 34 insertions(+), 25 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 b074362..aba58d0 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 @@ -324,7 +324,6 @@ } -// if (cIds.size()>0) { List<PointsMerchandise> merchandises = pmdsService.list(new QueryWrapper<PointsMerchandise>().in("id", cIds) .eq("state", 1) @@ -341,34 +340,18 @@ integralCommodity.setSort(merchandise.getSort()); commodity.add(integralCommodity); } -// } } + + System.out.println(commodity); return commodity; } - @Resource - private CoursePackageClient coursePackageClient; - @Autowired - private PointsMerchandiseService pointsMerchandiseService; @ResponseBody @PostMapping("/base/pointMerchars/getCommoditys") public PointMerchandiseVo getVicinityGoods(@RequestBody CommodityRequest request) { -// if (request.getShopId()!=null){ -// List<CoursePackage> coursePackages = coursePackageClient.queryByStoreId(request.getShopId()); -// List<Integer> coursIds = new ArrayList<>(); -// for (CoursePackage coursePackage : coursePackages) { -// coursIds.add(coursePackage.getId()); -// } -// List<PointsMerchandise> points = pointsMerchandiseService.list(new QueryWrapper<PointsMerchandise>().eq("state",1).eq("shelves",1).in("coursePackageId", coursIds)); -// PointMerchandiseVo pointMerchandiseVo = new PointMerchandiseVo(); -// pointMerchandiseVo.setMerchandises(points); -// return pointMerchandiseVo; -// -// } - PointMerchandiseVo pointMerchandiseVo = new PointMerchandiseVo(); List<PointsMerchandise> list = new ArrayList<>(); @@ -873,15 +856,38 @@ } else if (merchandise.getUseScope() == 3) { // 指定门店 - List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>().eq(PointsMerchandiseStore::getPointsMerchandiseId, merchandise.getId())); + List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>() + .eq(PointsMerchandiseStore::getPointsMerchandiseId, merchandise.getId())); List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList()); detailsResponse.setSid(collect); if (collect.size() > 0) { // 获取rid - List<Integer> rid = stoClient.querySiteIdById(collect); - detailsResponse.setRid(rid); +// List<Integer> rid= stoClient.querySiteIdById(collect); + //detailsResponse.setRid(rid); + // todo 修改区域id 临时 + // 根据门店id 写死区域id 后续调整为门票指定多个区域 + // 以下代码均为临时代码 + for (Integer integer : collect) { + ArrayList<Integer> list2 = new ArrayList<>(); + if (integer==2024){ + list2.add(32); + detailsResponse.setRid(list2); + } + // 临时 根据门票id 指定的区域 + if (integer==9919){ + if (pointsMerchandise.getPointsMerchandiseId()==196||pointsMerchandise.getPointsMerchandiseId()==198){ + // 返回儿童区id + ArrayList<Integer> list3 = new ArrayList<>(); + list3.add(44); + detailsResponse.setRid(list3); + }else { + ArrayList<Integer> list4 = new ArrayList<>(); + list4.add(43); + detailsResponse.setRid(list4); + } + } + } } - } @@ -1162,8 +1168,11 @@ ArrayList<String> list1 = new ArrayList<>(list11); list1.add(coursePackage.getCoverDrawing()); detailsVo.setPics(list1); - CoursePackagePaymentConfig coursePackagePaymentConfig = cpClient.queryConfigCoursePackData(pmdsServiceById.getCoursePackageConfigId()); - detailsVo.setClassHours(coursePackagePaymentConfig.getClassHours()); + detailsVo.setClassHours(0); + if(coursePackage.getType() != 3){ + CoursePackagePaymentConfig coursePackagePaymentConfig = cpClient.queryConfigCoursePackData(pmdsServiceById.getCoursePackageConfigId()); + detailsVo.setClassHours(coursePackagePaymentConfig.getClassHours()); + } Collections.sort(detailsVo.getPics(), (s1, s2) -> { if (s1.equals(coursePackage.getCoverDrawing())) { return -1; // s1排在前面 -- Gitblit v1.7.1