Sfoglia il codice sorgente

Merge branch 'cost' into dev

shish 6 mesi fa
parent
commit
d4fd48e349

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

@@ -168,7 +168,7 @@ class ConsoleController extends BaseController
             }
         }
 
-        //$notice[] = ['title' => '早上有急事请连打二次小石电话', 'action' => '', 'page' => ''];
+        $notice[] = ['title' => '赊账最近会统一更名为挂账', 'action' => '', 'page' => ''];
         //$notice[] = ['title' => '新功能:客户端和后台使用跑腿的流程', 'action' => '', 'page' => '/admin/book/detail?id=use_pt'];
         //$notice[] = ['title' => '快速设置:客户下单自动计算跑腿费', 'action' => '查看', 'page' => '/admin/book/detail?id=auto_calc_pt_fee'];
         //$notice[] = ['title' => '订单上如何一键呼叫跑腿', 'action' => '查看', 'page' => '/admin/book/detail?id=one_call_pt'];

+ 2 - 2
app-ghs/controllers/CustomController.php

@@ -1133,14 +1133,14 @@ class CustomController extends BaseController
     public function actionChangeLevel()
     {
         $shopAdmin = $this->shopAdmin;
-        if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
+        if (!isset($shopAdmin->super) || $shopAdmin->super != 1) {
             util::fail('超管才能修改');
         }
 
         //泉城的只有苏小娟才能修改
         if (getenv('YII_ENV') == 'production') {
             if ($this->mainId == 60) {
-                if (in_array($this->adminId, [2499, 4]) == false) {
+                if (!in_array($this->adminId, [2499, 4])) {
                     util::fail('请小娟修改');
                 }
             }

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

@@ -239,7 +239,7 @@
                 'xiaohuabao': 'https://api.shop.hzghd.com/1277.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/153.apk' // 销花宝收银下载链接
+                'xiaohuabao_cashier': 'https://api.shop.hzghd.com/154.apk' // 销花宝收银下载链接
             };
             const url = downloadUrls[appType];
             if (url && url !== '#') {

+ 12 - 2
biz-ghs/product/classes/ProductClass.php

@@ -754,8 +754,18 @@ class ProductClass extends BaseClass
         if (empty($product) || isset($product['price']) == false) {
             return 0;
         }
-        $currentPriceField = $priceMap[$level] ?? 'price';
-        $price = $product[$currentPriceField] ?? 0;
+        if ($level == 9) {
+            $avCost = $product['avCost'] ?? 0;
+            $price = $avCost;
+            if ($price <= 0) {
+                $cost = $product['cost'] ?? 0;
+                $price = $cost;
+            }
+        } else {
+            $currentPriceField = $priceMap[$level] ?? 'price';
+            $price = $product[$currentPriceField] ?? 0;
+        }
+
         $discountPrice = $product['discountPrice'] ?? 0;
         $hjDiscountPrice = $product['hjDiscountPrice'] ?? 0;
         $skDiscountPrice = $product['skDiscountPrice'] ?? 0;