dataLists(new ExternalPlatformGoodsLists()); } /** * @notes 添加 * @return \think\response\Json * @author likeadmin * @date 2025/03/21 19:09 */ public function add() { $params = (new ExternalPlatformGoodsValidate())->post()->goCheck('add'); $result = ExternalPlatformGoodsLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(ExternalPlatformGoodsLogic::getError()); } /** * @notes 编辑 * @return \think\response\Json * @author likeadmin * @date 2025/03/21 19:09 */ public function edit() { $params = (new ExternalPlatformGoodsValidate())->post()->goCheck('edit'); $result = ExternalPlatformGoodsLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(ExternalPlatformGoodsLogic::getError()); } /** * @notes 删除 * @return \think\response\Json * @author likeadmin * @date 2025/03/21 19:09 */ public function delete() { $params = (new ExternalPlatformGoodsValidate())->post()->goCheck('delete'); ExternalPlatformGoodsLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取详情 * @return \think\response\Json * @author likeadmin * @date 2025/03/21 19:09 */ public function detail() { $params = (new ExternalPlatformGoodsValidate())->goCheck('detail'); $result = ExternalPlatformGoodsLogic::detail($params); return $this->data($result); } public function goodsImport() { $params = $this->request->post(); $result = ExternalPlatformGoodsLogic::goodsImport($params); if (true === $result) { return $this->success('导入成功', [], 1, 1); } return $this->fail(ExternalPlatformGoodsLogic::getError()); } }