package com.microservices.wiki.service.sys.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.microservices.wiki.domain.sys.UserExtension;
import com.microservices.wiki.mapper.sys.UserExtensionMapper;
import com.microservices.wiki.service.sys.UserExtentionService;
import org.springframework.stereotype.Service;

@Service
public class UserExtensionServiceImpl extends ServiceImpl<UserExtensionMapper, UserExtension> implements UserExtentionService {

    @Override
    public UserExtension getUserExtensionByUserId(int userId) {
        QueryWrapper<UserExtension> wrapper = new QueryWrapper<>();
        wrapper.eq("user_id", userId);
        return baseMapper.selectOne(wrapper);
    }
}
