wangwei 6 年 前
コミット
e9ec4a7c2e

+ 4 - 5
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/provider/ExamStudentCloudServiceProvider.java

@@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.RestController;
 import com.google.common.collect.Lists;
 
 import cn.com.qmth.examcloud.commons.base.exception.StatusException;
-import cn.com.qmth.examcloud.commons.web.helpers.page.PageInfo;
 import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
 import cn.com.qmth.examcloud.core.basic.api.CourseCloudService;
 import cn.com.qmth.examcloud.core.basic.api.OrgCloudService;
@@ -330,7 +329,7 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
 
 		Page<ExamStudentEntity> examStudents = examStudentRepo.findAll(specification, pageRequest);
 
-		List<ExamStudentBean> ret = Lists.newArrayList();
+		List<ExamStudentBean> list = Lists.newArrayList();
 
 		for (ExamStudentEntity cur : examStudents) {
 			ExamEntity exam = examRepo.findOne(cur.getExamId());
@@ -359,12 +358,12 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
 			bean.setSpecialtyName(cur.getSpecialtyName());
 			bean.setExamSite(cur.getExamSite());
 
-			ret.add(bean);
+			list.add(bean);
 		}
-		PageInfo<ExamStudentBean> pageInfo = new PageInfo<ExamStudentBean>(examStudents, ret);
 
 		GetExamStudentPageResp resp = new GetExamStudentPageResp();
-		resp.setPageInfo(pageInfo);
+		resp.setList(list);
+		resp.setTotal(examStudents.getTotalElements());
 
 		return resp;
 	}