|
@@ -159,11 +159,13 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
|
if (appUser == null) {
|
|
|
throw new BadCredentialsException("用户不存在");
|
|
|
}
|
|
|
- if (ObjectUtils.isNull(appUser.getOrderEndTime())){
|
|
|
- return ResultResponse.success(false);
|
|
|
- }
|
|
|
- if (LocalDate.parse(appUser.getOrderEndTime()).isBefore(LocalDate.now())){
|
|
|
- return ResultResponse.success(false);
|
|
|
+ if (dto.getComboCheck()) {
|
|
|
+ if (ObjectUtils.isNull(appUser.getOrderEndTime())){
|
|
|
+ return ResultResponse.success(false);
|
|
|
+ }
|
|
|
+ if (LocalDate.parse(appUser.getOrderEndTime()).isBefore(LocalDate.now())){
|
|
|
+ return ResultResponse.success(false);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
String errorNumKey = "app:error:num:"+dto.getLoginName();
|
|
@@ -663,7 +665,7 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
|
return ResultResponse.success(token);
|
|
|
}
|
|
|
|
|
|
- public ResultResponse loginMsg(String checkCode, String mobile) {
|
|
|
+ public ResultResponse loginMsg(String checkCode, String mobile,Boolean comboCheck) {
|
|
|
String redisKey = "hcp:mobile:" + mobile;
|
|
|
String checkCodeRedis = redisClient.get(redisKey, "");
|
|
|
if (StringUtils.isEmpty(checkCodeRedis)) {
|
|
@@ -687,11 +689,13 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
|
}
|
|
|
String encrypt = Sm4Util.encrypt(mobile);
|
|
|
AppUser appUser = this.selectByMobile(encrypt,"0");
|
|
|
- if (ObjectUtils.isNull(appUser.getOrderEndTime())){
|
|
|
- return ResultResponse.fail("请充值后在进行登录");
|
|
|
- }
|
|
|
- if (LocalDate.parse(appUser.getOrderEndTime()).isBefore(LocalDate.now())){
|
|
|
- return ResultResponse.fail("你的套餐已到期,请充值后登录!");
|
|
|
+ if (comboCheck) {
|
|
|
+ if (ObjectUtils.isNull(appUser.getOrderEndTime())){
|
|
|
+ return ResultResponse.success(false);
|
|
|
+ }
|
|
|
+ if (LocalDate.parse(appUser.getOrderEndTime()).isBefore(LocalDate.now())){
|
|
|
+ return ResultResponse.success(false);
|
|
|
+ }
|
|
|
}
|
|
|
AppCurrentLoginUser userDetails = (AppCurrentLoginUser) createAppLoginUser(appUser);
|
|
|
|
|
@@ -729,14 +733,14 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
|
if (appUser == null) {
|
|
|
return ResultResponse.fail("患者不存在");
|
|
|
}
|
|
|
- if ("app".equals(appType)){
|
|
|
- if (ObjectUtils.isNull(appUser.getOrderEndTime())){
|
|
|
- return ResultResponse.success(false);
|
|
|
- }
|
|
|
- if (LocalDate.parse(appUser.getOrderEndTime()).isBefore(LocalDate.now())){
|
|
|
- return ResultResponse.success(false);
|
|
|
- }
|
|
|
- }
|
|
|
+// if ("app".equals(appType)){
|
|
|
+// if (ObjectUtils.isNull(appUser.getOrderEndTime())){
|
|
|
+// return ResultResponse.success(false);
|
|
|
+// }
|
|
|
+// if (LocalDate.parse(appUser.getOrderEndTime()).isBefore(LocalDate.now())){
|
|
|
+// return ResultResponse.success(false);
|
|
|
+// }
|
|
|
+// }
|
|
|
Random rand = new Random();
|
|
|
int randomNumber = rand.nextInt(1000000);
|
|
|
String random = "";
|