更新 app/common/service/generator/stub/php/controller.stub
This commit is contained in:
parent
dd4cc2d281
commit
151074e168
@ -37,10 +37,8 @@ class {UPPER_CAMEL_NAME}Controller extends {EXTENDS_CONTROLLER}
|
|||||||
{
|
{
|
||||||
$params = (new {UPPER_CAMEL_NAME}Validate())->post()->goCheck('add');
|
$params = (new {UPPER_CAMEL_NAME}Validate())->post()->goCheck('add');
|
||||||
$result = {UPPER_CAMEL_NAME}Logic::add($params);
|
$result = {UPPER_CAMEL_NAME}Logic::add($params);
|
||||||
if (true === $result) {
|
|
||||||
return $this->success('添加成功', [], 1, 1);
|
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');
|
$params = (new {UPPER_CAMEL_NAME}Validate())->post()->goCheck('edit');
|
||||||
$result = {UPPER_CAMEL_NAME}Logic::edit($params);
|
$result = {UPPER_CAMEL_NAME}Logic::edit($params);
|
||||||
if (true === $result) {
|
|
||||||
return $this->success('编辑成功', [], 1, 1);
|
return $this->success('编辑成功', [], 1, 1);
|
||||||
}
|
|
||||||
return $this->fail({UPPER_CAMEL_NAME}Logic::getError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user