From 7cd3dea07f5b7cefad9dea9fd7daf992449aaac8 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 12 三月 2024 18:24:38 +0800
Subject: [PATCH] 修改bug

---
 cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java b/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
index 361a4e5..898316d 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
@@ -70,6 +70,12 @@
     @Autowired
     private TBackRecordService backRecordService;
 
+    @Autowired
+    private ISiteBookingService iSiteBookingService;
+
+    @Autowired
+    private ISiteService siteService;
+
 
     /**
      * 获取场地列表
@@ -155,10 +161,7 @@
     }
 
 
-    @Autowired
-    private ISiteBookingService iSiteBookingService;
-    @Autowired
-    private ISiteService siteService;
+
 
     /**
      * 获取场地预约日期数据
@@ -327,7 +330,6 @@
      */
     @Override
     public ResultUtil reservationSite(Integer uid, ReservationSite reservationSite) throws Exception {
-
         Site site = this.getById(reservationSite.getId());
         AppUser appUser = appUserClient.queryAppUser(uid);
         String[] split = reservationSite.getTimes().split(";");
@@ -387,7 +389,6 @@
                     return ResultUtil.error("优惠券已过期");
                 }
                 if (userCoupon != null && coupon.getType() == 1) {//满减
-//                {"conditionalAmount":50,"deductionAmount":10,"experienceName":""}
                     JSONObject jsonObject = JSON.parseObject(coupon.getContent());
                     Double num1 = jsonObject.getDouble("conditionalAmount");
                     Double num2 = jsonObject.getDouble("deductionAmount");
@@ -432,7 +433,6 @@
         siteBooking.setState(1);
         siteBooking.setInsertTime(new Date());
 
-        // 2.0
         siteBooking.setNextName(reservationSite.getNextName());
         siteBooking.setIsHalf(reservationSite.getIsHalf());
         siteBooking.setHalfName(reservationSite.getHalfName());
@@ -449,6 +449,9 @@
         }
         if (reservationSite.getPayType() == 3) {//玩湃币支付
             if (reservationSite.getIsHalf() == 2) {
+
+
+
                 return playPaiCoinPaymentSite(appUser, Double.valueOf(site.getPlayPaiCoin()), siteBooking);
             } else {
                 return playPaiCoinPaymentSite(appUser, site.getPlayPaiCoinOne(), siteBooking);
@@ -541,8 +544,11 @@
         if (operatorId == null ){
             // 平台的门店
             smid1 = smid;
+        }else if (operatorId == 0){
+            smid1 = smid;
         }else{
             smid1 = siteService.getSMIDByOperatorId(operatorId);
+
         }
         ResultUtil alipay = payMoneyUtil.alipay(smid1,"预约场地", "预约场地", id.toString(), code, paymentPrice.toString(), "/base/site/aliPaymentSiteCallback");
         System.out.println("预约场地----" + alipay.getCode());
@@ -590,9 +596,11 @@
                                     String smid1 = "";
                                     if (operatorId == null ){
                                         // 平台的门店
+                                    }else if (operatorId == 0){
                                         smid1 = smid;
                                     }else{
                                         smid1 = siteService.getSMIDByOperatorId(operatorId);
+
                                     }
                                     payMoneyUtil.confirm(smid1,code,tradeNo,paymentPrice.toString());
                                     break;

--
Gitblit v1.7.1