学期新增的时候校验校历功能点添加,否则会有大量的数据重复生成

This commit is contained in:
2026-09-14 17:24:56 +08:00
parent 52a04dbf60
commit 5187435285
9 changed files with 352 additions and 87 deletions
@@ -20,11 +20,13 @@ public class SemesterCalendarController {
private SemesterCalendarService semesterCalendarService;
/**
* 新增学期校历
* 预生成学期校历(幂等)。nd 为 6 位学期代号,为空时后端按日期在「学期」表反查。
*/
@PostMapping("/add")
public Result<Void> add(@RequestParam("startDate") String startDate,@RequestParam("endDate") String endDate) {
semesterCalendarService.add(startDate,endDate);
public Result<Void> add(@RequestParam("startDate") String startDate,
@RequestParam("endDate") String endDate,
@RequestParam(value = "nd", required = false) Integer nd) {
semesterCalendarService.add(startDate, endDate, nd);
return Result.success();
}