package com.xxl.job.executor.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxl.job.executor.common.entity.CtopOauthToken;

import java.util.List;
import java.util.Map;

/**
 * @Description: oauth授权码
 * @Author: jeecg-boot
 * @Date: 2019-07-09
 * @Version: V1.0
 */
public interface ICtopOauthTokenService extends IService<CtopOauthToken> {

    CtopOauthToken getOauthTokenByAccountId(String accountId);

    CtopOauthToken getTokenByAccountId(Long accountId);

    Map<String, Object> getByteDanceAccessToken(CtopOauthToken token);

    void getKuaiShouRefreshToken(Long accountId, String token, String refreshToken, Integer agentType);

    List<CtopOauthToken> getTokenListByType(String platformTypeBytedance);

    List<CtopOauthToken> selectKuaiShouToken();

    List<CtopOauthToken> selectKuaiShouTokenBefore();

    List<CtopOauthToken> selectToutiaoToken();

    CtopOauthToken getAccessTokenByAccountIdAndMediaId(Integer mediaId, Long accountId);

    List<CtopOauthToken> getToutiaoTokenByCreateTime(String createTime);

    List<CtopOauthToken> getByProjectId(Long projectId);

    CtopOauthToken selectOneByMediaId(String platformTypeKuaishou);

    void getKuaiShouAgentRefreshToken(Long agentId, String accessToken, String refreshToken);
}
