不知道错在哪里?
package service;import User.User;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import com.ibatis.dao.client.DaoException;
import java.sql.SQLException;
import javax.xml.rpc.ServiceException;
/**
*
* @author Administrator
*/
public class UserService {
private static User user = new User();
public static User login(String UserCode, String UserPwd) throws DaoException, SQLException, ServiceException{
return checkSystemUser(UserCode,UserPwd);
}
private static User checkSystemUser(String UserCode,String UserPwd) throws DaoException, SQLException, ServiceException
{
User loginUser = UserService.getUserByCode(UserCode);
if(loginUser==null)
throw new ServiceException("用户不存在");
String pwd=loginUser.getUserPwd();
if((pwd)!=0)
throw new ServiceException("密码不正确");
return loginUser;
}
private static User getUserByID(int id) throws DaoException, SQLException, ServiceException
{
User loginUser=user.findById(id);
if(loginUser==null)
throw new ServiceException("用户没有找到");
return loginUser;
}
private static User getUserByCode(String UserCode) throws DaoException, SQLException, ServiceException
{
User loginUser=user.findById(UserCode);
if(loginUser==null)
throw new ServiceException("用户不存在");
return loginUser;
}
}
这是我项目里面的一个文件,搞不懂为什么红色部分总提示出错?