package com.shkj.wms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shkj.common.core.domain.Result;
import com.shkj.wms.domain.SysThirdExceptionRequest;

import java.util.List;

/**
 * 第三方请求异常Service接口
 *
 * @author lch
 * @date 2023-02-02
 */
public interface ISysThirdExceptionRequestService extends IService<SysThirdExceptionRequest> {


    /**
     * 执行异常
     *
     * @param taskCode 请求
     * @return {@link Result}
     * @throws Exception 异常
     */
    Result executeException(String taskCode) throws Exception;


    /**
     * 添加
     * @param code
     * @param type
     * @param requestBody
     * @param responseBody
     * @param isSuccess
     */
    void addException(String code, String type, String requestBody, String responseBody, Boolean isSuccess);

    /**
     * 没有被任务id列表和秩序
     *
     * @param taskId  任务id
     * @param orderNo 订单没有
     * @return {@link List}<{@link SysThirdExceptionRequest}>
     */
    List<SysThirdExceptionRequest> getListByTaskIdAndOrderNo(Long taskId, String orderNo);


}
