From fc0ebcb5f71190aa71274c509defba9c77a6804e Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期三, 20 九月 2023 18:13:28 +0800
Subject: [PATCH] bug

---
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java |   25 ++++++++-----------------
 1 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java
index fc00ea7..477b5a4 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/miniapp/AppOrderController.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.order.domain.dto.*;
@@ -78,17 +79,11 @@
     public R<AppPlaceOrderVo> placeOrder(@RequestBody AppPlaceOrderDto appPlaceOrderDto) {
         LoginUser loginUser = SecurityUtils.getLoginUser();
         Long userId = loginUser.getUserid();
+        if(1==1){
+            throw new ServiceException("支付功能尚未开通,请联系客服");
+        }
         appPlaceOrderDto.setUserId(userId);
         appPlaceOrderDto.setSpbillCreateIp(loginUser.getIpaddr());
-
-        if (userId != null) {
-            Member member = memberService.getMember(userId).getData();
-            appPlaceOrderDto.setUserId(userId);
-            if (member != null) {
-                appPlaceOrderDto.setOpenid(member.getMiniOpenid());
-                appPlaceOrderDto.setShopId(member.getRelationShopId());
-            }
-        }
         AppPlaceOrderVo appPlaceOrderVo = orderService.placeOrder(appPlaceOrderDto);
         return R.ok(appPlaceOrderVo);
     }
@@ -98,15 +93,11 @@
     public R<AppPlaceOrderVo> placeActivityOrder(@Validated @RequestBody AppPlaceActivityDto appPlaceActivityDto) {
         LoginUser loginUser = SecurityUtils.getLoginUser();
         Long userId = loginUser.getUserid();
-        appPlaceActivityDto.setSpbillCreateIp(loginUser.getIpaddr());
-        if (userId != null) {
-            Member member = memberService.getMember(userId).getData();
-            appPlaceActivityDto.setUserId(userId);
-            if (member != null && member.getRelationShopId() != null) {
-                appPlaceActivityDto.setOpenid(member.getMiniOpenid());
-                appPlaceActivityDto.setShopId(member.getRelationShopId());
-            }
+        if(1==1){
+            throw new ServiceException("支付功能尚未开通,请联系客服");
         }
+        appPlaceActivityDto.setUserId(userId);
+        appPlaceActivityDto.setSpbillCreateIp(loginUser.getIpaddr());
         AppPlaceOrderVo appPlaceOrderVo = orderService.placeActivityOrder(appPlaceActivityDto);
         return R.ok(appPlaceOrderVo);
     }

--
Gitblit v1.7.1