Parcourir la source

Merge branch 'master' of git.huaml.com:zhh/huahuibao

shizhongqi il y a 5 mois
Parent
commit
d526cb9b5a

+ 2 - 2
app-pt/views/main/app.php

@@ -238,8 +238,8 @@
             const downloadUrls = {
                 'xiaohuabao': 'https://api.shop.hzghd.com/1278.apk', // 销花宝APP下载链接
                 'huazhanggui': 'https://api.shop.hzghd.com/229.apk', // 花掌柜APP下载链接
-                'huazhanggui_cashier': 'https://api.shop.hzghd.com/196.apk', // 花掌柜收银下载链接
-                'xiaohuabao_cashier': 'https://api.shop.hzghd.com/154.apk' // 销花宝收银下载链接
+                'huazhanggui_cashier': 'https://api.shop.hzghd.com/197.apk', // 花掌柜收银下载链接
+                'xiaohuabao_cashier': 'https://api.shop.hzghd.com/155.apk' // 销花宝收银下载链接
             };
             const url = downloadUrls[appType];
             if (url && url !== '#') {

+ 1 - 2
biz-ghs/express/classes/GhsDeliveryOrderClass.php

@@ -30,12 +30,11 @@ class GhsDeliveryOrderClass extends BaseClass
         $orderId = $order->id;
         $shopId = $order->shopId;
         try {
-            noticeUtil::push('批发,付款成功之后要发跑腿的订单:' . $orderId, '15280215347');
             $cacheKey = 'ghs_pt_cacheData:' . $orderId;
             $cachedData = Yii::$app->redis->get($cacheKey);
             if (!empty($cachedData)) {
+                noticeUtil::push('批发,付款成功之后要发跑腿的订单:' . $orderId, '15280215347');
                 $cachedData = json_decode($cachedData, true);
-
                 $data = [
                     'orderId' => $orderId,
                     'shopId' => $shopId,

+ 1 - 2
biz-hd/express/classes/HdDeliveryOrderClass.php

@@ -29,12 +29,11 @@ class HdDeliveryOrderClass extends BaseClass
         $orderId = $order->id;
         $shopId = $order->shopId;
         try {
-            noticeUtil::push('零售,付款成功之后要发跑腿的订单:' . $orderId, '15280215347');
             $cacheKey = 'hd_pt_cacheData:' . $orderId;
             $cachedData = Yii::$app->redis->get($cacheKey);
             if (!empty($cachedData)) {
+                noticeUtil::push('零售,付款成功之后要发跑腿的订单:' . $orderId, '15280215347');
                 $cachedData = json_decode($cachedData, true);
-
                 $data = [
                     'orderId' => $orderId,
                     'shopId' => $order->shopId,

+ 29 - 0
console/controllers/TestController.php

@@ -38,6 +38,35 @@ use yii\console\Controller;
 class TestController extends Controller
 {
 
+    public function actionCustomBuyAmount()
+    {
+        ini_set('memory_limit', '2045M');
+        set_time_limit(0);
+        $mainId = 26374;
+        $customList = \bizGhs\custom\classes\CustomClass::getAllByCondition(['ownMainId' => $mainId], null, '*', null, true);
+        if (!empty($customList)) {
+            foreach ($customList as $custom) {
+                $customId = $custom->id ?? 0;
+                $ghsId = $custom->ghsId ?? 0;
+                $ghs = \biz\ghs\classes\GhsClass::getById($ghsId, true);
+                if (empty($ghs)) {
+                    continue;
+                }
+                $orderList = \bizGhs\order\classes\OrderClass::getAllByCondition(['customId' => $customId], null, 'id, actPrice');
+                $buyAmount = 0;
+                if (!empty($orderList)) {
+                    foreach ($orderList as $order) {
+                        $buyAmount = bcadd($buyAmount, $order['actPrice'], 2);
+                    }
+                }
+                $custom->buyAmount = $buyAmount;
+                $custom->save();
+                $ghs->expendAmount = $buyAmount;
+                $ghs->save();
+            }
+        }
+    }
+
     public function actionShop()
     {
         $sql = "select id,shopName,`merchantName` ,ptStyle,mobile from xhShop where ptstyle = 4 and mobile not like '10000%'";