package com.dxhy.erp.service;

import com.alibaba.fastjson.JSONObject;
import com.dxhy.common.service.MpBaseService;
import com.dxhy.erp.entity.RequestRecord;
import org.springframework.http.ResponseEntity;

import java.io.UnsupportedEncodingException;
import java.util.Date;

public interface RequestRecordService extends MpBaseService<RequestRecord> {

    int saveSuccessfulRequestRecord(RequestRecord record, String responseDetail);

    int saveFailedRequestRecord(RequestRecord record, Integer isRecall, String responseDetail, String failedReason) throws UnsupportedEncodingException;

    JSONObject getRecordList(String portName, Date startTime, Date endTime, Integer status, String methodName, Integer pageNumber, Integer PageSize, Integer orderBy);

    JSONObject getDetailRecord(Long id);

    RequestRecord getBaseRequestRecord(String requestDetail, String portName, String invoiceCode, String invoiceNo, String methodName);

    RequestRecord getBaseRequestRecord(String requestDetail, String portName, String methodName);

    RequestRecord getBaseRequestRecord(String requestDetail, String portName, String invoiceNo, String methodName);

    ResponseEntity<?> reCall(RequestRecord requestRecord);

}
