|
|
|
@ -4,9 +4,7 @@ import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import com.sztzjy.resource_center.annotation.AnonymousAccess;
|
|
|
|
|
import com.sztzjy.resource_center.config.Constant;
|
|
|
|
|
import com.sztzjy.resource_center.entity.*;
|
|
|
|
|
import com.sztzjy.resource_center.mapper.SysOneCatalogMapper;
|
|
|
|
|
import com.sztzjy.resource_center.mapper.SysThreeCatalogMapper;
|
|
|
|
|
import com.sztzjy.resource_center.mapper.SysTwoCatalogMapper;
|
|
|
|
|
import com.sztzjy.resource_center.mapper.*;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -15,7 +13,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@Api(tags = "课程方面API")
|
|
|
|
@ -27,6 +25,16 @@ public class CourseApi {
|
|
|
|
|
SysOneCatalogMapper oneCatalogMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
SysThreeCatalogMapper threeCatalogMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
SysTopicAndCourseMapper sysTopicAndCourseMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
SysResourceAndCourseMapper sysResourceAndCourseMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
SysResourceMapper sysResourceMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
SysObjectiveQuestionsMapper sysObjectiveQuestionsMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
SysCaseQuestionMapper sysCaseQuestionMapper;
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@ApiOperation("查看二级目录")
|
|
|
|
@ -115,6 +123,15 @@ public class CourseApi {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
twoCatalogMapper.deleteByPrimaryKey(twoId);
|
|
|
|
|
//删除资源
|
|
|
|
|
SysResourceAndCourseExample example1 = new SysResourceAndCourseExample();
|
|
|
|
|
example1.createCriteria().andTwoIdEqualTo(twoId);
|
|
|
|
|
sysResourceAndCourseMapper.deleteByExample(example1);
|
|
|
|
|
|
|
|
|
|
//删除题目
|
|
|
|
|
SysTopicAndCourseExample example = new SysTopicAndCourseExample();
|
|
|
|
|
example.createCriteria().andTwoIdEqualTo(twoId);
|
|
|
|
|
sysTopicAndCourseMapper.deleteByExample(example);
|
|
|
|
|
return true;
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
@ -217,6 +234,6 @@ public class CourseApi {
|
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(systemOwner);
|
|
|
|
|
String oneId = sysOneCatalogs.getOneId();
|
|
|
|
|
return threeCatalogMapper.selectNameByCourseID(schoolId,oneId);
|
|
|
|
|
return threeCatalogMapper.selectNameByCourseID(schoolId, oneId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|