示例#1
0
 @Override
 public List<UserInfo> getUserInfoByIsAdmin(int userId, int isAdmin) {
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("userId", userId);
   params.put("isAdmin", isAdmin);
   return userInfoMapper.getUserInfoByIsAdmin(params);
 }
示例#2
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();
 }
示例#3
0
 @Override
 public int deleteUserById(int id) {
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("id", id);
   return userInfoMapper.deleteUserById(params);
 }
示例#4
0
 @Override
 public int changePassword(UserInfo userInfo) {
   userInfo.setUserPassword(MD5Util.MD5(userInfo.getUserPassword()));
   return userInfoMapper.changePassword(userInfo);
 }
示例#5
0
 @Override
 public UserInfo getUserInfo(String userName) {
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("userName", userName);
   return userInfoMapper.getUserInfoByUserName(params);
 }
示例#6
0
 @Override
 public UserInfo getUserInfo(int id) {
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("id", id);
   return userInfoMapper.getUserInfoById(params);
 }
示例#7
0
 @Override
 public List<UserInfo> getUserInfoList() {
   return userInfoMapper.getUserInfoList();
 }
示例#8
0
 @Override
 public int addUserInfo(UserInfo userInfo) {
   userInfo.setUserPassword(MD5Util.MD5(userInfo.getUserPassword()));
   return userInfoMapper.addUserInfo(userInfo);
 }