package com.weiqi.mis.impl;

import com.weiqi.mis.domain.AdminUserInfo;
import com.weiqi.mis.domain.AdminUserInfoExample;
import com.weiqi.mis.mapper.AdminUserInfoMapper;
import com.weiqi.mis.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

@Service
public class UserServiceImpl implements UserService {

    private Logger logger = LoggerFactory.getLogger(getClass());


    @Autowired
    private AdminUserInfoMapper adminUserInfoMapper;


    /**
     * 查询userinfo
     *
     * @return
     */
    public List<AdminUserInfo> getUserInfo(String userName, String password) {
        AdminUserInfoExample example = new AdminUserInfoExample();
        AdminUserInfoExample.Criteria cri = example.createCriteria();
        cri.andIsDelEqualTo(0);
        cri.andUserNameEqualTo(userName);
        List<AdminUserInfo> adminUserInfos = adminUserInfoMapper.selectByExample(example);

        return adminUserInfos;

    }


}
