package cn.com.liandisys.ycjt.ggcx.admin.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.liandisys.ycjt.ggcx.admin.dao.UserDao;
import cn.com.liandisys.ycjt.ggcx.admin.model.User;

/**
 * 用户查询
 * 
 * @author jiangchao
 * @version 2016-11-28
 * 
 */
@Service
public class UserService {
	
	@Autowired
	private UserDao userDao;

    /**
     * 根据登陆账号查询用户
     * 
     * @param loginName
     * @return
     */
    public User findByLoginName(String loginName){
    	return userDao.findByLoginName(loginName);
    }
    
    public User saveUser(User user){
    	return userDao.save(user);
    }
}
