下单校验微信绑定状态

This commit is contained in:
张松 2025-03-27 13:44:07 +08:00
parent 853b918d54
commit 8f4f69781f
2 changed files with 2 additions and 2 deletions

View File

@ -1842,7 +1842,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
return Result.error("该微信已被其他用户绑定");
}
UserEntity userEntity = getOne(new LambdaQueryWrapper<UserEntity>().eq(UserEntity::getUserId, userId));
UserEntity userEntity = queryByUserId(userId);
if (StringUtils.isNotBlank(userEntity.getWxOpenId())) {
return Result.error("当前用户已绑定微信");
}

View File

@ -44,7 +44,7 @@ public class AppOrdersController extends AbstractController {
if (commonInfo == null || !"1".equals(commonInfo.getValue())) {
return;
}
UserEntity userEntity = userService.getOne(new LambdaQueryWrapper<UserEntity>().eq(UserEntity::getUserId, userId).select(UserEntity::getWxOpenId));
UserEntity userEntity = userService.queryByUserId(userId);
if (StrUtil.isBlank(userEntity.getWxOpenId())) {
throw new SqxException("请先绑定微信");
}