95 lines
2.2 KiB
PHP
95 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace app\admin\controller\user;
|
|
|
|
|
|
use app\admin\controller\BaseAdminController;
|
|
use app\admin\lists\user\UserFeedbackLists;
|
|
use app\admin\logic\user\UserFeedbackLogic;
|
|
use app\admin\validate\user\UserFeedbackValidate;
|
|
|
|
|
|
/**
|
|
* 用户反馈表控制器
|
|
* Class UserFeedbackController
|
|
* @package app\admin\controller\user
|
|
*/
|
|
class UserFeedbackController extends BaseAdminController
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 获取用户反馈表列表
|
|
* @return \think\response\Json
|
|
* @author likeadmin
|
|
* @date 2024/05/13 16:56
|
|
*/
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new UserFeedbackLists());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 添加用户反馈表
|
|
* @return \think\response\Json
|
|
* @author likeadmin
|
|
* @date 2024/05/13 16:56
|
|
*/
|
|
public function add()
|
|
{
|
|
$params = (new UserFeedbackValidate())->post()->goCheck('add');
|
|
$result = UserFeedbackLogic::add($params);
|
|
if (true === $result) {
|
|
return $this->success('添加成功', [], 1, 1);
|
|
}
|
|
return $this->fail(UserFeedbackLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑用户反馈表
|
|
* @return \think\response\Json
|
|
* @author likeadmin
|
|
* @date 2024/05/13 16:56
|
|
*/
|
|
public function edit()
|
|
{
|
|
$params = (new UserFeedbackValidate())->post()->goCheck('edit');
|
|
$result = UserFeedbackLogic::edit($params);
|
|
if (true === $result) {
|
|
return $this->success('编辑成功', [], 1, 1);
|
|
}
|
|
return $this->fail(UserFeedbackLogic::getError());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除用户反馈表
|
|
* @return \think\response\Json
|
|
* @author likeadmin
|
|
* @date 2024/05/13 16:56
|
|
*/
|
|
public function delete()
|
|
{
|
|
$params = (new UserFeedbackValidate())->post()->goCheck('delete');
|
|
UserFeedbackLogic::delete($params);
|
|
return $this->success('删除成功', [], 1, 1);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取用户反馈表详情
|
|
* @return \think\response\Json
|
|
* @author likeadmin
|
|
* @date 2024/05/13 16:56
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = (new UserFeedbackValidate())->goCheck('detail');
|
|
$result = UserFeedbackLogic::detail($params);
|
|
return $this->data($result);
|
|
}
|
|
|
|
|
|
} |