package io.renren.modules.sys.service.impl.cloud;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.datasource.annotation.DataSource;
import io.renren.modules.sys.dao.cloud.SysLoginCloudDao;
import io.renren.modules.sys.entity.SysUserTokenEntity;
import io.renren.modules.sys.service.cloud.SysLoginCloudService;
import org.springframework.stereotype.Service;

@Service("sysLoginCloudService")
@DataSource("cloud")
public class SysLoginCloudServiceImpl extends ServiceImpl<SysLoginCloudDao, SysUserTokenEntity> implements SysLoginCloudService {
    @Override
    public void updataTokenToCloud(SysUserTokenEntity sysUserTokenEntity) {
        baseMapper.updateById(sysUserTokenEntity);
    }

    @Override
    public void insertTokenToAlg(SysUserTokenEntity sysUserTokenEntity) {
        baseMapper.insert(sysUserTokenEntity);
    }

    @Override
    public void logOutPlatForm(SysUserTokenEntity sysUserTokenEntity) {
        baseMapper.updateById(sysUserTokenEntity);
    }
}
