package com.tax.token.service.api;

import com.tax.token.model.*;
import com.yxcheng.token.common.model.JsonResult;
import com.yxcheng.token.common.model.TaxUserInfo;
import com.yxcheng.token.common.model.TokenInfo;

import java.util.List;

public interface TkTokenService {

    List<TkToken> selectByExample(TkTokenExample example);

    int countToken(TkTokenExample example);

    JsonResult<String> getToken(String taxno, String zoneCode,String userCode, boolean isEncrypt, String functionNo);

    //从第三方获取token
    String getTokenByThird(String uuIdFlag, TkToken tkToken, TkZoneInfo tkZoneInfo, TkServer tkServer,boolean isFirst, String requestFrom) throws Exception;

    JsonResult<String> pushToken(PushTokenReq pushTokenReq);

    JsonResult<String> signData(SignDataReq signDataReq);

    JsonResult<String> insertToken(TkToken tkToken);

    void saveToken(String taxNo,String token);

    JsonResult<String> getSignFromTaxDisk(SignDataReq signDataReq);

    void synZoneInfo(TkZoneInfo tkZoneInfo);

    void updateTokenInfo(String uuId, TkToken tkToken);

    void updateTokenTimes(TkToken tkToken);

    JsonResult<TkTokenRemarkLog> queryTokenErrorInfo(TkToken tkToken);

    JsonResult<String> getRealCookie(String uuId, String taxno, String zoneCode, String userCode, boolean showData,
                                     String functionNo, Object taxUserInfo, String checkType, String site, String target);

    boolean updateTokenFrom(String uuId, CookieReq cookieReq, JsonResult<String> jsonResult);

    JsonResult<String> updateErrorInfo(PushTokenReq pushTokenReq);

    JsonResult<String> selectErrorTokenList(String userCode, Integer pageId);

    JsonResult<String> cleanCookie(String uuId, CookieReq cookieReq);

    JsonResult<String> cleanGroupCookie(String uuId, CookieReq cookieReq);

    JsonResult<String> queryTokenInfo(String optType, String userCode, String taxno);

    List<TokenInfo> selectTokenListByErrorCode(String userCode, String errorCode, String zoneCode);

    boolean checkTokenRealRequestCount(String userCode, String taxno);

    int getTokenRealRequestCount(String userCode, String taxno);

    void setTokenRealRequestCount(String userCode, String taxno);
}
