Browse Source

Merge remote-tracking branch 'origin/master'

Joburgess 5 years ago
parent
commit
668475acc0

+ 9 - 0
edu-im/edu-im-api/src/main/java/com/keao/edu/im/api/entity/MemberChangedMessage.java

@@ -16,6 +16,7 @@ public class MemberChangedMessage extends BaseMessage{
     private String roomId;
 //    private String appParamJson;
     private Integer waitNum;
+    private Integer classroomSwitch;
     private String webParamJson;
     private boolean camera;
     private boolean microphone;
@@ -27,6 +28,14 @@ public class MemberChangedMessage extends BaseMessage{
     public MemberChangedMessage() {
     }
 
+    public Integer getClassroomSwitch() {
+        return classroomSwitch;
+    }
+
+    public void setClassroomSwitch(Integer classroomSwitch) {
+        this.classroomSwitch = classroomSwitch;
+    }
+
     public Integer getWaitNum() {
         return waitNum;
     }

+ 10 - 6
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamRegistrationController.java

@@ -7,12 +7,10 @@ import com.keao.edu.common.entity.HttpResponseResult;
 import com.keao.edu.common.page.PageInfo;
 import com.keao.edu.common.page.QueryInfo;
 import com.keao.edu.thirdparty.ocr.Ocr;
-import com.keao.edu.user.dto.ExamRecordDto;
-import com.keao.edu.user.dto.ExamRegistrationDto;
-import com.keao.edu.user.dto.ExamRegistrationRoomDto;
-import com.keao.edu.user.dto.ExamRegistrationStatisticsDto;
+import com.keao.edu.user.dto.*;
 import com.keao.edu.user.entity.Employee;
 import com.keao.edu.user.entity.ExamRegistration;
+import com.keao.edu.user.page.ApplyListQueryInfo;
 import com.keao.edu.user.page.ExamRecordQueryInfo;
 import com.keao.edu.user.page.ExamRegistrationQueryInfo;
 import com.keao.edu.user.service.EmployeeService;
@@ -67,13 +65,19 @@ public class ExamRegistrationController extends BaseController {
 
     @ApiOperation(value = "学生端学员报名记录查询")
     @GetMapping(value = "applyList")
-    public HttpResponseResult<PageInfo<ExamRegistrationDto>> applyList(QueryInfo queryInfo) {
+    public HttpResponseResult<PageInfo<ExamRegistrationDto>> applyList(ApplyListQueryInfo queryInfo) {
         return succeed(examRegistrationService.applyList(queryInfo));
     }
 
+    @ApiOperation(value = "学生端考级曲库考试列表")
+    @GetMapping(value = "studentBaseExams")
+    public HttpResponseResult<PageInfo<StudentBaseExamsDto>> studentBaseExams(QueryInfo queryInfo) {
+        return succeed(examRegistrationService.studentBaseExams(queryInfo));
+    }
+
     @ApiOperation(value = "学生端获取学员考试记录")
     @GetMapping(value = "examList")
-    public HttpResponseResult<PageInfo<ExamRecordDto>> examList(ExamRecordQueryInfo queryInfo) {
+    public HttpResponseResult<PageInfo<StudentExamListDto>> examList(ExamRecordQueryInfo queryInfo) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         queryInfo.setStudentId(sysUser.getId());
         return succeed(examRegistrationService.examList(queryInfo));

+ 16 - 5
edu-user/edu-user-server/src/main/java/com/keao/edu/user/dao/ExamRegistrationDao.java

@@ -2,10 +2,7 @@ package com.keao.edu.user.dao;
 
 
 import com.keao.edu.common.dal.BaseDAO;
-import com.keao.edu.user.dto.ExamRecordDto;
-import com.keao.edu.user.dto.ExamRegistrationDto;
-import com.keao.edu.user.dto.ExamRegistrationRoomDto;
-import com.keao.edu.user.dto.ExamRegistrationStatisticsDto;
+import com.keao.edu.user.dto.*;
 import com.keao.edu.user.entity.ExamRegistration;
 import com.keao.edu.user.enums.StudentRegistrationStatusEnum;
 import org.apache.ibatis.annotations.Param;
@@ -108,7 +105,7 @@ public interface ExamRegistrationDao extends BaseDAO<Long, ExamRegistration> {
      * @param params
      * @return
      */
-    List<ExamRecordDto> queryExamList(Map<String, Object> params);
+    List<StudentExamListDto> queryExamList(Map<String, Object> params);
 
     /**
      * @param params
@@ -150,4 +147,18 @@ public interface ExamRegistrationDao extends BaseDAO<Long, ExamRegistration> {
      * @return
      */
     List<Integer> queryStudentTenantId(Integer userId);
+
+    /**
+     * 学生端考级曲库考试列表
+     * @param params
+     * @return
+     */
+    int countStudentBaseExams(Map<String, Object> params);
+
+    /**
+     * 学生端考级曲库考试列表
+     * @param params
+     * @return
+     */
+    List<StudentBaseExamsDto> queryStudentBaseExams(Map<String, Object> params);
 }

+ 28 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/dto/StudentBaseExamsDto.java

@@ -0,0 +1,28 @@
+package com.keao.edu.user.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+
+public class StudentBaseExamsDto {
+
+    @ApiModelProperty(value = "考试名")
+    private String baseExamName;
+
+    @ApiModelProperty(value = "机构编号")
+    private Integer tenantId;
+
+    public String getBaseExamName() {
+        return baseExamName;
+    }
+
+    public void setBaseExamName(String baseExamName) {
+        this.baseExamName = baseExamName;
+    }
+
+    public Integer getTenantId() {
+        return tenantId;
+    }
+
+    public void setTenantId(Integer tenantId) {
+        this.tenantId = tenantId;
+    }
+}

+ 196 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/dto/StudentExamListDto.java

@@ -0,0 +1,196 @@
+package com.keao.edu.user.dto;
+
+import com.keao.edu.user.api.enums.ExamEvaluationResultEnum;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class StudentExamListDto{
+    @ApiModelProperty(value = "实际考试开始时间")
+    private java.util.Date actualExamStartTime;
+
+    @ApiModelProperty(value = "实际考试结束时间")
+    private java.util.Date actualExamEndTime;
+
+    @ApiModelProperty(value = "考试项目名称")
+    private String examBaseName;
+
+    @ApiModelProperty(value = "考级项目编号")
+    private Long examinationBasicId;
+
+    @ApiModelProperty(value = "准考证号")
+    private String cardNo;
+
+    @ApiModelProperty(value = "专业")
+    private String subjectName;
+
+    @ApiModelProperty(value = "专业")
+    private Integer subjectId;
+
+    @ApiModelProperty(value = "报考级别")
+    private Integer level;
+
+    @ApiModelProperty(value = "乐理级别")
+    private Integer examMusicTheoryLevel;
+
+    @ApiModelProperty(value = "乐理考级费用")
+    private BigDecimal theoryLevelFee;
+
+    @ApiModelProperty(value = "考试地点")
+    private String examAddress;
+
+    @ApiModelProperty(value = "准考证编号")
+    private String examCertificationId;
+
+    @ApiModelProperty(value = "学员报考编号")
+    private Long examRegistrationId;
+
+    @ApiModelProperty(value = "考试结果")
+    private ExamEvaluationResultEnum result;
+
+    @ApiModelProperty(value = "教师评审均分")
+    private Float avgScore;
+
+    @ApiModelProperty(value = "是否参与考试")
+    private Integer isFinishedExam;
+
+    @ApiModelProperty(value = "视频连接")
+    private String videoUrl;
+
+    public String getCardNo() {
+        return cardNo;
+    }
+
+    public void setCardNo(String cardNo) {
+        this.cardNo = cardNo;
+    }
+
+    public Integer getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Integer subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public Date getActualExamStartTime() {
+        return actualExamStartTime;
+    }
+
+    public void setActualExamStartTime(Date actualExamStartTime) {
+        this.actualExamStartTime = actualExamStartTime;
+    }
+
+    public Date getActualExamEndTime() {
+        return actualExamEndTime;
+    }
+
+    public void setActualExamEndTime(Date actualExamEndTime) {
+        this.actualExamEndTime = actualExamEndTime;
+    }
+
+    public String getExamBaseName() {
+        return examBaseName;
+    }
+
+    public void setExamBaseName(String examBaseName) {
+        this.examBaseName = examBaseName;
+    }
+
+    public Long getExaminationBasicId() {
+        return examinationBasicId;
+    }
+
+    public void setExaminationBasicId(Long examinationBasicId) {
+        this.examinationBasicId = examinationBasicId;
+    }
+
+    public String getSubjectName() {
+        return subjectName;
+    }
+
+    public void setSubjectName(String subjectName) {
+        this.subjectName = subjectName;
+    }
+
+    public Integer getLevel() {
+        return level;
+    }
+
+    public void setLevel(Integer level) {
+        this.level = level;
+    }
+
+    public Integer getExamMusicTheoryLevel() {
+        return examMusicTheoryLevel;
+    }
+
+    public void setExamMusicTheoryLevel(Integer examMusicTheoryLevel) {
+        this.examMusicTheoryLevel = examMusicTheoryLevel;
+    }
+
+    public BigDecimal getTheoryLevelFee() {
+        return theoryLevelFee;
+    }
+
+    public void setTheoryLevelFee(BigDecimal theoryLevelFee) {
+        this.theoryLevelFee = theoryLevelFee;
+    }
+
+    public String getExamAddress() {
+        return examAddress;
+    }
+
+    public void setExamAddress(String examAddress) {
+        this.examAddress = examAddress;
+    }
+
+    public String getExamCertificationId() {
+        return examCertificationId;
+    }
+
+    public void setExamCertificationId(String examCertificationId) {
+        this.examCertificationId = examCertificationId;
+    }
+
+    public Long getExamRegistrationId() {
+        return examRegistrationId;
+    }
+
+    public void setExamRegistrationId(Long examRegistrationId) {
+        this.examRegistrationId = examRegistrationId;
+    }
+
+    public ExamEvaluationResultEnum getResult() {
+        return result;
+    }
+
+    public void setResult(ExamEvaluationResultEnum result) {
+        this.result = result;
+    }
+
+    public Float getAvgScore() {
+        return avgScore;
+    }
+
+    public void setAvgScore(Float avgScore) {
+        this.avgScore = avgScore;
+    }
+
+    public Integer getIsFinishedExam() {
+        return isFinishedExam;
+    }
+
+    public void setIsFinishedExam(Integer isFinishedExam) {
+        this.isFinishedExam = isFinishedExam;
+    }
+
+    public String getVideoUrl() {
+        return videoUrl;
+    }
+
+    public void setVideoUrl(String videoUrl) {
+        this.videoUrl = videoUrl;
+    }
+}

+ 38 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/page/ApplyListQueryInfo.java

@@ -0,0 +1,38 @@
+package com.keao.edu.user.page;
+
+import com.keao.edu.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+public class ApplyListQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "是否缴费",required = false)
+    private Integer paymentStatus;
+
+    private Integer studentId;
+
+    private Long examRegistrationId;
+
+    public Integer getPaymentStatus() {
+        return paymentStatus;
+    }
+
+    public void setPaymentStatus(Integer paymentStatus) {
+        this.paymentStatus = paymentStatus;
+    }
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+
+    public Long getExamRegistrationId() {
+        return examRegistrationId;
+    }
+
+    public void setExamRegistrationId(Long examRegistrationId) {
+        this.examRegistrationId = examRegistrationId;
+    }
+}

+ 11 - 6
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/ExamRegistrationService.java

@@ -4,11 +4,9 @@ package com.keao.edu.user.service;
 import com.keao.edu.common.page.PageInfo;
 import com.keao.edu.common.page.QueryInfo;
 import com.keao.edu.common.service.BaseService;
-import com.keao.edu.user.dto.ExamRecordDto;
-import com.keao.edu.user.dto.ExamRegistrationDto;
-import com.keao.edu.user.dto.ExamRegistrationRoomDto;
-import com.keao.edu.user.dto.ExamRegistrationStatisticsDto;
+import com.keao.edu.user.dto.*;
 import com.keao.edu.user.entity.ExamRegistration;
+import com.keao.edu.user.page.ApplyListQueryInfo;
 import com.keao.edu.user.page.ExamRecordQueryInfo;
 import com.keao.edu.user.page.ExamRegistrationQueryInfo;
 
@@ -43,14 +41,14 @@ public interface ExamRegistrationService extends BaseService<Long, ExamRegistrat
     * @param queryInfo
     * @return
     */
-   PageInfo<ExamRegistrationDto> applyList(QueryInfo queryInfo);
+   PageInfo<ExamRegistrationDto> applyList(ApplyListQueryInfo queryInfo);
 
    /**
     * 考试记录
     * @param queryInfo
     * @return
     */
-   PageInfo<ExamRecordDto> examList(ExamRecordQueryInfo queryInfo);
+   PageInfo<StudentExamListDto> examList(ExamRecordQueryInfo queryInfo);
 
 
    /**
@@ -67,4 +65,11 @@ public interface ExamRegistrationService extends BaseService<Long, ExamRegistrat
     * @return
     */
    Map<String,Object> repay(Integer userId,String orderNo) throws Exception;
+
+   /**
+    * 学生端考级曲库考试列表
+    * @param queryInfo
+    * @return
+    */
+   PageInfo<StudentBaseExamsDto> studentBaseExams(QueryInfo queryInfo);
 }

+ 28 - 14
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamRegistrationServiceImpl.java

@@ -14,14 +14,12 @@ import com.keao.edu.common.service.impl.BaseServiceImpl;
 import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
 import com.keao.edu.thirdparty.message.provider.YimeiSmsPlugin;
 import com.keao.edu.user.dao.*;
-import com.keao.edu.user.dto.ExamRecordDto;
-import com.keao.edu.user.dto.ExamRegistrationDto;
-import com.keao.edu.user.dto.ExamRegistrationRoomDto;
-import com.keao.edu.user.dto.ExamRegistrationStatisticsDto;
+import com.keao.edu.user.dto.*;
 import com.keao.edu.user.entity.*;
 import com.keao.edu.user.enums.ExamStatusEnum;
 import com.keao.edu.user.enums.StudentRegistrationStatusEnum;
 import com.keao.edu.user.enums.TransStatusEnum;
+import com.keao.edu.user.page.ApplyListQueryInfo;
 import com.keao.edu.user.page.ExamRecordQueryInfo;
 import com.keao.edu.user.page.ExamRegistrationQueryInfo;
 import com.keao.edu.user.service.ExamRegistrationPaymentService;
@@ -219,7 +217,7 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
     }
 
     @Override
-    public PageInfo<ExamRegistrationDto> applyList(QueryInfo queryInfo) {
+    public PageInfo<ExamRegistrationDto> applyList(ApplyListQueryInfo queryInfo) {
         PageInfo<ExamRegistrationDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
         Map<String, Object> params = new HashMap<String, Object>();
         MapUtil.populateMap(params, queryInfo);
@@ -246,27 +244,21 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
     }
 
     @Override
-    public PageInfo<ExamRecordDto> examList(ExamRecordQueryInfo queryInfo) {
-        PageInfo<ExamRecordDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+    public PageInfo<StudentExamListDto> examList(ExamRecordQueryInfo queryInfo) {
+        PageInfo<StudentExamListDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
         Map<String, Object> params = new HashMap<String, Object>();
         MapUtil.populateMap(params, queryInfo);
 
-        List<ExamRecordDto> dataList = null;
+        List<StudentExamListDto> dataList = null;
         int count = examRegistrationDao.countExamList(params);
         if (count > 0) {
             pageInfo.setTotal(count);
             params.put("offset", pageInfo.getOffset());
             dataList = examRegistrationDao.queryExamList(params);
             List<Integer> subjectIds = dataList.stream().map(e -> e.getSubjectId()).collect(Collectors.toList());
-            List<Long> basicIds = dataList.stream().map(e -> e.getExaminationBasicId()).collect(Collectors.toList());
-            List<Integer> registrationIds = dataList.stream().map(e -> e.getId()).collect(Collectors.toList());
             Map<Integer, String> subjectNameMap = this.getMap("subject", "id_", "name_", subjectIds, Integer.class, String.class);
-            Map<Integer, String> examNameMap = this.getMap("examination_basic", "id_", "name_", basicIds, Integer.class, String.class);
-            Map<Integer, String> certificationNameMap = this.getMap("exam_certification", "exam_registration_id_", "card_no_", registrationIds, Integer.class, String.class);
             dataList.forEach(e -> {
                 e.setSubjectName(subjectNameMap.get(e.getSubjectId()));
-                e.setExamBaseName(examNameMap.get(e.getExaminationBasicId()));
-                e.setCardNo(certificationNameMap.get(e.getId()));
             });
         }
         if (count == 0) {
@@ -358,4 +350,26 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
         rpMap.put("payMap", payMap);
         return rpMap;
     }
+
+    @Override
+    public PageInfo<StudentBaseExamsDto> studentBaseExams(QueryInfo queryInfo) {
+        PageInfo<StudentBaseExamsDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+        Map<String, Object> params = new HashMap<>();
+        MapUtil.populateMap(params, queryInfo);
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        params.put("studentId",sysUser.getId());
+        List<StudentBaseExamsDto> dataList = null;
+        params.put("paymentStatus",1);
+        int count = examRegistrationDao.countStudentBaseExams(params);
+        if (count > 0) {
+            pageInfo.setTotal(count);
+            params.put("offset", pageInfo.getOffset());
+            dataList = examRegistrationDao.queryStudentBaseExams(params);
+        }
+        if (count == 0) {
+            dataList = new ArrayList<>();
+        }
+        pageInfo.setRows(dataList);
+        return pageInfo;
+    }
 }

+ 3 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamRoomStudentRelationServiceImpl.java

@@ -340,7 +340,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 			//关闭学员房间入口
 			examRoomStudentRelation.setClassroomSwitch(0);
 			examRoomStudentRelationDao.update(examRoomStudentRelation);
-//			publishMessage(examRoomStudentRelation,MemberChangedMessage.Student_Queue,isPush);
+			publishMessage(examRoomStudentRelation,MemberChangedMessage.Student_Queue,isPush);
 		}
 		nextStudent(nextExamRoomStudentRelationId,false);
 
@@ -376,6 +376,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 //		String jsonString = JSONObject.toJSONString(examCertificationService.needCheckingDetail(examRoomStudentRelation.getExamRegistrationId()));
 		NeedCheckingDetailDto needCheckingDetailDto = examCertificationService.needCheckingDetail(examRoomStudentRelation.getExamRegistrationId());
 		msg.setWaitNum(needCheckingDetailDto.getWaitNum());
+		msg.setClassroomSwitch(needCheckingDetailDto.getClassroomSwitch());
 //		msg.setAppParamJson(jsonString);
 		Map<String,Object> paramMap = new HashMap<>(2);
 		this.queryNeedCheckingList(examRoomStudentRelation.getExamRoomId());
@@ -397,6 +398,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 //		msg.setAppParamJson(jsonString);
 		NeedCheckingDetailDto needCheckingDetailDto = examCertificationService.needCheckingDetail(examRoomStudentRelation.getExamRegistrationId());
 		msg.setWaitNum(needCheckingDetailDto.getWaitNum());
+		msg.setClassroomSwitch(needCheckingDetailDto.getClassroomSwitch());
 		Map<String,Object> paramMap = new HashMap<>(2);
 		this.queryNeedCheckingList(examRoomStudentRelation.getExamRoomId());
 		paramMap.put("studentQueue",this.queryNeedCheckingList(examRoomStudentRelation.getExamRoomId()));

+ 1 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamSongServiceImpl.java

@@ -85,7 +85,7 @@ public class ExamSongServiceImpl extends BaseServiceImpl<Integer, ExamSong> impl
         }
         Map<String, Object> params = new HashMap<String, Object>();
         MapUtil.populateMap(params, queryInfo);
-        params.put("tenantIds",tenantIds);
+//        params.put("tenantIds",tenantIds);
 
         List<ExamSong> dataList = new ArrayList<>();
         int count = examSongDao.countSongPage(params);

+ 50 - 11
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRegistrationMapper.xml

@@ -470,13 +470,18 @@
 	<sql id="queryStudentListSql">
 		<where>
 			<if test="studentId != null">
-				er.student_id_ = #{studentId}
+				AND er.student_id_ = #{studentId}
 			</if>
 			<if test="examRegistrationId != null">
-				er.id_ = #{examRegistrationId}
+				AND er.id_ = #{examRegistrationId}
 			</if>
-			<if test="status != null and status != ''">
-				er.status_ = #{status}
+			<if test="paymentStatus != null and paymentStatus == 1">
+				<if test="paymentStatus == 1">
+					AND er.status_ = 'AUDIT_PASS'
+				</if>
+				<if test="paymentStatus == 0">
+					AND er.status_ != 'AUDIT_PASS'
+				</if>
 			</if>
 		</where>
 	</sql>
@@ -488,15 +493,33 @@
 		ORDER BY er.update_time_ DESC
 		<include refid="global.limit"/>
 	</select>
-	<resultMap id="ExamRecordDtoMap" type="com.keao.edu.user.dto.ExamRecordDto" extends="ExamRegistration">
-		<result property="subjectName" column="subjectName"/>
-		<result property="examBaseName" column="examBaseName"/>
-		<result property="examCertificationId" column="examCertificationId"/>
-		<association property="studentExamResult" resultMap="com.keao.edu.user.dao.StudentExamResultDao.StudentExamResult"/>
+	<resultMap id="ExamRecordDtoMap" type="com.keao.edu.user.dto.StudentExamListDto">
+		<result property="level" column="level_"/>
+		<result property="examRegistrationId" column="exam_registration_id_"/>
+		<result property="examBaseName" column="exam_base_name_"/>
+		<result property="actualExamEndTime" column="actual_exam_end_time_"/>
+		<result property="actualExamStartTime" column="actual_exam_start_time_"/>
+		<result property="avgScore" column="avg_score_"/>
+		<result property="examAddress" column="exam_address_"/>
+		<result property="examCertificationId" column="exam_certification_id_"/>
+		<result property="examinationBasicId" column="examination_basic_id_"/>
+		<result property="examMusicTheoryLevel" column="exam_music_theory_level_"/>
+		<result property="isFinishedExam" column="is_finished_exam_"/>
+		<result property="result" column="result_"/>
+		<result property="theoryLevelFee" column="theory_level_fee_"/>
+		<result property="videoUrl" column="video_url_"/>
+		<result property="subjectId" column="subject_id_"/>
+		<result property="cardNo" column="card_no_"/>
 	</resultMap>
 	<select id="queryExamList" resultMap="ExamRecordDtoMap">
-		SELECT er.*,ser.* FROM exam_registration er
-		LEFT JOIN student_exam_result ser ON er.id_ = ser.exam_registration_id_
+		SELECT er.level_,ser.exam_registration_id_,eb.name_ exam_base_name_,eb.actual_exam_start_time_,
+		eb.actual_exam_end_time_,ser.avg_score_,ec.exam_address_,ec.id_ exam_certification_id_,
+		er.examination_basic_id_,er.exam_music_theory_level_,ser.is_finished_exam_,er.theory_level_fee_,
+		ser.video_url_,ser.result_,er.subject_id_,ec.card_no_
+		FROM exam_registration er
+		LEFT JOIN student_exam_result ser ON ser.exam_registration_id_ = er.id_
+		LEFT JOIN examination_basic eb ON eb.id_ = er.examination_basic_id_
+		LEFT JOIN exam_certification ec ON ec.exam_registration_id_ = er.id_
 		WHERE ser.id_ IS NOT NULL AND er.student_id_ = #{studentId}
 	</select>
 	<select id="countExamList" resultType="java.lang.Integer">
@@ -552,4 +575,20 @@
 		SELECT DISTINCT tenant_id_ FROM exam_registration
 		WHERE student_id_ = #{userId} AND tenant_id_ IS NOT NULL
 	</select>
+
+	<select id="countStudentBaseExams" resultType="java.lang.Integer">
+		SELECT COUNT(er.id_) FROM exam_registration er
+		<include refid="queryStudentListSql"/>
+	</select>
+	<resultMap id="StudentBaseExamsDtoMap" type="com.keao.edu.user.dto.StudentBaseExamsDto">
+		<result property="baseExamName" column="examBaseName"/>
+		<result property="tenantId" column="tenant_id_"/>
+	</resultMap>
+	<select id="queryStudentBaseExams" resultMap="StudentBaseExamsDtoMap">
+		SELECT eb.name_ examBaseName,eb.tenant_id_ FROM examination_basic eb
+		LEFT JOIN exam_registration er ON er.examination_basic_id_ = eb.id_
+		<include refid="queryStudentListSql"/>
+		ORDER BY er.update_time_ DESC
+		<include refid="global.limit"/>
+	</select>
 </mapper>

+ 2 - 5
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamSongMapper.xml

@@ -134,11 +134,8 @@
 			<if test="level != null">
 				AND FIND_IN_SET(#{level},es.level_list_)
 			</if>
-			<if test="tenantIds != null">
-				AND es.tenant_id_ IN
-				<foreach collection="tenantIds" open="(" close=")" separator="," item="item">
-					#{item}
-				</foreach>
+			<if test="tenantId != null">
+				AND es.tenant_id_ = #{tenantId}
 			</if>
 		</where>
 	</sql>