|
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.template.api.ClassScheduleAPI;
|
|
import com.template.api.ClassScheduleAPI;
|
|
|
|
|
+import com.template.model.dto.ClassScheduleDto;
|
|
|
import com.template.model.pojo.ClassSchedule;
|
|
import com.template.model.pojo.ClassSchedule;
|
|
|
import com.template.model.result.CommonResult;
|
|
import com.template.model.result.CommonResult;
|
|
|
import com.template.model.vo.ClassListVo;
|
|
import com.template.model.vo.ClassListVo;
|
|
@@ -215,6 +216,19 @@ public class ClassScheduleController implements ClassScheduleAPI {
|
|
|
return CommonResult.ok("删除完成");
|
|
return CommonResult.ok("删除完成");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public CommonResult insertSchedule(ClassScheduleDto scheduleDto) {
|
|
|
|
|
+ ClassSchedule schedule=new ClassSchedule();
|
|
|
|
|
+ schedule.setJsxm(scheduleDto.getJsxm());
|
|
|
|
|
+ schedule.setJsgh(scheduleDto.getJsgh());
|
|
|
|
|
+ schedule.setDateTime(scheduleDto.getDateTime());
|
|
|
|
|
+ boolean save = classScheduleService.save(schedule);
|
|
|
|
|
+ if(!save){
|
|
|
|
|
+ return CommonResult.fail("新增失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ return CommonResult.ok("新增完成");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// @Scheduled(cron = "0 44 11 * * ? ")
|
|
// @Scheduled(cron = "0 44 11 * * ? ")
|
|
|
public void update() {
|
|
public void update() {
|
|
|
// LocalDate localDate = LocalDate.of(2023, 9, 4);
|
|
// LocalDate localDate = LocalDate.of(2023, 9, 4);
|