Bläddra i källkod

注释 优化

shish 5 år sedan
förälder
incheckning
10838bc23c

+ 3 - 0
app-ghs/controllers/AuthController.php

@@ -221,6 +221,9 @@ class AuthController extends PublicController
         $switchShop = 0;
         if (!empty($currentShopId)) {
             $shopAdmin = ShopAdminClass::getByCondition(['shopId' => $currentShopId, 'adminId' => $adminId], true);
+            if (empty($shopAdmin)) {
+                util::fail('没有找到员工哦');
+            }
             $shopAdmin->lastLogin = date("Y-m-d H:i:s");
             $shopAdmin->save();
             $shopAdminId = $shopAdmin->id ?? 0;

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

@@ -216,6 +216,9 @@ class AuthController extends PublicController
         $switchShop = 0;
         if (!empty($shopId)) {
             $shopAdmin = ShopAdminClass::getByCondition(['shopId' => $shopId, 'adminId' => $adminId], true);
+            if (empty($shopAdmin)) {
+                util::fail('没有员工信息哦');
+            }
             $shopAdmin->lastLogin = date("Y-m-d H:i:s");
             $shopAdmin->save();
             $shopAdminId = $shopAdmin->id ?? 0;

+ 1 - 1
biz-hd/purchase/classes/PurchaseClass.php

@@ -336,7 +336,7 @@ class PurchaseClass extends BaseClass
         $custom->buyAmount = bcadd($custom->buyAmount, $actPrice, 2);
         $custom->save();
 
-        /********支付成功后加库存 linqh 2021-05-10*********/
+        /********订单完成后加库存 linqh 2021-05-10*********/
         $orderSn = $info->orderSn;
         $purchaseItem = PurchaseItemClass::getAllByCondition(['orderSn'=>$orderSn],null,"*");
         foreach ($purchaseItem as $v){