forked from liweijie/education
学期新增的时候校验校历功能点添加,否则会有大量的数据重复生成
This commit is contained in:
+5
-3
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user