| | |
| | | package com.ruoyi.order.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | 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.feignClient.GoodsClient; |
| | | import com.ruoyi.other.api.feignClient.TechnicianClient; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private TechnicianClient technicianClient; |
| | | @Resource |
| | | private GoodsClient goodsClient; |
| | | |
| | | |
| | | @Override |
| | |
| | | if (order == null){ |
| | | throw new ServiceException("订单不存在"); |
| | | } |
| | | |
| | | // 商品 |
| | | List<OrderGood> orderGoods = orderGoodMapper.selectList(new LambdaQueryWrapper<OrderGood>() |
| | | .eq(OrderGood::getOrderId, orderId)); |
| | |
| | | orderGoodsVO.setOriginalPrice(goods.getOriginalPrice()); |
| | | goodsList.add(orderGoodsVO); |
| | | } |
| | | |
| | | |
| | | |
| | | // 收货地址 |
| | |
| | | } |
| | | |
| | | OrderDetailVO orderDetailVO = new OrderDetailVO(); |
| | | |
| | | if (CollectionUtil.isNotEmpty(orderGoods)){ |
| | | String goodJson = orderGoods.get(0).getGoodJson(); |
| | | Goods goods = JSONObject.parseObject(goodJson, Goods.class); |
| | | orderDetailVO.setDistributionMode(goods.getDistributionMode()); |
| | | } |
| | | |
| | | |
| | | |
| | | orderDetailVO.setId(order.getId()); |
| | | orderDetailVO.setOrderStatus(order.getOrderStatus()); |
| | | orderDetailVO.setPoint(order.getPoint()); |