package com.qmth.jkserver.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.jkserver.dao.TSAuthDao;
import com.qmth.jkserver.enums.AuthEnum;
import com.qmth.jkserver.model.TSAuth;
import com.qmth.jkserver.service.TSAuthService;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Objects;

/**
 * <p>
 * 激活授权配置表 服务实现类
 * </p>
 *
 * @author wangliang
 * @since 2022-04-26
 */
@Service
@Scope(proxyMode = ScopedProxyMode.INTERFACES)
public class TSAuthServiceImpl extends ServiceImpl<TSAuthDao, TSAuth> implements TSAuthService {

    @Resource
    TSAuthDao tsAuthDao;

    @Override
    public TSAuth lastAuthInfo(AuthEnum authEnum) {
        return tsAuthDao.lastAuthInfo(Objects.nonNull(authEnum) ? authEnum.name() : null);
    }
}
