name ?? ''; $id = $newProduct->id ?? 0; $staffList = ShopAdminClass::getAllByCondition(['mainId' => $mainId], null, '*', null, true); if (!empty($staffList)) { foreach ($staffList as $staff) { $staffId = $staff->id; $data = [ 'mainId' => $mainId, 'shopId' => $shopId, 'staffId' => $staffId, 'title' => '花材需要归类', 'type' => 1, 'targetId' => $id, 'read' => 0, 'content' => $ghsName . '的【' . $productName . '】,被归到默认分类', 'page' => '/admin/item/detail?from=1&source=notify&id=' . $id, ]; self::add($data); $notifyNum = bcadd($staff->notifyNum, 1); $staff->notifyNum = $notifyNum; $staff->save(); } } } }