智慧教务系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

93 lines
2.6 KiB

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\user_feedback;
use core\base\BaseAdminController;
use app\service\admin\user_feedback\UserFeedbackService;
/**
* 用户反馈信息控制器
* Class UserFeedback
* @package app\adminapi\controller\user_feedback
*/
class UserFeedback extends BaseAdminController
{
/**
* 获取用户反馈信息列表
* @return \think\Response
*/
public function lists(){
$data = $this->request->params([
["user_id",""]
]);
return success((new UserFeedbackService())->getPage($data));
}
/**
* 用户反馈信息详情
* @param int $id
* @return \think\Response
*/
public function info(int $id){
return success((new UserFeedbackService())->getInfo($id));
}
/**
* 添加用户反馈信息
* @return \think\Response
*/
public function add(){
$data = $this->request->params([
["user_id",0],
["feedback_text",""],
["attachment_url",""],
]);
$this->validate($data, 'app\validate\user_feedback\UserFeedback.add');
$id = (new UserFeedbackService())->add($data);
return success('ADD_SUCCESS', ['id' => $id]);
}
/**
* 用户反馈信息编辑
* @param $id 用户反馈信息id
* @return \think\Response
*/
public function edit(int $id){
$data = $this->request->params([
["user_id",0],
["feedback_text",""],
["attachment_url",""],
]);
$this->validate($data, 'app\validate\user_feedback\UserFeedback.edit');
(new UserFeedbackService())->edit($id, $data);
return success('EDIT_SUCCESS');
}
/**
* 用户反馈信息删除
* @param $id 用户反馈信息id
* @return \think\Response
*/
public function del(int $id){
(new UserFeedbackService())->del($id);
return success('DELETE_SUCCESS');
}
public function getCustomerResourcesAll(){
return success(( new UserFeedbackService())->getCustomerResourcesAll());
}
}