request->isAjax) { $params = $this->request->get(); $service = new StorageService(['mall_id' => $this->mall_id]); return $this->success('ok', $service->getStorageList($params)); } return $this->render($this->action->id); } /** * 重新导入 * * @return string */ public function actionAgainImport() { if ($this->request->isAjax) { $ids = $this->request->getBodyParam('ids'); $service = new SpuService(['mall_id' => $this->mall_id]); $count = $service->addTaskDoImport($ids, false); $count > 0 ? $this->success("成功重新加载{$count}个商品") : $this->error($service->error); } } /** * 移除导入商品 * * @return string */ public function actionRemoveImport() { if ($this->request->isAjax) { $ids = $this->request->getBodyParam('ids'); $service = new SpuService(['mall_id' => $this->mall_id]); $count = $service->removeImport($ids); $count > 0 ? $this->success("成功移除{$count}个商品") : $this->error($service->error); } } }