| | |
| | | goodsVO.setGoodsId(goods.getId()); |
| | | goodsVO.setGoodsName(goods.getName()); |
| | | R<Price> r = remoteOrderGoodsClient.getGoodsPrice(loginUserApplet.getUserid(), goods.getId(), null); |
| | | if (R.isSuccess(r)){ |
| | | if (null != r.getData()){ |
| | | Price price = r.getData(); |
| | | goodsVO.setSellingPrice(price.getCash()); |
| | | goodsVO.setIntegral(price.getPoint()); |
| | |
| | | |
| | | LoginUser loginUserApplet = tokenService.getLoginUserApplet(); |
| | | AppUser appUser = appUserClient.getAppUserById(loginUserApplet.getUserid()); |
| | | BigDecimal sellingPrice; |
| | | Integer integral; |
| | | BigDecimal sellingPrice = BigDecimal.ZERO; |
| | | Integer integral = 0; |
| | | |
| | | GoodsArea goodsArea = goodsAreaMapper.selectOne(new LambdaQueryWrapper<GoodsArea>() |
| | | .eq(GoodsArea::getGoodsId, goodsId) |
| | |
| | | GoodsVip goodsVip = goodsVipService.getOne(new LambdaQueryWrapper<GoodsVip>() |
| | | .eq(GoodsVip::getVip, vipSetting.getId()) |
| | | .eq(GoodsVip::getGoodsId, goodsId)); |
| | | |
| | | sellingPrice = goodsVip.getSellingPrice(); |
| | | integral = goodsVip.getIntegral(); |
| | | if(null != goodsVip){ |
| | | sellingPrice = goodsVip.getSellingPrice(); |
| | | integral = goodsVip.getIntegral(); |
| | | } |
| | | } |
| | | |
| | | Goods goods = this.getById(goodsId); |
| | |
| | | goodsVO.setSellingPrice(sellingPrice); |
| | | goodsVO.setIntegral(integral); |
| | | |
| | | List<GoodsShop> goodsShopList = goodsShopMapper.selectList(new LambdaQueryWrapper<GoodsShop>() |
| | | .eq(GoodsShop::getGoodsId, goodsId)); |
| | | if (!CollectionUtils.isEmpty(goodsShopList)){ |
| | | List<Integer> shopIds = goodsShopList.stream().map(GoodsShop::getShopId).collect(Collectors.toList()); |
| | | if(goods.getAppointStore() == 2){ |
| | | List<Shop> shopList = shopMapper.selectList(new LambdaQueryWrapper<Shop>() |
| | | .in(Shop::getId, shopIds)); |
| | | |
| | | .in(Shop::getDelFlag, 0)); |
| | | goodsVO.setShopList(shopList); |
| | | }else{ |
| | | List<GoodsShop> goodsShopList = goodsShopMapper.selectList(new LambdaQueryWrapper<GoodsShop>() |
| | | .eq(GoodsShop::getGoodsId, goodsId)); |
| | | if (!CollectionUtils.isEmpty(goodsShopList)){ |
| | | List<Integer> shopIds = goodsShopList.stream().map(GoodsShop::getShopId).collect(Collectors.toList()); |
| | | List<Shop> shopList = shopMapper.selectList(new LambdaQueryWrapper<Shop>() |
| | | .in(Shop::getId, shopIds)); |
| | | goodsVO.setShopList(shopList); |
| | | } |
| | | } |
| | | return goodsVO; |
| | | } |
| | |
| | | for (GoodsArea goodsArea : goodsAreaList) { |
| | | List<GoodsArea> goodsAreaList1 = goodsArea.getGoodsAreaList(); |
| | | for (GoodsArea area : goodsAreaList1) { |
| | | area.setId(null); |
| | | area.setGoodsId(id); |
| | | area.setProvince(goodsArea.getProvince()); |
| | | area.setCity(goodsArea.getCity()); |