Forráskód Böngészése

Merge branch 'master' into dev

shizhongqi 3 hónapja
szülő
commit
4c7f7a7980

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

@@ -172,7 +172,7 @@ class ConsoleController extends BaseController
             }
         }
 
-        //$notice[] = ['title' => '母亲节订单较多,新订单通知会延迟。', 'action' => '', 'page' => ''];
+        $notice[] = ['title' => '急事请连续打二次电话 15280215347。', 'action' => '', 'page' => ''];
         //$notice[] = ['title' => '新功能:客户端和后台使用跑腿的流程', 'action' => '', 'page' => '/admin/book/detail?id=use_pt'];
         //$notice[] = ['title' => '过二天,收银机点花材名字可增加数量。', 'action' => '查看', 'page' => '/admin/book/detail?id=casherUpdate'];
 

+ 1 - 1
app-hd/controllers/MainController.php

@@ -26,7 +26,7 @@ use Yii;
 class MainController extends BaseController
 {
 
-    public $guestAccess = ['index', 'my'];
+    public $guestAccess = ['my'];
 
     //获取商城的短链接 ssh 20250826
     public function actionGetShortUrl()

+ 3 - 0
app-hd/controllers/MemberLevelController.php

@@ -86,6 +86,9 @@ class MemberLevelController extends BaseController
                     MemberLevelClass::add($it, true);
                 }
             }
+            $shop = $this->shop;
+            $shop->memberLevelSet = 1;
+            $shop->save();
             $transaction->commit();
 
             // 客户消费等级变更

+ 8 - 0
app-mall/controllers/OrderController.php

@@ -325,6 +325,7 @@ class OrderController extends BaseController
             $addPriceMap = \bizGhs\custom\classes\CustomClass::$levelAddPriceKeyMap;
             $totalWeight = 0;
             $totalNum = 0;
+            $totalReachDiscount = 0;
             foreach ($productList as $eleKey => $element) {
                 $level = 0;
                 $productId = $element['productId'];
@@ -337,6 +338,12 @@ class OrderController extends BaseController
                 $hasBuyNum = Yii::$app->redis->executeCommand('HGET', [$limitKey, $hdCustomId]);
                 $hasBuyNum = $num + ($hasBuyNum == null ? 0 : $hasBuyNum); // 已购买总数量
                 $price = \bizGhs\product\classes\ProductClass::getFinalPrice($product, $level, $priceMap, $addPriceMap, 0, $num, $hasBuyNum);
+                $reachNum = $product['reachNum'] ?? 0;
+                $reachNumDiscount = $product['reachNumDiscount'] ?? 0;
+                if ($reachNum > 0 && $num >= $reachNum && $reachNumDiscount > 0) {
+                    $currentReachDiscount = bcmul($reachNumDiscount, $num, 2);
+                    $totalReachDiscount = bcadd($totalReachDiscount, $currentReachDiscount, 2);
+                }
                 $currentTotal = bcmul($price, $num, 2);
                 $modifyPrice = bcadd($modifyPrice, $currentTotal, 2);
                 $productList[$eleKey]['unitPrice'] = $price;
@@ -351,6 +358,7 @@ class OrderController extends BaseController
                 }
             }
             $post['product'] = $productList;
+            $post['reachDiscountPrice'] = $totalReachDiscount;
 
             //不能前端传运费过来,只能通过跑腿接口计算出来
             unset($post['sendCost']);

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

@@ -235,8 +235,8 @@
             }
             // 这里可以根据appType跳转到对应的下载链接
             const downloadUrls = {
-                'xiaohuabao': 'https://api.shop.hzghd.com/1279.apk', // 销花宝APP下载链接
-                'huazhanggui': 'https://api.shop.hzghd.com/234.apk', // 花掌柜APP下载链接
+                'xiaohuabao': 'https://api.shop.hzghd.com/1288.apk', // 销花宝APP下载链接
+                'huazhanggui': 'https://api.shop.hzghd.com/236.apk', // 花掌柜APP下载链接
                 'huazhanggui_cashier': 'https://api.shop.hzghd.com/200.apk', // 花掌柜收银下载链接
                 'xiaohuabao_cashier': 'https://api.shop.hzghd.com/159.apk' // 销花宝收银下载链接
             };

+ 1 - 1
console/controllers/CustomController.php

@@ -157,7 +157,7 @@ class CustomController extends Controller
             // 1. 查询 xhShop 表,获取所有 ptStyle = 1 的门店数据,每次取出500个进行处理
             $query = Shop::find()
                 ->select('id, mainId')
-                ->where(['ptStyle' => 1])
+                ->where(['ptStyle' => 1,'id'=>6362])
                 ->orderBy('id DESC')
                 ->asArray();