package com.fs.his.service;

import com.fs.common.core.domain.AjaxResult;
import com.fs.common.core.domain.R;
import com.fs.his.domain.FsIntegralOrder;
import com.fs.his.enums.PaymentMethodEnum;
import com.fs.his.param.*;
import com.fs.his.vo.*;

import java.text.ParseException;
import java.util.List;

/**
 * 积分商品订单Service接口
 *
 * @author fs
 * @date 2023-11-02
 */
public interface IFsIntegralOrderService
{
    /**
     * 查询积分商品订单
     *
     * @param orderId 积分商品订单主键
     * @return 积分商品订单
     */
    public FsIntegralOrder selectFsIntegralOrderByOrderId(Long orderId);

    /**
     * 查询积分商品订单列表
     *
     * @param fsIntegralOrder 积分商品订单
     * @return 积分商品订单集合
     */
    public List<FsIntegralOrder> selectFsIntegralOrderList(FsIntegralOrder fsIntegralOrder);

    /**
     * 新增积分商品订单
     *
     * @param fsIntegralOrder 积分商品订单
     * @return 结果
     */
    public int insertFsIntegralOrder(FsIntegralOrder fsIntegralOrder);

    /**
     * 修改积分商品订单
     *
     * @param fsIntegralOrder 积分商品订单
     * @return 结果
     */
    public int updateFsIntegralOrder(FsIntegralOrder fsIntegralOrder);

    /**
     * 批量删除积分商品订单
     *
     * @param orderIds 需要删除的积分商品订单主键集合
     * @return 结果
     */
    public int deleteFsIntegralOrderByOrderIds(Long[] orderIds);

    /**
     * 删除积分商品订单信息
     *
     * @param orderId 积分商品订单主键
     * @return 结果
     */
    public int deleteFsIntegralOrderByOrderId(Long orderId);

    List<FsIntegralOrderListVO> selectFsIntegralOrderListVO(FsIntegralOrderParam fsIntegralOrder);

    List<FsIntegralOrderListVO> selectFsIntegralOrderListByJn(FsIntegralOrderParam fsIntegralOrder);

    int sendGoods(FsIntegralOrder fsIntegralOrder);

    List<FsIntegralOrderListUVO> selectFsIntegralOrderListUVO(FsIntegralOrderListUParam param);

    R createOrder(FsIntegralOrderCreateParam param);

    /**
     * 创建购物车订单
     * @param param 参数
     * @return  R
     */
    R createCartOrder(FsIntegralCartOrderCreateParam param);

    String importProductDeliver(List<FsStoreProductDeliverExcelVO> list);

    FsIntegralOrderPVO selectFsIntegralOrderPVO(Long orderId);

    /**
     * 取消订单
     */
    R cannelOrder(Long orderId);

    /**
     * 预支付
     */
    R payment(FsIntegralOrderDoPayParam param, PaymentMethodEnum paymentMethod);

    /**
     * 支付回调
     */
    R payConfirm(String orderSn, String payCode, String tradeNo, String payType, int type,String bankTransactionId,String bankSerialNo);

    AjaxResult export(FsIntegralOrder fsIntegralOrder);

    int cancelOrder(String orderCode);

    int mandatoryRefunds(String orderCode);

    int finishOrder(String orderCode);

    List<FsIntegralOrder> selectFsIntegralOrderByOrderIds(List<Long> orderIds);

    void createErpOrder(Long orderId) throws ParseException;

    String importOrderStatusData(List<FsIntegralOrderExcelVO> list);
}
