add: 获取未来的重要日子,获取过去的重要日子
This commit is contained in:
@@ -15,16 +15,24 @@ public class AnniversaryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有周年日和纪念日
|
||||
* 获取未来所有周年日和纪念日
|
||||
*/
|
||||
@GetMapping
|
||||
public R get() {
|
||||
return R.ok(anniversaryService.getAll());
|
||||
@GetMapping("future")
|
||||
public R getFuture() {
|
||||
return R.ok(anniversaryService.getFuture());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取过去的纪念日
|
||||
*/
|
||||
@GetMapping("past")
|
||||
public R getPast() {
|
||||
return R.ok(anniversaryService.getPast());
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public R add(Anniversary anniversary) {
|
||||
anniversaryService.save(anniversary);
|
||||
anniversaryService.saveOrUpdate(anniversary);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user