package cn.com.ctop.common.module.service;

import cn.com.ctop.common.module.entity.CtopOauthToken;
import com.baomidou.mybatisplus.extension.service.IService;

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(String accountId);

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

    List<CtopOauthToken> getTokenListByType(String platformTypeBytedance);

    List<CtopOauthToken> selectKuaiShouToken();

    List<CtopOauthToken> selectToutiaoToken();

    CtopOauthToken getAccessTokenByAccountIdAndMediaId(Integer mediaId, Long accountId);

    List<CtopOauthToken> getToutiaoTokenByCreateTime(String createTime);
}
