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