公告列表增加默认值

This commit is contained in:
张松
2025-01-09 16:08:01 +08:00
parent a018bb36ed
commit b30d7673d7

View File

@@ -23,7 +23,7 @@ public class AppAnnouncementController {
} }
@GetMapping @GetMapping
public Result get(@RequestParam Integer type) { public Result get(@RequestParam(defaultValue = "0") Integer type) {
PageHelper.startPage(1,1); PageHelper.startPage(1,1);
List<Announcement> list = announcementService.list(new LambdaQueryWrapper<Announcement>() List<Announcement> list = announcementService.list(new LambdaQueryWrapper<Announcement>()
.eq(Announcement::getType, type) .eq(Announcement::getType, type)