44323
2023-10-24 ab17f44cc4aa2b15c36d6f523fa3844a338101ce
cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
@@ -193,11 +193,22 @@
    }
@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;
        }