package com.ruoyi.xq.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.xq.domain.UserAuth;
import com.ruoyi.xq.dto.admin.user.UserAuthAdminVo;
import com.ruoyi.xq.mapper.UserAuthMapper;
import com.ruoyi.xq.service.UserAuthService;
import org.springframework.stereotype.Service;

/**
 * 用户认证管理Service业务层处理
 *
 * @author 77
 * @date 2024-03-04
 */
@Service
public class UserAuthServiceImpl extends ServiceImpl<UserAuthMapper,UserAuth> implements UserAuthService {

    @Override
    public UserAuth getByUserId(Long userId) {
        return this.getOne(Wrappers.lambdaQuery(UserAuth.class)
                .eq(UserAuth::getUserId, userId));
    }

    @Override
    public Page<UserAuthAdminVo> pageAdmin(PageQuery pageQuery, UserAuthAdminVo bo) {
        return baseMapper.pageAdmin(pageQuery.build(), bo);
    }
}
