make(StoreProductLogServices::class); $productLogServices->createLog($type, $data); if ($type == 'visit') { /** @var StoreVisitServices $storeVisit */ $storeVisit = app()->make(StoreVisitServices::class); $storeVisit->setView($data['uid'] ?? 0, $data['id'] ?? 0, $productType, $data['product_id'] ?? [], 'view'); } } catch (\Throwable $e) { response_log_write([ 'message' => '写入商品记录发生错误,错误原因:' . $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine() ]); } return true; } /** * 修改警戒库存配置,批量修改商品库存警戒 * @param $page * @param $limit * @return true * @return true * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * User: liusl * DateTime: 2024/9/13 17:43 */ public function productStockTips($page, $limit) { /** @var StoreProductServices $storeProductServices */ $storeProductServices = app()->make(StoreProductServices::class); $storeProductServices->runProductStockTips($page, $limit); return true; } }