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); } }