shish 2 lat temu
rodzic
commit
2a53bc64cd
1 zmienionych plików z 6 dodań i 4 usunięć
  1. 6 4
      console/controllers/BookController.php

+ 6 - 4
console/controllers/BookController.php

@@ -49,14 +49,16 @@ class BookController extends Controller
                     if ($hasChange == 1) {
                         //通知采购单页要刷新货位
                         $cacheKey = 'ghs_cg_order_staff_refresh_seat_' . $bookSn;
-                        $mainId = $order->mainId ?? 0;
+                        $mainId = $cg->mainId ?? 0;
                         $cgId = $cg->id ?? 0;
                         $staffList = ShopAdminClass::getAllByCondition(['mainId' => $mainId], null, '*', null, true);
                         if (!empty($staffList)) {
                             foreach ($staffList as $staff) {
-                                $staffId = $staff->id ?? 0;
-                                $ele = $cgId . '-' . $staffId;
-                                Yii::$app->redis->executeCommand('SADD', [$cacheKey, $ele]);
+                                if (isset($staff->remind) && $staff->remind == 1) {
+                                    $staffId = $staff->id ?? 0;
+                                    $ele = $cgId . '-' . $staffId;
+                                    Yii::$app->redis->executeCommand('SADD', [$cacheKey, $ele]);
+                                }
                             }
                         }
                         $cacheKey = 'ghs_cg_order_guest_refresh_seat_' . $bookSn;