//package com.ichangzuo.system.controller;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.ichangzuo.common.result.PageResult;
//import com.ichangzuo.common.result.Result;
//import com.ichangzuo.system.model.entity.Notice;
//import com.ichangzuo.system.model.query.NoticePageQuery;
//import com.ichangzuo.system.service.impl.NoticeServiceImpl;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.Parameter;
//import lombok.RequiredArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//
//@RestController
//@RequestMapping("/api/v1/notice")
//@RequiredArgsConstructor
//public class NoticeController {
//    private final NoticeServiceImpl noticeService;
//
//    @Operation(summary = "通知分页列表")
//    @GetMapping("/page")
//    public PageResult<Notice> listPagedMessage(
//            NoticePageQuery queryParams
//    ) {
//        IPage<Notice> result = noticeService.listPage(queryParams);
//        return PageResult.success(result);
//    }
//
//    @PutMapping(value = "/save")
//    public Result<?> save(
//            @RequestBody Notice notice
//    ) {
//        boolean result = noticeService.saveNotice(notice);
//        return Result.judge(result);
//    }
//
//    @PutMapping(value = "/{ids}")
//    public Result<?> setByIds(
//            @Parameter(description = "通知ID，多个以英文逗号(,)分割") @PathVariable String ids,
//            @Parameter(description = "设置参数 0=发布 1=屏蔽") @RequestParam Integer state
//    ) {
//        boolean result = noticeService.setByIds(ids,state);
//        return Result.judge(result);
//    }
//}
