package com.itchenzn.service.impl;

import com.itchenzn.mapper.UsersMapper;
import com.itchenzn.pojo.Users;
import com.itchenzn.service.UserService;
import com.itchenzn.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

/**
 * Create by: 17467
 * Date: 2020/8/17 18:49
 */
public class UserServiceImpl implements UserService {
    /**
     * 添加用户
     * @param users
     * @return
     */
    @Override
    public int addUser(Users users) {
        int num=0;
        SqlSession sqlSession= MybatisUtils.getSqlSession();
        UsersMapper mapper = sqlSession.getMapper(UsersMapper.class);
        num = mapper.insertSelective(users);
            return num;
    }
}
