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); + }