first commit
This commit is contained in:
94
app/adminapi/controller/feedback/FeedbackCateController.php
Normal file
94
app/adminapi/controller/feedback/FeedbackCateController.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\feedback;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\feedback\FeedbackCateLists;
|
||||
use app\adminapi\logic\feedback\FeedbackCateLogic;
|
||||
use app\adminapi\validate\feedback\FeedbackCateValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 意见反馈类型控制器
|
||||
* Class FeedbackCateController
|
||||
* @package app\adminapi\controller\feedback
|
||||
*/
|
||||
class FeedbackCateController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取意见反馈类型列表
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/06/06 00:12
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new FeedbackCateLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加意见反馈类型
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/06/06 00:12
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new FeedbackCateValidate())->post()->goCheck('add');
|
||||
$result = FeedbackCateLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(FeedbackCateLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑意见反馈类型
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/06/06 00:12
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new FeedbackCateValidate())->post()->goCheck('edit');
|
||||
$result = FeedbackCateLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(FeedbackCateLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除意见反馈类型
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/06/06 00:12
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new FeedbackCateValidate())->post()->goCheck('delete');
|
||||
FeedbackCateLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取意见反馈类型详情
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/06/06 00:12
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new FeedbackCateValidate())->goCheck('detail');
|
||||
$result = FeedbackCateLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user