1
This commit is contained in:
+10
@@ -9,12 +9,14 @@ import com.budwk.app.sys.models.Sys_file;
|
|||||||
import com.budwk.app.sys.utils.SysFileMinIoUtil;
|
import com.budwk.app.sys.utils.SysFileMinIoUtil;
|
||||||
import com.budwk.app.zhgh.dayofficework.edu.models.EduChapters;
|
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.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.models.EduVideos;
|
||||||
import com.budwk.app.zhgh.dayofficework.edu.service.EduCoursesService;
|
import com.budwk.app.zhgh.dayofficework.edu.service.EduCoursesService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
@@ -75,6 +77,14 @@ public class EduCoursesController {
|
|||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@SLog(tag = "理论学习课程", msg = "删除课程,id:${args[0]}")
|
@SLog(tag = "理论学习课程", msg = "删除课程,id:${args[0]}")
|
||||||
public Result deleteCourses(@Param("id") String id) {
|
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);
|
dao.delete(EduCourses.class, id);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:on-preview="handlePreview"
|
:on-preview="handlePreview"
|
||||||
:on-exceed="handleExceed"
|
:on-exceed="handleExceed"
|
||||||
|
:on-remove="handleRemove"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:limit="upload_number"
|
:limit="upload_number"
|
||||||
:accept="fileAccept"
|
:accept="fileAccept"
|
||||||
|
|||||||
Reference in New Issue
Block a user