| | |
| | | goods.setSellingPrice(price.getCash()); |
| | | goods.setIntegral(price.getPoint()); |
| | | } |
| | | Integer data = orderClient.getGoodsSaleNum(goods.getGoodsId(), 1).getData(); |
| | | goods.setSaleNum(data); |
| | | } |
| | | |
| | | //手动排序 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public GoodsVO goodsDetail(Long goodsId, String longitude, String latitude) { |
| | | public GoodsVO goodsDetail(Long goodsId, Integer shopId, String longitude, String latitude) { |
| | | if (goodsId == null || goodsId <= 0) { |
| | | throw new NullPointerException("商品ID不能为空"); |
| | | } |
| | |
| | | BeanUtils.copyBeanProp(goodsVO, goods); |
| | | goodsVO.setGoodsId(goods.getId()); |
| | | goodsVO.setGoodsName(goods.getName()); |
| | | Price price = getPrice(vipId, goods.getId(), null, 1, provinceCode, cityCode, districtCode); |
| | | Price price = getPrice(vipId, goods.getId(), shopId, 1, provinceCode, cityCode, districtCode); |
| | | if(null != price){ |
| | | goodsVO.setPointPayment(price.getPointPayment() ? 1 : 0); |
| | | goodsVO.setCashPayment(price.getCashPayment() ? 1 : 0); |
| | |
| | | } |
| | | Integer integer = orderClient.getGoodsSaleNum(goods.getId(), 1).getData(); |
| | | goodsVO.setSaleNum(integer); |
| | | GoodsEvaluate goodsEvaluate = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId) |
| | | GoodsEvaluate goodsEvaluate = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId).ne(GoodsEvaluate::getComment, "") |
| | | .orderByDesc(GoodsEvaluate::getGrade).eq(GoodsEvaluate::getStatus, 2).isNotNull(GoodsEvaluate::getComment) |
| | | .eq(GoodsEvaluate::getDelFlag, 0).last(" limit 0, 1").one(); |
| | | if (null != goodsEvaluate) { |
| | |
| | | |
| | | @Override |
| | | public IPage<Goods> getManageGoodsList(Page<Goods> page, Goods goods) { |
| | | return goodsMapper.selectManageGoodsList(page, goods); |
| | | IPage<Goods> goodsIPage = goodsMapper.selectManageGoodsList(page, goods); |
| | | goodsIPage.getRecords().forEach(goods1 -> { |
| | | Integer data = orderClient.getGoodsSaleNum(goods1.getId(), 1).getData(); |
| | | goods1.setSaleNum(data); |
| | | }); |
| | | return goodsIPage; |
| | | } |
| | | |
| | | @Override |
| | |
| | | area.setProvinceCode(goodsArea.getProvinceCode()); |
| | | area.setCityCode(goodsArea.getCityCode()); |
| | | area.setDistrictsCode(goodsArea.getDistrictsCode()); |
| | | if(null != area.getSellingPrice() && null != area.getIntegral()){ |
| | | if(null != area.getSellingPrice() || null != area.getIntegral()){ |
| | | goodsAreaList2.add(area); |
| | | } |
| | | } |