fix:公告查询接口开发

dev
wangxy 12 months ago
parent 60db10f47e
commit cf4c8aac93

@ -75,4 +75,9 @@ public class SysNoticeManager {
return noticeService.removeByIds(Arrays.asList(noticeIds)); return noticeService.removeByIds(Arrays.asList(noticeIds));
} }
public SysNotice getNotice(){
return noticeService.list().get(0);
}
} }

@ -3,6 +3,8 @@ package com.hyp.web.controller.system;
import java.util.List; import java.util.List;
import com.hyp.web.controller.manager.SysNoticeManager; import com.hyp.web.controller.manager.SysNoticeManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -26,6 +28,7 @@ import com.hyp.system.domain.SysNotice;
* *
* @author ruoyi * @author ruoyi
*/ */
@Api("通知公告")
@RestController @RestController
@RequestMapping("/system/notice") @RequestMapping("/system/notice")
public class SysNoticeController extends BaseController public class SysNoticeController extends BaseController
@ -89,4 +92,11 @@ public class SysNoticeController extends BaseController
{ {
return toAjax(sysNoticeManager.deleteNoticeByIds(noticeIds)); return toAjax(sysNoticeManager.deleteNoticeByIds(noticeIds));
} }
@ApiOperation("查询公告")
@GetMapping("/getNotice")
public AjaxResult getNotice() {
return success(sysNoticeManager.getNotice());
}
} }

Loading…
Cancel
Save