| | |
| | | import com.ruoyi.order.vo.OrderDetailVO; |
| | | import com.ruoyi.order.vo.OrderGoodsVO; |
| | | import com.ruoyi.order.vo.OrderVO; |
| | | import com.ruoyi.other.api.domain.CouponInfo; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.api.domain.OrderActivityInfo; |
| | | import com.ruoyi.other.api.domain.Technician; |
| | | import com.ruoyi.other.api.domain.*; |
| | | import com.ruoyi.other.api.feignClient.GoodsClient; |
| | | import com.ruoyi.other.api.feignClient.ShopClient; |
| | | import com.ruoyi.other.api.feignClient.TechnicianClient; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Resource |
| | | private TechnicianClient technicianClient; |
| | | @Resource |
| | | private GoodsClient goodsClient; |
| | | private ShopClient shopClient; |
| | | |
| | | |
| | | @Override |
| | |
| | | if (order == null){ |
| | | throw new ServiceException("订单不存在"); |
| | | } |
| | | R<Shop> shopR = shopClient.getShopById(order.getShopId()); |
| | | if (!R.isSuccess(shopR)){ |
| | | throw new ServiceException("获取门店信息失败"); |
| | | } |
| | | |
| | | // 商品 |
| | | List<OrderGood> orderGoods = orderGoodMapper.selectList(new LambdaQueryWrapper<OrderGood>() |
| | |
| | | for (OrderGood orderGood : orderGoods) { |
| | | String goodJson = orderGood.getGoodJson(); |
| | | Goods goods = JSONObject.parseObject(goodJson, Goods.class); |
| | | |
| | | OrderGoodsVO orderGoodsVO = new OrderGoodsVO(); |
| | | orderGoodsVO.setGoodsId(orderGood.getGoodsId()); |
| | | orderGoodsVO.setNum(orderGood.getNum()); |
| | | if (goods != null){ |
| | | orderGoodsVO.setGoodsName(goods.getName()); |
| | | orderGoodsVO.setType(goods.getType()); |
| | | orderGoodsVO.setGoodsPic(goods.getHomePagePicture()); |
| | | orderGoodsVO.setSellingPrice(goods.getSellingPrice()); |
| | | orderGoodsVO.setOriginalPrice(goods.getOriginalPrice()); |
| | | } |
| | | goodsList.add(orderGoodsVO); |
| | | } |
| | | |
| | |
| | | orderDetailVO.setDistributionMode(goods.getDistributionMode()); |
| | | } |
| | | |
| | | Shop shop = shopR.getData(); |
| | | |
| | | |
| | | orderDetailVO.setId(order.getId()); |
| | |
| | | orderDetailVO.setPointAmount(order.getGetPoint()); |
| | | orderDetailVO.setPaymentAmount(order.getPaymentAmount()); |
| | | orderDetailVO.setGoodsList(goodsList); |
| | | orderDetailVO.setShopName(shop.getName()); |
| | | orderDetailVO.setShopAddress(shop.getAddress()); |
| | | orderDetailVO.setLongitude(shop.getLongitude()); |
| | | orderDetailVO.setLatitude(shop.getLatitude()); |
| | | return orderDetailVO; |
| | | } |
| | | |