@Override
 public int checkLoginInfo(String userName, String userPassword) {
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("userName", userName);
   params.put("userPassword", MD5Util.MD5(userPassword));
   List<UserInfo> list = userInfoMapper.checkLoginInfo(params);
   if (list.size() == 0) {
     return 0;
   }
   return list.get(0).getId();
 }
 @Override
 public int changePassword(UserInfo userInfo) {
   userInfo.setUserPassword(MD5Util.MD5(userInfo.getUserPassword()));
   return userInfoMapper.changePassword(userInfo);
 }
 @Override
 public int addUserInfo(UserInfo userInfo) {
   userInfo.setUserPassword(MD5Util.MD5(userInfo.getUserPassword()));
   return userInfoMapper.addUserInfo(userInfo);
 }