add: 周年纪念日

This commit is contained in:
jsh
2025-10-11 16:18:18 +08:00
parent 8a120a7223
commit ef224aa546
10 changed files with 136 additions and 14 deletions

View File

@@ -0,0 +1,34 @@
package com.dota.nexus.controller;
import com.dota.nexus.entity.Anniversary;
import com.dota.nexus.entity.R;
import com.dota.nexus.service.AnniversaryService;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("anniversary")
public class AnniversaryController {
AnniversaryService anniversaryService;
public AnniversaryController(AnniversaryService anniversaryService) {
this.anniversaryService = anniversaryService;
}
@PostMapping
public R add(Anniversary anniversary) {
anniversaryService.save(anniversary);
return R.ok();
}
@DeleteMapping
public R del(Integer id) {
anniversaryService.removeById(id);
return R.ok();
}
@PutMapping
public R update(Anniversary anniversary) {
anniversaryService.saveOrUpdate(anniversary);
return R.ok();
}
}