Selaa lähdekoodia

Merge branch 'master' into calendar

shish 1 vuosi sitten
vanhempi
commit
c03ada843e
2 muutettua tiedostoa jossa 38 lisäystä ja 30 poistoa
  1. 2 1
      app-ghs/controllers/ConsoleController.php
  2. 36 29
      app-ghs/controllers/TestController.php

+ 2 - 1
app-ghs/controllers/ConsoleController.php

@@ -167,6 +167,7 @@ class ConsoleController extends BaseController
         }
 
         //$notice[] = ['title' => '节日期间官方技术服务电话2号:17189513228', 'action' => '', 'page' => ''];
+        //$notice[] = ['title' => '今天11:30~12:00订单可能会漏打小票,请复查', 'action' => '', 'page' => ''];
 
         $mainId = $this->mainId;
         $respond = StatSaleClass::profile($mainId);
@@ -264,7 +265,7 @@ class ConsoleController extends BaseController
 
         $warning = '';
         $warningUrl = '';
-        //$warning = '开小单位(支)会减库存';
+        $warning = '因网络原因,今天11:30~12:00的订单可能会漏打小票,请复查,避免漏发货';
         //$warningUrl = '/admin/notice/warning';
 
         util::success([

+ 36 - 29
app-ghs/controllers/TestController.php

@@ -299,13 +299,13 @@ class TestController extends BaseController
         die;
     }
 
-    //退款操作 ssh 20231029
+    //订单退款接口 ssh 20250815
     public function actionRefund()
     {
-        $shopId = 36524;
+        $shopId = 13626;
         $shop = ShopClass::getById($shopId, true);
         if (empty($shop)) {
-            util::fail('没有找到门店15');
+            util::fail('没有找到所在的门店');
         }
         $merchantPrivateKeyPath = Yii::getAlias("@vendor/lakala") . '/production/api_private_key.pem';
         $lklCertificatePath = Yii::getAlias("@vendor/lakala") . '/production/lkl-apigw-v1.cer';
@@ -320,10 +320,13 @@ class TestController extends BaseController
         $laResource = new Lakala($params);
         $refundReason = '暂无';
         $refundOrderSn = orderSn::getCgRefundSn();
-        $refundPrice = 0.01;
+        $refundPrice = 0;
+        if ($refundPrice <= 0) {
+            util::fail('请填写金额');
+        }
         $refundFee = bcmul($refundPrice, 100);
-        $orderSn = 'KD_CS61235203';
-        $originTradeNo = '20231030110113230266215266468756';
+        $orderSn = 'KD26628409';
+        $originTradeNo = '20250815110113130166222385664461';
         //$originLogNo = '66215266025626';
         $aliParams = [
             'refundSn' => $refundOrderSn,
@@ -338,6 +341,31 @@ class TestController extends BaseController
         print_r($response);
     }
 
+    //订单退款接口(这个有云音响声音会通知商家) ssh 20250815
+    public function actionLsTradeRefund()
+    {
+        util::stop('接口已关闭');
+        $shopId = 17117;
+        $shop = ShopClass::getById($shopId, true);
+        if (empty($shop)) {
+            util::stop('没有找到门店哦');
+        }
+        $orderSn = 'KD26615540';
+        $orderInfo = ClassesOrderClass::getByCondition(['orderSn' => $orderSn], true);
+        if (!empty($orderInfo)) {
+            util::stop('有订单,不能走这个退款渠道');
+        }
+        $actPrice = 0;
+        if ($actPrice <= 0) {
+            util::fail('请填写退款金额');
+        }
+        $order = ['orderSn' => $orderSn, 'actPrice' => $actPrice];
+        $respond = HdRefundClass::onlyRefundAmount($shop, $order);
+        echo "<pre>";
+        print_r($respond);
+        util::stop();
+    }
+
     public function actionApply()
     {
         $id = 2888;
@@ -724,31 +752,10 @@ class TestController extends BaseController
         print_r($response);
     }
 
-    //零售订单退款 ssh 20250611
-    public function actionLsTradeRefund()
-    {
-        util::stop('接口已关闭');
-        $shopId = 17117;
-        $shop = ShopClass::getById($shopId, true);
-        if (empty($shop)) {
-            util::stop('没有找到门店哦');
-        }
-        $orderSn = 'KD26615540';
-        $orderInfo = ClassesOrderClass::getByCondition(['orderSn' => $orderSn], true);
-        if (!empty($orderInfo)) {
-            util::stop('有订单,不能走这个退款渠道');
-        }
-        $order = ['orderSn' => $orderSn, 'actPrice' => 55];
-        $respond = HdRefundClass::onlyRefundAmount($shop, $order);
-        echo "<pre>";
-        print_r($respond);
-        util::stop();
-    }
-
     //零售订单查询 ssh 20231031
     public function actionLsTradeQuery()
     {
-        $shopId = 17117;
+        $shopId = 13626;
         $shop = ShopClass::getById($shopId, true);
         if (empty($shop)) {
             util::stop('没有找到门店21');
@@ -765,7 +772,7 @@ class TestController extends BaseController
         ];
         $laResource = new Lakala($params);
         $queryParams = [
-            'orderSn' => 'KD26619443',
+            'orderSn' => 'KD26628409',
             //'tradeNo' => '66222010853306',
         ];
         $response = $laResource->query($queryParams, 0);