parent
e16ccd2824
commit
58bcff8987
11 changed files with 732 additions and 317 deletions
@ -1,125 +1,175 @@ |
|||||||
package com.yipin.liuwanr.entity; |
package com.yipin.liuwanr.entity; |
||||||
|
|
||||||
public class Course { |
public class Course { |
||||||
//主键ID
|
//主键ID
|
||||||
private Integer courseId; |
private Integer courseId; |
||||||
//课程名称
|
//课程名称
|
||||||
private String courseName; |
private String courseName; |
||||||
//课程类别
|
//课程类别
|
||||||
private Integer courseType; |
private Integer courseType; |
||||||
//绑定学科id
|
//绑定学科id
|
||||||
private Integer disciplineId; |
private Integer disciplineId; |
||||||
//绑定专业类id
|
//绑定专业类id
|
||||||
private Integer professionalClassId; |
private Integer professionalClassId; |
||||||
//绑定专业id
|
//绑定专业id
|
||||||
private Integer professionalId; |
private Integer professionalId; |
||||||
//预计课时
|
//预计课时
|
||||||
private Integer courseHours; |
private Integer courseHours; |
||||||
//市场价格
|
//市场价格
|
||||||
private double marketPrice; |
private double marketPrice; |
||||||
//课程简介
|
//课程简介
|
||||||
private String courseIntroduction; |
private String courseIntroduction; |
||||||
//教学目标
|
//教学目标
|
||||||
private String teachingGoal; |
private String teachingGoal; |
||||||
//搜索内容
|
//搜索内容
|
||||||
private String searchContent; |
private String searchContent; |
||||||
//绑定系统Id
|
//绑定系统Id
|
||||||
private String systemId; |
private String systemId; |
||||||
//绑定系统名称
|
//绑定系统名称
|
||||||
private String systemName; |
private String systemName; |
||||||
//是否上架
|
//是否上架
|
||||||
private Integer isShelves; |
private Integer isShelves; |
||||||
//创建时间
|
//创建时间
|
||||||
private String creationTime; |
private String creationTime; |
||||||
|
|
||||||
public String getCreationTime() { |
public String getCreationTime() { |
||||||
return creationTime; |
return creationTime; |
||||||
} |
} |
||||||
public void setCreationTime(String creationTime) { |
|
||||||
this.creationTime = creationTime; |
public void setCreationTime(String creationTime) { |
||||||
} |
this.creationTime = creationTime; |
||||||
public String getSystemName() { |
} |
||||||
return systemName; |
|
||||||
} |
public String getSystemName() { |
||||||
public void setSystemName(String systemName) { |
return systemName; |
||||||
this.systemName = systemName; |
} |
||||||
} |
|
||||||
public Integer getIsShelves() { |
public void setSystemName(String systemName) { |
||||||
return isShelves; |
this.systemName = systemName; |
||||||
} |
} |
||||||
public void setIsShelves(Integer isShelves) { |
|
||||||
this.isShelves = isShelves; |
public Integer getIsShelves() { |
||||||
} |
return isShelves; |
||||||
public String getSystemId() { |
} |
||||||
return systemId; |
|
||||||
} |
public void setIsShelves(Integer isShelves) { |
||||||
public void setSystemId(String systemId) { |
this.isShelves = isShelves; |
||||||
this.systemId = systemId; |
} |
||||||
} |
|
||||||
public Integer getCourseId() { |
public String getSystemId() { |
||||||
return courseId; |
return systemId; |
||||||
} |
} |
||||||
public void setCourseId(Integer courseId) { |
|
||||||
this.courseId = courseId; |
public void setSystemId(String systemId) { |
||||||
} |
this.systemId = systemId; |
||||||
public String getCourseName() { |
} |
||||||
return courseName; |
|
||||||
} |
public Integer getCourseId() { |
||||||
public void setCourseName(String courseName) { |
return courseId; |
||||||
this.courseName = courseName; |
} |
||||||
} |
|
||||||
public Integer getCourseType() { |
public void setCourseId(Integer courseId) { |
||||||
return courseType; |
this.courseId = courseId; |
||||||
} |
} |
||||||
public void setCourseType(Integer courseType) { |
|
||||||
this.courseType = courseType; |
public String getCourseName() { |
||||||
} |
return courseName; |
||||||
public Integer getDisciplineId() { |
} |
||||||
return disciplineId; |
|
||||||
} |
public void setCourseName(String courseName) { |
||||||
public void setDisciplineId(Integer disciplineId) { |
this.courseName = courseName; |
||||||
this.disciplineId = disciplineId; |
} |
||||||
} |
|
||||||
public Integer getProfessionalClassId() { |
public Integer getCourseType() { |
||||||
return professionalClassId; |
return courseType; |
||||||
} |
} |
||||||
public void setProfessionalClassId(Integer professionalClassId) { |
|
||||||
this.professionalClassId = professionalClassId; |
public void setCourseType(Integer courseType) { |
||||||
} |
this.courseType = courseType; |
||||||
public Integer getProfessionalId() { |
} |
||||||
return professionalId; |
|
||||||
} |
public Integer getDisciplineId() { |
||||||
public void setProfessionalId(Integer professionalId) { |
return disciplineId; |
||||||
this.professionalId = professionalId; |
} |
||||||
} |
|
||||||
public Integer getCourseHours() { |
public void setDisciplineId(Integer disciplineId) { |
||||||
return courseHours; |
this.disciplineId = disciplineId; |
||||||
} |
} |
||||||
public void setCourseHours(Integer courseHours) { |
|
||||||
this.courseHours = courseHours; |
public Integer getProfessionalClassId() { |
||||||
} |
return professionalClassId; |
||||||
public String getCourseIntroduction() { |
} |
||||||
return courseIntroduction; |
|
||||||
} |
public void setProfessionalClassId(Integer professionalClassId) { |
||||||
public void setCourseIntroduction(String courseIntroduction) { |
this.professionalClassId = professionalClassId; |
||||||
this.courseIntroduction = courseIntroduction; |
} |
||||||
} |
|
||||||
public String getTeachingGoal() { |
public Integer getProfessionalId() { |
||||||
return teachingGoal; |
return professionalId; |
||||||
} |
} |
||||||
public void setTeachingGoal(String teachingGoal) { |
|
||||||
this.teachingGoal = teachingGoal; |
public void setProfessionalId(Integer professionalId) { |
||||||
} |
this.professionalId = professionalId; |
||||||
public String getSearchContent() { |
} |
||||||
return searchContent; |
|
||||||
} |
public Integer getCourseHours() { |
||||||
public void setSearchContent(String searchContent) { |
return courseHours; |
||||||
this.searchContent = searchContent; |
} |
||||||
} |
|
||||||
public double getMarketPrice() { |
public void setCourseHours(Integer courseHours) { |
||||||
return marketPrice; |
this.courseHours = courseHours; |
||||||
} |
} |
||||||
public void setMarketPrice(double marketPrice) { |
|
||||||
this.marketPrice = marketPrice; |
public String getCourseIntroduction() { |
||||||
} |
return courseIntroduction; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCourseIntroduction(String courseIntroduction) { |
||||||
|
this.courseIntroduction = courseIntroduction; |
||||||
|
} |
||||||
|
|
||||||
|
public String getTeachingGoal() { |
||||||
|
return teachingGoal; |
||||||
|
} |
||||||
|
|
||||||
|
public void setTeachingGoal(String teachingGoal) { |
||||||
|
this.teachingGoal = teachingGoal; |
||||||
|
} |
||||||
|
|
||||||
|
public String getSearchContent() { |
||||||
|
return searchContent; |
||||||
|
} |
||||||
|
|
||||||
|
public void setSearchContent(String searchContent) { |
||||||
|
this.searchContent = searchContent; |
||||||
|
} |
||||||
|
|
||||||
|
public double getMarketPrice() { |
||||||
|
return marketPrice; |
||||||
|
} |
||||||
|
|
||||||
|
public void setMarketPrice(double marketPrice) { |
||||||
|
this.marketPrice = marketPrice; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String toString() { |
||||||
|
return "Course{" + |
||||||
|
"courseId=" + courseId + |
||||||
|
", courseName='" + courseName + '\'' + |
||||||
|
", courseType=" + courseType + |
||||||
|
", disciplineId=" + disciplineId + |
||||||
|
", professionalClassId=" + professionalClassId + |
||||||
|
", professionalId=" + professionalId + |
||||||
|
", courseHours=" + courseHours + |
||||||
|
", marketPrice=" + marketPrice + |
||||||
|
", courseIntroduction='" + courseIntroduction + '\'' + |
||||||
|
", teachingGoal='" + teachingGoal + '\'' + |
||||||
|
", searchContent='" + searchContent + '\'' + |
||||||
|
", systemId='" + systemId + '\'' + |
||||||
|
", systemName='" + systemName + '\'' + |
||||||
|
", isShelves=" + isShelves + |
||||||
|
", creationTime='" + creationTime + '\'' + |
||||||
|
'}'; |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -1,102 +1,142 @@ |
|||||||
package com.yipin.liuwanr.entity; |
package com.yipin.liuwanr.entity; |
||||||
|
|
||||||
public class ServiceConfig { |
public class ServiceConfig { |
||||||
|
//主键ID
|
||||||
|
private Integer systemId; |
||||||
|
//系统名称
|
||||||
|
private String systemName; |
||||||
|
//系统类型
|
||||||
|
private Integer systemType; |
||||||
|
//系统归属
|
||||||
|
private Integer systemAttribution; |
||||||
|
//系统状态
|
||||||
|
private Integer systemStatus; |
||||||
|
//搜索内容
|
||||||
|
private String searchContent; |
||||||
|
//项目名称
|
||||||
|
private String projectName; |
||||||
|
//绑定课程Id
|
||||||
|
private Integer courseId; |
||||||
|
//多个系统Id
|
||||||
|
private String systemIds; |
||||||
|
//项目id
|
||||||
|
private Integer projectId; |
||||||
|
//项目是否展示
|
||||||
|
private Integer isShow; |
||||||
|
//系统地址
|
||||||
|
private String systemAddress; |
||||||
|
|
||||||
//主键ID
|
public String getSystemIds() { |
||||||
private Integer systemId; |
return systemIds; |
||||||
//系统名称
|
} |
||||||
private String systemName; |
|
||||||
//系统类型
|
public void setSystemIds(String systemIds) { |
||||||
private Integer systemType; |
this.systemIds = systemIds; |
||||||
//系统归属
|
} |
||||||
private Integer systemAttribution; |
|
||||||
//系统状态
|
public String getSystemAddress() { |
||||||
private Integer systemStatus; |
return systemAddress; |
||||||
//搜索内容
|
} |
||||||
private String searchContent; |
|
||||||
//项目名称
|
public void setSystemAddress(String systemAddress) { |
||||||
private String projectName; |
this.systemAddress = systemAddress; |
||||||
//绑定课程Id
|
} |
||||||
private Integer courseId; |
|
||||||
//多个系统Id
|
public Integer getIsShow() { |
||||||
private String systemIds; |
return isShow; |
||||||
//项目id
|
} |
||||||
private Integer projectId; |
|
||||||
//项目是否展示
|
public void setIsShow(Integer isShow) { |
||||||
private Integer isShow; |
this.isShow = isShow; |
||||||
//系统地址
|
} |
||||||
private String systemAddress; |
|
||||||
|
public Integer getProjectId() { |
||||||
public String getSystemIds() { |
return projectId; |
||||||
return systemIds; |
} |
||||||
} |
|
||||||
public void setSystemIds(String systemIds) { |
public void setProjectId(Integer projectId) { |
||||||
this.systemIds = systemIds; |
this.projectId = projectId; |
||||||
} |
} |
||||||
public String getSystemAddress() { |
|
||||||
return systemAddress; |
public Integer getCourseId() { |
||||||
} |
return courseId; |
||||||
public void setSystemAddress(String systemAddress) { |
} |
||||||
this.systemAddress = systemAddress; |
|
||||||
} |
public void setCourseId(Integer courseId) { |
||||||
public Integer getIsShow() { |
this.courseId = courseId; |
||||||
return isShow; |
} |
||||||
} |
|
||||||
public void setIsShow(Integer isShow) { |
public String getProjectName() { |
||||||
this.isShow = isShow; |
return projectName; |
||||||
} |
} |
||||||
public Integer getProjectId() { |
|
||||||
return projectId; |
public void setProjectName(String projectName) { |
||||||
} |
this.projectName = projectName; |
||||||
public void setProjectId(Integer projectId) { |
} |
||||||
this.projectId = projectId; |
|
||||||
} |
public Integer getSystemId() { |
||||||
public Integer getCourseId() { |
return systemId; |
||||||
return courseId; |
} |
||||||
} |
|
||||||
public void setCourseId(Integer courseId) { |
public void setSystemId(Integer systemId) { |
||||||
this.courseId = courseId; |
this.systemId = systemId; |
||||||
} |
} |
||||||
public String getProjectName() { |
|
||||||
return projectName; |
public String getSystemName() { |
||||||
} |
return systemName; |
||||||
public void setProjectName(String projectName) { |
} |
||||||
this.projectName = projectName; |
|
||||||
} |
public void setSystemName(String systemName) { |
||||||
public Integer getSystemId() { |
this.systemName = systemName; |
||||||
return systemId; |
} |
||||||
} |
|
||||||
public void setSystemId(Integer systemId) { |
public Integer getSystemType() { |
||||||
this.systemId = systemId; |
return systemType; |
||||||
} |
} |
||||||
public String getSystemName() { |
|
||||||
return systemName; |
public void setSystemType(Integer systemType) { |
||||||
} |
this.systemType = systemType; |
||||||
public void setSystemName(String systemName) { |
} |
||||||
this.systemName = systemName; |
|
||||||
} |
public Integer getSystemAttribution() { |
||||||
public Integer getSystemType() { |
return systemAttribution; |
||||||
return systemType; |
} |
||||||
} |
|
||||||
public void setSystemType(Integer systemType) { |
public void setSystemAttribution(Integer systemAttribution) { |
||||||
this.systemType = systemType; |
this.systemAttribution = systemAttribution; |
||||||
} |
} |
||||||
public Integer getSystemAttribution() { |
|
||||||
return systemAttribution; |
public Integer getSystemStatus() { |
||||||
} |
return systemStatus; |
||||||
public void setSystemAttribution(Integer systemAttribution) { |
} |
||||||
this.systemAttribution = systemAttribution; |
|
||||||
} |
public void setSystemStatus(Integer systemStatus) { |
||||||
public Integer getSystemStatus() { |
this.systemStatus = systemStatus; |
||||||
return systemStatus; |
} |
||||||
} |
|
||||||
public void setSystemStatus(Integer systemStatus) { |
public String getSearchContent() { |
||||||
this.systemStatus = systemStatus; |
return searchContent; |
||||||
} |
} |
||||||
public String getSearchContent() { |
|
||||||
return searchContent; |
public void setSearchContent(String searchContent) { |
||||||
} |
this.searchContent = searchContent; |
||||||
public void setSearchContent(String searchContent) { |
} |
||||||
this.searchContent = searchContent; |
|
||||||
} |
@Override |
||||||
|
public String toString() { |
||||||
|
return "ServiceConfig{" + |
||||||
|
"systemId=" + systemId + |
||||||
|
", systemName='" + systemName + '\'' + |
||||||
|
", systemType=" + systemType + |
||||||
|
", systemAttribution=" + systemAttribution + |
||||||
|
", systemStatus=" + systemStatus + |
||||||
|
", searchContent='" + searchContent + '\'' + |
||||||
|
", projectName='" + projectName + '\'' + |
||||||
|
", courseId=" + courseId + |
||||||
|
", systemIds='" + systemIds + '\'' + |
||||||
|
", projectId=" + projectId + |
||||||
|
", isShow=" + isShow + |
||||||
|
", systemAddress='" + systemAddress + '\'' + |
||||||
|
'}'; |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -0,0 +1,37 @@ |
|||||||
|
package com.yipin.liuwanr; |
||||||
|
|
||||||
|
import com.yipin.liuwanr.service.AssesmentRecordService; |
||||||
|
import com.yipin.liuwanr.vo.AssesmentRecordVo; |
||||||
|
import org.junit.Test; |
||||||
|
import org.junit.runner.RunWith; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.boot.test.context.SpringBootTest; |
||||||
|
import org.springframework.test.context.junit4.SpringRunner; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
|
||||||
|
@RunWith(SpringRunner.class) |
||||||
|
@SpringBootTest |
||||||
|
public class AssesmentRecordServiceTest { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private AssesmentRecordService assesmentRecordService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据课程id查询学生信息 |
||||||
|
* studentId, courseId |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
public void testQueryCity() { |
||||||
|
HashMap<String, Object> map = assesmentRecordService.queryStudentAssessment(68, 72); |
||||||
|
Integer retcode = (Integer) map.get("retcode"); |
||||||
|
System.out.println(retcode); |
||||||
|
if (retcode == 200) { |
||||||
|
AssesmentRecordVo assesmentRecordVo = (AssesmentRecordVo) map.get("retvalue"); |
||||||
|
System.out.println(assesmentRecordVo.toString()); |
||||||
|
} else { |
||||||
|
String msg = (String) map.get("retvalue"); |
||||||
|
System.out.println(msg); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,230 @@ |
|||||||
|
package com.yipin.liuwanr; |
||||||
|
|
||||||
|
import com.yipin.liuwanr.entity.Course; |
||||||
|
import com.yipin.liuwanr.entity.CourseLink; |
||||||
|
import com.yipin.liuwanr.entity.CoursePermissions; |
||||||
|
import com.yipin.liuwanr.entity.ServiceConfig; |
||||||
|
import com.yipin.liuwanr.mapper.CoursePermissionsMapper; |
||||||
|
import com.yipin.liuwanr.service.CoursePermissionsService; |
||||||
|
import org.junit.Test; |
||||||
|
import org.junit.runner.RunWith; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.boot.test.context.SpringBootTest; |
||||||
|
import org.springframework.test.context.junit4.SpringRunner; |
||||||
|
import org.springframework.transaction.annotation.Transactional; |
||||||
|
|
||||||
|
import java.util.HashMap; |
||||||
|
|
||||||
|
@RunWith(SpringRunner.class) |
||||||
|
@SpringBootTest |
||||||
|
public class CoursePermissionsServiceTest { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private CoursePermissionsService coursePermissionsService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private CoursePermissionsMapper coursePermissionsMapper; |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增课程权限 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
@Transactional |
||||||
|
public void testAddCoursePermissions() { |
||||||
|
CoursePermissions coursePermissions = new CoursePermissions(); |
||||||
|
coursePermissions.setUsePeriod(30); |
||||||
|
coursePermissions.setMarketPrice(12.8); |
||||||
|
coursePermissions.setTransactionPrice(90); |
||||||
|
coursePermissions.setDiscount(703); |
||||||
|
coursePermissions.setPortAddressId(1); |
||||||
|
coursePermissions.setIsDeliverGoods(0); |
||||||
|
coursePermissions.setCourseId(77); |
||||||
|
coursePermissions.setOrderId(117); |
||||||
|
|
||||||
|
HashMap<String, Object> map = coursePermissionsService.addCoursePermissions(coursePermissions); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询课程详情 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
public void testQueryCourseDetails() { |
||||||
|
HashMap<String, Object> map = coursePermissionsService.queryCourseDetails(84); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
/*Integer retcode = (Integer) map.get("retcode"); |
||||||
|
System.out.println(retcode); |
||||||
|
if (retcode == 200) { |
||||||
|
List<Course> classes = (List<Course>) map.get("retvalue"); |
||||||
|
classes.forEach(item -> { |
||||||
|
System.out.println(item.toString()); |
||||||
|
}); |
||||||
|
} else { |
||||||
|
String msg = (String) map.get("retvalue"); |
||||||
|
System.out.println(msg); |
||||||
|
}*/ |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除课程 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
@Transactional |
||||||
|
public void testDeleteCourse() { |
||||||
|
HashMap<String, Object> map = coursePermissionsService.deleteCourse(84); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改课程 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
@Transactional |
||||||
|
public void testUpdateCourse() { |
||||||
|
Course course = new Course(); |
||||||
|
course.setCourseId(84); |
||||||
|
course.setCourseName("Python程序设计实训课(测试2)"); |
||||||
|
course.setCourseType(2); |
||||||
|
course.setDisciplineId(1); |
||||||
|
course.setProfessionalClassId(1); |
||||||
|
course.setProfessionalId(7); |
||||||
|
course.setCourseHours(1); |
||||||
|
course.setMarketPrice(12.8); |
||||||
|
course.setCourseIntroduction("一门学习python编程的基础实训课"); |
||||||
|
course.setTeachingGoal("掌握Python编程的基础语法"); |
||||||
|
HashMap<String, Object> map = coursePermissionsService.updateCourse(course); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询学科 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
public void testQueryCourseDiscipline() { |
||||||
|
HashMap<String, Object> map = coursePermissionsService.queryCourseDiscipline(); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询课程专业班级 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
public void testQueryCourseProfessionalClass() { |
||||||
|
HashMap<String, Object> map = coursePermissionsService.queryCourseProfessionalClass(1); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询课程专业 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
public void testQueryCourseProfessional() { |
||||||
|
HashMap<String, Object> map = coursePermissionsService.queryCourseProfessional(1); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询APP配置 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
public void testQueryAppConfig() { |
||||||
|
ServiceConfig serviceConfig = new ServiceConfig(); |
||||||
|
HashMap<String, Object> map = coursePermissionsService.queryAppConfig(serviceConfig); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询练习配置 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
public void queryTrainingConfig() { |
||||||
|
Integer courseId = 77; |
||||||
|
Integer pageNo = 1; |
||||||
|
Integer pageSize = 10; |
||||||
|
HashMap<String, Object> map = coursePermissionsService.queryTrainingConfig(courseId, pageNo, pageSize); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增练习配置 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
@Transactional |
||||||
|
public void addTrainingConfig() { |
||||||
|
Course course = new Course(); |
||||||
|
course.setCourseId(77); |
||||||
|
course.setCourseName("Python程序设计实训课(测试2)"); |
||||||
|
course.setCourseType(2); |
||||||
|
course.setDisciplineId(1); |
||||||
|
course.setProfessionalClassId(1); |
||||||
|
course.setProfessionalId(7); |
||||||
|
course.setCourseHours(1); |
||||||
|
course.setMarketPrice(12.8); |
||||||
|
course.setCourseIntroduction("一门学习python编程的基础实训课"); |
||||||
|
course.setTeachingGoal("掌握Python编程的基础语法"); |
||||||
|
HashMap<String, Object> map = coursePermissionsService.addTrainingConfig(course); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询链接详情 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
public void queryLinkDetails() { |
||||||
|
Integer linkId = 9; |
||||||
|
HashMap<String, Object> map = coursePermissionsService.queryLinkDetails(linkId); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改链接 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
@Transactional |
||||||
|
public void updateLink() { |
||||||
|
CourseLink courseLink = new CourseLink(); |
||||||
|
courseLink.setFileLink("qweqweqwe"); |
||||||
|
courseLink.setLinkName("qweqewqe"); |
||||||
|
courseLink.setProjectId(12); |
||||||
|
courseLink.setLinkId(3); |
||||||
|
HashMap<String, Object> map = coursePermissionsService.updateLink(courseLink); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除练习配置 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
@Transactional |
||||||
|
public void deleteTrainingConfig() { |
||||||
|
Course course = new Course(); |
||||||
|
course.setCourseId(77); |
||||||
|
HashMap<String, Object> map = coursePermissionsService.deleteTrainingConfig(course); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 选择是否展示 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
@Transactional |
||||||
|
public void isShow() { |
||||||
|
Course course = new Course(); |
||||||
|
course.setCourseId(77); |
||||||
|
HashMap<String, Object> map = coursePermissionsService.isShow(course); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 选择是否上架 |
||||||
|
*/ |
||||||
|
@Test |
||||||
|
@Transactional |
||||||
|
public void isShelves() { |
||||||
|
Course course = new Course(); |
||||||
|
course.setCourseId(77); |
||||||
|
HashMap<String, Object> map = coursePermissionsService.isShelves(course); |
||||||
|
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue