You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
c7-523/AnnouncementController.java

27 lines
928 B

package com.qsd.orange.controller;
import com.qsd.orange.service.AnnouncementService;
import com.qsd.orange.global.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("announcement")
public class AnnouncementController {
@Autowired
private AnnouncementService announcementService;
@GetMapping("all")
public R all(
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
@RequestParam(value = "limit", required = false, defaultValue = "9") Integer limit
){
return R.success().page(announcementService.all(page, limit));
}
}