package com.yzt.airconditionersystem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yzt.airconditionersystem.bean.User;
import com.yzt.airconditionersystem.service.UserService;
import com.yzt.airconditionersystem.mapper.UserMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author TzZach
* @description 针对表【user】的数据库操作Service实现
* @createDate 2022-05-07 15:44:23
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{

    @Override
    public User getOneByUsernameAndPassword(User user) {
        return baseMapper.selectOneByUsernameAndPassword(user.getUsername(), user.getPassword());
    }

    @Override
    public User getOneByUsername(String username) {
        return baseMapper.selectOneByUsername(username);
    }
}




