package com.yc.education.service.impl;

import com.yc.education.mapper.UserMapper;
import com.yc.education.model.Record;
import com.yc.education.model.User;
import com.yc.education.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Author QuZhangJing
 * @Date 2019/4/1 15:08
 * @Version 1.0
 */
@Service
public class UserServiceImpl extends BaseService<User> implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public User finduser(String uphone, String uemil) {
        return userMapper.findadminlogin(uphone, uemil);
    }

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

    @Override
    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    @Override
    public User selectUserById(Integer uid) {
        return userMapper.selectUserById(uid);
    }

    @Override
    public void delUserById(Integer id) {
        userMapper.delUserById(id);
    }

    @Override
    public List<User> selectUserByUremark(String uremark) {
        return userMapper.selectUserByUremark(uremark);
    }

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

    @Override
    public void addUser(User user) {
        userMapper.addUser(user);
    }

}
