This commit is contained in:
2026-04-23 10:37:18 +08:00
parent 6e087d2b82
commit 473240441f
2 changed files with 11 additions and 0 deletions
@@ -9,12 +9,14 @@ import com.budwk.app.sys.models.Sys_file;
import com.budwk.app.sys.utils.SysFileMinIoUtil;
import com.budwk.app.zhgh.dayofficework.edu.models.EduChapters;
import com.budwk.app.zhgh.dayofficework.edu.models.EduCourses;
import com.budwk.app.zhgh.dayofficework.edu.models.EduStudyRecords;
import com.budwk.app.zhgh.dayofficework.edu.models.EduVideos;
import com.budwk.app.zhgh.dayofficework.edu.service.EduCoursesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
@@ -75,6 +77,14 @@ public class EduCoursesController {
@ApiOperation("删除")
@SLog(tag = "理论学习课程", msg = "删除课程,id:${args[0]}")
public Result deleteCourses(@Param("id") String id) {
//理论学习学习记录表
dao.execute(Sqls.create("delete from edu_study_records where courseId=\'" + id + "\'"));
//理论学习视频表
dao.execute(Sqls.create("delete from edu_videos " +
"where courseId in (select id from from edu_chapters where courseId=\'" + id + "\')"));
//理论学习视频章节表
dao.execute(Sqls.create("delete from edu_chapters where courseId=\'" + id + "\'"));
//理论学习课程表
dao.delete(EduCourses.class, id);
return Result.success();
}