|
@@ -83,6 +83,10 @@ public class UserServiceImpl implements UserService {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw new CustomException(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
|
|
throw new CustomException(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
|
|
}
|
|
}
|
|
|
|
+ Integer userName = userDao.queryUserName(user.getUserName());
|
|
|
|
+ if (userName <= 0) {
|
|
|
|
+ return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "帐号不存在");
|
|
|
|
+ }
|
|
User isExistUser = userDao.getUserByNamePass(user.getUserName(), EncryptUtils.StrToMD5(user.getPassword()));
|
|
User isExistUser = userDao.getUserByNamePass(user.getUserName(), EncryptUtils.StrToMD5(user.getPassword()));
|
|
// // 校验验证码
|
|
// // 校验验证码
|
|
// String storeCode = Convert.toStr(redisUtil.get(user.getUid() + "-captcha"));
|
|
// String storeCode = Convert.toStr(redisUtil.get(user.getUid() + "-captcha"));
|
|
@@ -607,6 +611,10 @@ public class UserServiceImpl implements UserService {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw new CustomException(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
|
|
throw new CustomException(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
|
|
}
|
|
}
|
|
|
|
+ Integer userName = userDao.queryUserName(user.getUserName());
|
|
|
|
+ if (userName <= 0) {
|
|
|
|
+ return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "帐号不存在");
|
|
|
|
+ }
|
|
User isExistUser = userDao.getUserByNamePass(user.getUserName(), EncryptUtils.StrToMD5(user.getPassword()));
|
|
User isExistUser = userDao.getUserByNamePass(user.getUserName(), EncryptUtils.StrToMD5(user.getPassword()));
|
|
if (Blank.isEmpty(isExistUser)) {
|
|
if (Blank.isEmpty(isExistUser)) {
|
|
return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "帐号或密码错误");
|
|
return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "帐号或密码错误");
|