Commit 48001c2b70b284b43af3ff46fad6c9d9ecb9ad93
Merge branch 'master-jdk17' of https://github.com/YunaiV/ruoyi-vue-pro into master-jdk17
Showing
2 changed files
with
9 additions
and
2 deletions
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 | 30 | .likeIfPresent(ProductSpuDO::getName, reqVO.getName()) |
| 31 | 31 | .eqIfPresent(ProductSpuDO::getCategoryId, reqVO.getCategoryId()) |
| 32 | 32 | .betweenIfPresent(ProductSpuDO::getCreateTime, reqVO.getCreateTime()) |
| 33 | - .orderByDesc(ProductSpuDO::getSort); | |
| 33 | + .orderByDesc(ProductSpuDO::getSort) | |
| 34 | + .orderByDesc(ProductSpuDO::getId); | |
| 34 | 35 | appendTabQuery(tabType, queryWrapper); |
| 35 | 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 | 88 | MemberUserDO user = userService.createUserIfAbsent(reqVO.getMobile(), userIp, getTerminal()); |
| 89 | 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 | 97 | // 如果 socialType 非空,说明需要绑定社交用户 |
| 92 | 98 | String openid = null; |
| 93 | 99 | if (reqVO.getSocialType() != null) { |
| ... | ... | @@ -177,7 +183,7 @@ public class MemberAuthServiceImpl implements MemberAuthService { |
| 177 | 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 | 187 | createLoginLog(user.getId(), mobile, logTypeEnum, LoginResultEnum.USER_DISABLED); |
| 182 | 188 | throw exception(AUTH_LOGIN_USER_DISABLED); |
| 183 | 189 | } | ... | ... |