Helius
2021-06-25 1da9a96fd9f1031d81d5d829a2df18fd4ac5abd1
gc-shop/src/main/java/com/xzx/gc/shop/service/OrderService.java
@@ -7,20 +7,17 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xzx.gc.entity.ScoreExpressInfo;
import com.xzx.gc.entity.ScoreGoodsStyle;
import com.xzx.gc.entity.ScoreOrder;
import com.xzx.gc.entity.ScoreOrderDetails;
import com.xzx.gc.entity.*;
import com.xzx.gc.shop.dto.AddGoodsOrderDto;
import com.xzx.gc.shop.dto.DeliverGoodsDto;
import com.xzx.gc.shop.dto.InsureOrderDto;
import com.xzx.gc.shop.dto.QueryOrderListDto;
import com.xzx.gc.shop.mapper.ScoreExpressInfoMapper;
import com.xzx.gc.shop.mapper.ScoreOrderDetailsMapper;
import com.xzx.gc.shop.mapper.ScoreOrderMapper;
import com.xzx.gc.shop.mapper.*;
import com.xzx.gc.shop.vo.ExpressInfoVo;
import com.xzx.gc.shop.vo.QueryOrderListVo;
import com.xzx.gc.shop.vo.ViewOrderVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
@@ -44,6 +41,21 @@
    @Resource
    ScoreOrderDetailsMapper scoreOrderDetailsMapper;
    @Resource
    private AddressInfoMapper addressInfoMapper;
    @Autowired
    private AccountInfoMapper accountInfoMapper;
    @Autowired
    private ScoreGoodsStyleMapper scoreGoodsStyleMapper;
    @Autowired
    private ScoreGoodsSkuMapper scoreGoodsSkuMapper;
    @Autowired
    private ScoreGoodsMapper scoreGoodsMapper;
    public Map<String, Object> queryOrderList(QueryOrderListDto model) {
        String name = model.getName();
@@ -131,4 +143,14 @@
        scoreOrderMapper.updateByPrimaryKeySelective(scoreOrder);
        return scoreOrder.getId();
    }
    public void addOrder(AddGoodsOrderDto addGoodsOrderDto) {
        ScoreGoodsStyle style = scoreGoodsStyleMapper.selectByPrimaryKey(addGoodsOrderDto.getStyleId());
        ScoreGoodsSku sku = scoreGoodsSkuMapper.selectByPrimaryKey(addGoodsOrderDto.getSkuId());
        ScoreGoods goods = scoreGoodsMapper.selectByPrimaryKey(style.getGoodsId());
        AddressInfo addressInfo = addressInfoMapper.selectByPrimaryKey(addGoodsOrderDto.getAddressId());
        AccountInfo accountInfo = accountInfoMapper.selectAccountInfoByUserId(addGoodsOrderDto.getUserId());
    }
}