更新 app/common/service/generator/stub/php/controller.stub

This commit is contained in:
mkm 2025-08-21 10:20:01 +08:00
parent dd4cc2d281
commit 151074e168

View File

@ -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());
}
@ -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());
}