Răsfoiți Sursa

零售报错

shish 5 ani în urmă
părinte
comite
f61faba5e6

+ 3 - 3
app-hd/controllers/ConsoleController.php

@@ -23,13 +23,13 @@ class ConsoleController extends BaseController
     {
         //试用期到期时间
         $notice = [];
-        $sj = $this->sj->attributes;
+        $sj = isset($this->sj) && !empty($this->sj) ? $this->sj->attributes : [];
         $deadline = $sj['deadline'] ?? 0;
         $current = time();
         $remain = strtotime($deadline) - $current;
         if ($remain <= 1296000) {
             //是否有充值免费续期权限
-            $hasRight = SjClass::hasRechargeRenewRight($this->sj->attributes, $this->sjExtend);
+            $hasRight = SjClass::hasRechargeRenewRight($sj, $this->sjExtend);
             if ($hasRight) {
                 $title = '您的试用期已到,点击免费续期1年';
                 if ($remain > 0) {
@@ -96,7 +96,7 @@ class ConsoleController extends BaseController
     public function actionInit()
     {
         $dict = dict::get();
-        $shop = $this->shop->attributes;
+        $shop = isset($this->shop) && !empty($this->shop) ? $this->shop->attributes : [];
         util::success(['dict' => $dict, 'shop' => $shop]);
     }
 

+ 2 - 2
app-hd/controllers/MerchantController.php

@@ -32,11 +32,11 @@ class MerchantController extends BaseController
     //商家信息 ssh 2019.12.8
     public function actionDetail()
     {
-        $merchant = $this->sj->attributes;
+        $merchant = isset($this->sj) && !empty($this->sj) ? $this->sj->attributes : [];
         if (empty($merchant)) {
             util::success([]);
         }
-        $merchant = MerchantService::getInfo($this->sj->attributes, $this->sjExtend);
+        $merchant = MerchantService::getInfo($merchant, $this->sjExtend);
         util::success($merchant);
     }
 

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

@@ -197,7 +197,7 @@ class ShopController extends BaseController
     public function actionAll()
     {
         $res = [];
-        $shopAdmin = $this->shopAdmin->attributes;
+        $shopAdmin = isset($this->shopAdmin) && !empty($this->shopAdmin) ? $this->shopAdmin->attributes : [];
         if (isset($shopAdmin['super']) && $shopAdmin['super'] == 1) {
             $res = ShopClass::getAllShop($this->sjId);
         }

+ 4 - 1
sql.sql

@@ -2644,4 +2644,7 @@ ALTER TABLE xhCash ADD `cashAccount` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '
 ALTER TABLE xhPtYeChange CHANGE `style` `ptStyle` TINYINT NOT NULL DEFAULT 1 COMMENT '平台类型 查看dict.php表';
 ALTER TABLE xhShopYeChange ADD `ptStyle` TINYINT NOT NULL DEFAULT 1 COMMENT '平台类型 查看dict.php表' AFTER `relateId`;
 ALTER TABLE xhPtYeChange ADD shopName VARCHAR(50) NOT NULL DEFAULT '' COMMENT '门店名称' AFTER `shopId`;
-ALTER TABLE xhPtYeChange ADD sjName VARCHAR(50) NOT NULL DEFAULT '' COMMENT '商家名称' AFTER `shopId`;
+ALTER TABLE xhPtYeChange ADD sjName VARCHAR(50) NOT NULL DEFAULT '' COMMENT '商家名称' AFTER `shopId`;
+
+
+告诉供货商采购之后价格会自动变化 如果不合意需要自己去改价