|
|
|
@ -226,4 +226,175 @@ public class CourseServiceTest { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + discipline.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询课程专业类 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void queryCourseProfessionalClassTest(){ |
|
|
|
|
Integer disciplineId = 1; |
|
|
|
|
HashMap<String, Object> courseProfessionalClass = courseService.queryCourseProfessionalClass(disciplineId); |
|
|
|
|
for (String s : courseProfessionalClass.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + courseProfessionalClass.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询课程专业 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void queryCourseProfessionalTest(){ |
|
|
|
|
Integer professionalClassId = 2; |
|
|
|
|
HashMap<String, Object> courseProfessional = courseService.queryCourseProfessional(professionalClassId); |
|
|
|
|
for (String s : courseProfessional.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + courseProfessional.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询应用配置 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void queryAppConfigTest(){ |
|
|
|
|
String searchContent = "Python"; |
|
|
|
|
List<Integer> systemId = new ArrayList<>(); |
|
|
|
|
systemId.add(1); |
|
|
|
|
HashMap<String, Object> appConfig = courseService.queryAppConfig(searchContent, systemId); |
|
|
|
|
for (String s : appConfig.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + appConfig.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询实训配置 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void queryTrainingConfigTest(){ |
|
|
|
|
Integer courseId = 85; |
|
|
|
|
HashMap<String, Object> trainingConfig = courseService.queryTrainingConfig(courseId); |
|
|
|
|
for (String s : trainingConfig.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + trainingConfig.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 绑定实训配置 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void addTrainingConfigTest(){ |
|
|
|
|
Course course = new Course(); |
|
|
|
|
course.setSystemId("1"); |
|
|
|
|
course.setCourseId(85); |
|
|
|
|
HashMap<String, Object> trainingConfig = courseService.addTrainingConfig(course); |
|
|
|
|
for (String s : trainingConfig.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + trainingConfig.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询环节详情 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void queryLinkDetailsTest(){ |
|
|
|
|
CourseLink courseLink = new CourseLink(); |
|
|
|
|
courseLink.setProjectId(289); |
|
|
|
|
courseLink.setCourseId(77); |
|
|
|
|
HashMap<String, Object> linkDetails = courseService.queryLinkDetails(courseLink); |
|
|
|
|
for (String s : linkDetails.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + linkDetails.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 更新环节 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void updateLinkTest(){ |
|
|
|
|
CourseLink courseLink = new CourseLink(); |
|
|
|
|
courseLink.setFileLink("www.baidu.com"); |
|
|
|
|
courseLink.setProjectId(1); |
|
|
|
|
courseLink.setLinkName("测试"); |
|
|
|
|
courseLink.setLinkId(1); |
|
|
|
|
HashMap<String, Object> link = courseService.updateLink(courseLink); |
|
|
|
|
for (String s : link.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + link.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 删除实训配置 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void deleteTrainingConfigTest(){ |
|
|
|
|
Course course = new Course(); |
|
|
|
|
course.setCourseId(87); |
|
|
|
|
HashMap<String, Object> deleteTrainingConfig = courseService.deleteTrainingConfig(course); |
|
|
|
|
for (String s : deleteTrainingConfig.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + deleteTrainingConfig.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 是否上架课程控制 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void isShelvesTest(){ |
|
|
|
|
Course course = new Course(); |
|
|
|
|
course.setCourseId(87); |
|
|
|
|
course.setIsShelves(1); |
|
|
|
|
HashMap<String, Object> shelves = courseService.isShelves(course); |
|
|
|
|
for (String s : shelves.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + shelves.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询配置 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void queryConfigTest(){ |
|
|
|
|
String systemId = "1"; |
|
|
|
|
Integer pageNo = 1; |
|
|
|
|
Integer pageSize = 10; |
|
|
|
|
HashMap<String, Object> queryConfig = courseService.queryConfig(systemId, pageNo, pageSize); |
|
|
|
|
for (String s : queryConfig.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + queryConfig.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void platformQueryCourseTest(){ |
|
|
|
|
Integer schoolId = 305; |
|
|
|
|
HashMap<String, Object> platformQueryCourse = courseService.platformQueryCourse(schoolId); |
|
|
|
|
for (String s : platformQueryCourse.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + platformQueryCourse.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取课程 |
|
|
|
|
*/ |
|
|
|
|
@Test |
|
|
|
|
@Transactional |
|
|
|
|
public void getcoueseTest(){ |
|
|
|
|
Integer courseId = 87; |
|
|
|
|
HashMap<String, Object> getcouese = courseService.getcouese(courseId); |
|
|
|
|
for (String s : getcouese.keySet()) { |
|
|
|
|
System.out.println("key:" + s + "," + "value:" + getcouese.get(s)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|