package cn.superdesk.uniorder.service.operationCenter.impl;

import cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoods;
import cn.superdesk.uniorder.dao.mapper.operationCenter.OperationCenterOrderGoodsMapper;
import cn.superdesk.uniorder.dto.vo.operationCenter.order.OperationCenterOrderGoodsVO;
import cn.superdesk.uniorder.service.operationCenter.OperationCenterOrderGoodsService;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author : zx
 * @Create : 2023/3/27 17:04
 * Description : 运营中心 -订单商品 操作mapper 对应service实现
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class OperationCenterOrderGoodsServiceImpl implements OperationCenterOrderGoodsService {
    private final OperationCenterOrderGoodsMapper operationCenterOrderGoodsMapper;

    @Override
    public int insertSelective(OperationCenterOrderGoods operationCenterOrderGoods) {
        return operationCenterOrderGoodsMapper.insertSelective(operationCenterOrderGoods);
    }

    @Override
    public int updateByPrimaryKeySelective(OperationCenterOrderGoods operationCenterOrderGoods) {
        return operationCenterOrderGoodsMapper.updateByPrimaryKeySelective(operationCenterOrderGoods);
    }

    @Override
    public void deleteObj(Long id) {
        operationCenterOrderGoodsMapper.deleteByPrimaryKey(id);
    }

    @Override
    public OperationCenterOrderGoods findById(Long id) {
        return operationCenterOrderGoodsMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<OperationCenterOrderGoods> findAll(Map<String, Object> queryMap) {
        return null;
    }

    @Override
    public PageInfo<OperationCenterOrderGoods> findByPaging(Map<String, Object> params, Integer pageNo, Integer pageSize) {
        return null;
    }

    @Override
    public List<OperationCenterOrderGoodsVO> getOrderGoodsListByOrderSn(String platformCode,String orderSn) {
        return  operationCenterOrderGoodsMapper.getOrderGoodsListByOrderSn(platformCode,orderSn);
    }
}
