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

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

@Service("sysLoginAlgService")
@DataSource("alg")
public class SysLoginAlgServiceImpl extends ServiceImpl<SysLoginAlgDao, SysUserTokenEntity> implements SysLoginAlgService {


    @Override
    public void updataTokenToAlg(SysUserTokenEntity sysUserTokenEntity) {
        //sysLoginAlgDao.updataTokenToAlg(sysUserTokenEntity);
        baseMapper.updateById(sysUserTokenEntity);


    }

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

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

}
