diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/spu/ProductSpuMapper.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/spu/ProductSpuMapper.java index 68f2d210f..cf8ae6483 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/spu/ProductSpuMapper.java +++ b/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 { .likeIfPresent(ProductSpuDO::getName, reqVO.getName()) .eqIfPresent(ProductSpuDO::getCategoryId, reqVO.getCategoryId()) .betweenIfPresent(ProductSpuDO::getCreateTime, reqVO.getCreateTime()) - .orderByDesc(ProductSpuDO::getSort); + .orderByDesc(ProductSpuDO::getSort) + .orderByDesc(ProductSpuDO::getId); appendTabQuery(tabType, queryWrapper); return selectPage(reqVO, queryWrapper); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java index 7fb1926ce..69d9252b8 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java +++ b/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 { MemberUserDO user = userService.createUserIfAbsent(reqVO.getMobile(), userIp, getTerminal()); Assert.notNull(user, "获取用户失败,结果为空"); + // 校验是否禁用 + if (CommonStatusEnum.isDisable(user.getStatus())) { + createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED); + throw exception(AUTH_LOGIN_USER_DISABLED); + } + // 如果 socialType 非空,说明需要绑定社交用户 String openid = null; if (reqVO.getSocialType() != null) { @@ -177,7 +183,7 @@ public class MemberAuthServiceImpl implements MemberAuthService { throw exception(AUTH_LOGIN_BAD_CREDENTIALS); } // 校验是否禁用 - if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) { + if (CommonStatusEnum.isDisable(user.getStatus())) { createLoginLog(user.getId(), mobile, logTypeEnum, LoginResultEnum.USER_DISABLED); throw exception(AUTH_LOGIN_USER_DISABLED); }