From ad587e96abc2f05493ac7d13a09ebae81bb0dcb0 Mon Sep 17 00:00:00 2001
From: yanghb <yanghb>
Date: 星期二, 09 四月 2024 16:17:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java b/rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java
index 92a0e37..4995c54 100644
--- a/rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java
+++ b/rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java
@@ -456,6 +456,12 @@
     public ResponseData<CounsellingOrder> createCounsellingOrder(@RequestBody CreateCounsellingOrderRequest counsellingOrderRequest) {
         counsellingOrderRequest.setIsBack(false);
         counsellingOrderRequest.setUserId(LoginContext.me().getLoginUser().getUserId());
+        CounsellingInfo counsellingInfo = this.counsellingInfoService.getOne(new LambdaQueryWrapper<CounsellingInfo>().select(CounsellingInfo::getId,CounsellingInfo::getListingStatus).eq(CounsellingInfo::getId,counsellingOrderRequest.getCounsellingInfoId()));
+        if (counsellingInfo != null){
+            if(counsellingInfo.getListingStatus().intValue() != 1){
+                return new ErrorResponseData<>("咨询师已经下架,无法进行购买,请联系咨询顾问");
+            }
+        }
         Customer customer = this.customerService.getById(LoginContext.me().getLoginUser().getUserId());
         if (customer.getStatusFlag() != null &&customer.getStatusFlag() !=1){
             return new ErrorResponseData<>("账号已被冻结或者被注销,无法进行下单");

--
Gitblit v1.7.1