Commit 48001c2b70b284b43af3ff46fad6c9d9ecb9ad93

Authored by YunaiV
2 parents 01b0866a 17ff7595

Merge branch 'master-jdk17' of https://github.com/YunaiV/ruoyi-vue-pro into master-jdk17

yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/spu/ProductSpuMapper.java
@@ -30,7 +30,8 @@ public interface ProductSpuMapper extends BaseMapperX<ProductSpuDO> { @@ -30,7 +30,8 @@ public interface ProductSpuMapper extends BaseMapperX<ProductSpuDO> {
30 .likeIfPresent(ProductSpuDO::getName, reqVO.getName()) 30 .likeIfPresent(ProductSpuDO::getName, reqVO.getName())
31 .eqIfPresent(ProductSpuDO::getCategoryId, reqVO.getCategoryId()) 31 .eqIfPresent(ProductSpuDO::getCategoryId, reqVO.getCategoryId())
32 .betweenIfPresent(ProductSpuDO::getCreateTime, reqVO.getCreateTime()) 32 .betweenIfPresent(ProductSpuDO::getCreateTime, reqVO.getCreateTime())
33 - .orderByDesc(ProductSpuDO::getSort); 33 + .orderByDesc(ProductSpuDO::getSort)
  34 + .orderByDesc(ProductSpuDO::getId);
34 appendTabQuery(tabType, queryWrapper); 35 appendTabQuery(tabType, queryWrapper);
35 return selectPage(reqVO, queryWrapper); 36 return selectPage(reqVO, queryWrapper);
36 } 37 }
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java
@@ -88,6 +88,12 @@ public class MemberAuthServiceImpl implements MemberAuthService { @@ -88,6 +88,12 @@ public class MemberAuthServiceImpl implements MemberAuthService {
88 MemberUserDO user = userService.createUserIfAbsent(reqVO.getMobile(), userIp, getTerminal()); 88 MemberUserDO user = userService.createUserIfAbsent(reqVO.getMobile(), userIp, getTerminal());
89 Assert.notNull(user, "获取用户失败,结果为空"); 89 Assert.notNull(user, "获取用户失败,结果为空");
90 90
  91 + // 校验是否禁用
  92 + if (CommonStatusEnum.isDisable(user.getStatus())) {
  93 + createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED);
  94 + throw exception(AUTH_LOGIN_USER_DISABLED);
  95 + }
  96 +
91 // 如果 socialType 非空,说明需要绑定社交用户 97 // 如果 socialType 非空,说明需要绑定社交用户
92 String openid = null; 98 String openid = null;
93 if (reqVO.getSocialType() != null) { 99 if (reqVO.getSocialType() != null) {
@@ -177,7 +183,7 @@ public class MemberAuthServiceImpl implements MemberAuthService { @@ -177,7 +183,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
177 throw exception(AUTH_LOGIN_BAD_CREDENTIALS); 183 throw exception(AUTH_LOGIN_BAD_CREDENTIALS);
178 } 184 }
179 // 校验是否禁用 185 // 校验是否禁用
180 - if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) { 186 + if (CommonStatusEnum.isDisable(user.getStatus())) {
181 createLoginLog(user.getId(), mobile, logTypeEnum, LoginResultEnum.USER_DISABLED); 187 createLoginLog(user.getId(), mobile, logTypeEnum, LoginResultEnum.USER_DISABLED);
182 throw exception(AUTH_LOGIN_USER_DISABLED); 188 throw exception(AUTH_LOGIN_USER_DISABLED);
183 } 189 }