下单校验微信绑定状态

This commit is contained in:
张松 2025-03-27 13:35:22 +08:00
parent 6979421db7
commit 853b918d54
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sqx.common.annotation.Debounce;
import com.sqx.common.exception.SqxException;
import com.sqx.common.utils.Result;
import com.sqx.modules.app.annotation.Login;
import com.sqx.modules.app.entity.UserEntity;
@ -45,7 +46,7 @@ public class AppOrdersController extends AbstractController {
}
UserEntity userEntity = userService.getOne(new LambdaQueryWrapper<UserEntity>().eq(UserEntity::getUserId, userId).select(UserEntity::getWxOpenId));
if (StrUtil.isBlank(userEntity.getWxOpenId())) {
throw new RuntimeException("请先绑定微信");
throw new SqxException("请先绑定微信");
}
}