|
@@ -8,9 +8,9 @@
|
|
package cn.com.qmth.examcloud.core.print.test;
|
|
package cn.com.qmth.examcloud.core.print.test;
|
|
|
|
|
|
import cn.com.qmth.examcloud.core.print.service.CourseStatisticService;
|
|
import cn.com.qmth.examcloud.core.print.service.CourseStatisticService;
|
|
-import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.CourseStatisticRefreshReq;
|
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.CourseStatisticInfo;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.CourseStatisticInfo;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.CourseStatisticQuery;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.CourseStatisticQuery;
|
|
|
|
+import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.CourseStatisticRefreshReq;
|
|
import org.junit.Test;
|
|
import org.junit.Test;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.Page;
|
|
@@ -29,11 +29,11 @@ public class CourseStatisticServiceTest extends BaseTest {
|
|
@Test
|
|
@Test
|
|
public void getCourseStatisticListTest() throws Exception {
|
|
public void getCourseStatisticListTest() throws Exception {
|
|
CourseStatisticQuery query = new CourseStatisticQuery();
|
|
CourseStatisticQuery query = new CourseStatisticQuery();
|
|
- query.setOrgId(1L);
|
|
|
|
- query.setExamId(1L);
|
|
|
|
- query.setCourseId(1L);
|
|
|
|
|
|
+ query.setOrgId(27L);
|
|
|
|
+ query.setExamId(21L);
|
|
|
|
+ query.setCourseId(18L);
|
|
query.setPaperStatus(0);
|
|
query.setPaperStatus(0);
|
|
- //query.setPaperId(1L);
|
|
|
|
|
|
+ //query.setPaperName("测试试卷");
|
|
Page<CourseStatisticInfo> page = courseStatisticService.getCourseStatisticList(query);
|
|
Page<CourseStatisticInfo> page = courseStatisticService.getCourseStatisticList(query);
|
|
System.out.println(jsonMapper.toJson(page));
|
|
System.out.println(jsonMapper.toJson(page));
|
|
}
|
|
}
|
|
@@ -41,16 +41,16 @@ public class CourseStatisticServiceTest extends BaseTest {
|
|
@Test
|
|
@Test
|
|
public void initCourseStatisticTest() throws Exception {
|
|
public void initCourseStatisticTest() throws Exception {
|
|
CourseStatisticRefreshReq req = new CourseStatisticRefreshReq();
|
|
CourseStatisticRefreshReq req = new CourseStatisticRefreshReq();
|
|
- req.setOrgId(109L);
|
|
|
|
- req.setExamId(178L);
|
|
|
|
|
|
+ req.setOrgId(27L);
|
|
|
|
+ req.setExamId(21L);
|
|
List<CourseStatisticRefreshReq.Course> courses = new ArrayList<>();
|
|
List<CourseStatisticRefreshReq.Course> courses = new ArrayList<>();
|
|
- courses.add(new CourseStatisticRefreshReq.Course(262L, "O"));
|
|
|
|
- courses.add(new CourseStatisticRefreshReq.Course(263L, "O"));
|
|
|
|
|
|
+ courses.add(new CourseStatisticRefreshReq.Course(18L, "X"));
|
|
|
|
+ courses.add(new CourseStatisticRefreshReq.Course(19L, "X"));
|
|
req.setCourses(courses);
|
|
req.setCourses(courses);
|
|
courseStatisticService.refreshCourseStatistic(req);
|
|
courseStatisticService.refreshCourseStatistic(req);
|
|
|
|
|
|
//courseStatisticService.initAllCourseStatistic();
|
|
//courseStatisticService.initAllCourseStatistic();
|
|
- //courseStatisticService.syncCourseNameByCourseId(262L, "测试课程");
|
|
|
|
|
|
+ //courseStatisticService.syncCourseNameByCourseId(19L, "测试课程");
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|