package com.qs.mp.channel.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qs.mp.channel.domain.ChannelGoodsOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qs.mp.channel.domain.vo.ChannelGoodsOrderSettleVO;
import com.qs.mp.channel.domain.vo.ChannelGoodsOrderVO;
import com.qs.mp.channel.domain.vo.ChannelGoodsSettleVO;
import com.qs.mp.pay.domain.PayOrder;

import java.util.List;

/**
 * @auther quanshu
 * @create 2023-06-05 11:13:54
 * @describe 经销商商品采购订单服务类
 */
public interface IChannelGoodsOrderService extends IService<ChannelGoodsOrder> {

    /**
     * 提交订单
     * @param channelId
     * @param memo
     * @param orderSettleVO
     * @return
     */
    String submitOrder(Long channelId, String memo, ChannelGoodsOrderSettleVO orderSettleVO);

    /**
     * 取消订单
     *
     * @param channelId
     * @param orderId
     * @return
     */
    boolean cancelOrder(Long channelId, String orderId);

    /**
     * 支付成功回调
     * @param payOrder
     */
    void paySuccess(PayOrder payOrder);

    /**
     * 订单确认收货
     * @param channelGoodsOrder
     */
    void confirmOrder(ChannelGoodsOrder channelGoodsOrder);

    /**
     * 门店采购商品订单列表
     * @param queryWrapper
     * @return
     */
    List<ChannelGoodsOrderVO> selectChannelGoodsOrderVOList(QueryWrapper<ChannelGoodsOrder> queryWrapper);

    /**
     * 发货
     * @param goodsOrder
     * @return
     */

    boolean ship(ChannelGoodsOrder goodsOrder);

    /**
     * 查询满足条件门店采购商品订单数量
     * @param queryWrapper
     * @return
     */
    int selectChannelGoodsOrderCount(QueryWrapper<ChannelGoodsOrder> queryWrapper);

    List<ChannelGoodsSettleVO> selectChannelGoodsSettleList(QueryWrapper<ChannelGoodsOrder> queryWrapper);

    ChannelGoodsOrderVO listChannelGoodsOrder(QueryWrapper<ChannelGoodsOrder> queryWrapper);
}
