package com.suvalue.example.suvaluebootdemoapi.service.Impl;

import com.suvalue.example.suvaluebootdemoapi.Model.User;
import com.suvalue.example.suvaluebootdemoapi.mapper.UserMapper;
import com.suvalue.example.suvaluebootdemoapi.service.UserService;
import org.springframework.stereotype.Service;

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

//@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public User find(Integer id) {
        return userMapper.selectById(id);
    }

    @Override
    public List<User> findAll() {
        return userMapper.select();
    }
}
