package com.shxt.service;
import java.util.List;
import com.shxt.dao.UserDao;
import com.shxt.model.User;
public class UserService {
UserDao ud = new UserDao();
public User login(String username, String password) throws Exception {
User user = ud.login(username, password);
if (user != null) {
return user;
} else {
// TODO: handle exception
throw new Exception("账号或者用户名错误");
}
}
public List<User> listall() throws Exception{