dataLists(new {UPPER_CAMEL_NAME}Lists()); } /** * @notes 添加{NOTES} * @return \think\response\Json * @author {AUTHOR} * @date {DATE} */ public function add() { $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()); } /** * @notes 编辑{NOTES} * @return \think\response\Json * @author {AUTHOR} * @date {DATE} */ public function edit() { $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()); } /** * @notes 删除{NOTES} * @return \think\response\Json * @author {AUTHOR} * @date {DATE} */ public function delete() { $params = (new {UPPER_CAMEL_NAME}Validate())->post()->goCheck('delete'); {UPPER_CAMEL_NAME}Logic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取{NOTES}详情 * @return \think\response\Json * @author {AUTHOR} * @date {DATE} */ public function detail() { $params = (new {UPPER_CAMEL_NAME}Validate())->goCheck('detail'); $result = {UPPER_CAMEL_NAME}Logic::detail($params); return $this->data($result); } }