From 151074e168d68626c6b5ecbd5944f98d63dcb3bb Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 21 Aug 2025 10:20:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20app/common/service/generat?= =?UTF-8?q?or/stub/php/controller.stub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/generator/stub/php/controller.stub | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/common/service/generator/stub/php/controller.stub b/app/common/service/generator/stub/php/controller.stub index 5570b47..16d07f3 100644 --- a/app/common/service/generator/stub/php/controller.stub +++ b/app/common/service/generator/stub/php/controller.stub @@ -37,10 +37,8 @@ class {UPPER_CAMEL_NAME}Controller extends {EXTENDS_CONTROLLER} { $params = (new {UPPER_CAMEL_NAME}Validate())->post()->goCheck('add'); $result = {UPPER_CAMEL_NAME}Logic::add($params); - if (true === $result) { - return $this->success('添加成功', [], 1, 1); - } - return $this->fail({UPPER_CAMEL_NAME}Logic::getError()); + return $this->success('添加成功', [], 1, 1); + } @@ -54,10 +52,8 @@ class {UPPER_CAMEL_NAME}Controller extends {EXTENDS_CONTROLLER} { $params = (new {UPPER_CAMEL_NAME}Validate())->post()->goCheck('edit'); $result = {UPPER_CAMEL_NAME}Logic::edit($params); - if (true === $result) { - return $this->success('编辑成功', [], 1, 1); - } - return $this->fail({UPPER_CAMEL_NAME}Logic::getError()); + return $this->success('编辑成功', [], 1, 1); + }