示例#1
0
 @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();
 }
示例#2
0
 @Override
 public int changePassword(UserInfo userInfo) {
   userInfo.setUserPassword(MD5Util.MD5(userInfo.getUserPassword()));
   return userInfoMapper.changePassword(userInfo);
 }
示例#3
0
 @Override
 public int addUserInfo(UserInfo userInfo) {
   userInfo.setUserPassword(MD5Util.MD5(userInfo.getUserPassword()));
   return userInfoMapper.addUserInfo(userInfo);
 }