Переглянути джерело

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 5 роки тому
батько
коміт
ac9369b695

+ 15 - 15
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentCompetition.java

@@ -23,7 +23,7 @@ public class StudentCompetition {
 	private Integer age;
 
 	@ApiModelProperty(value = "性别")
-	private boolean gender;
+	private Boolean gender;
 
 	@ApiModelProperty(value = "年级")
 	private String grade;
@@ -47,7 +47,7 @@ public class StudentCompetition {
 	private Integer prizeLevel;
 
 	@ApiModelProperty(value = "是否展示")
-	private boolean isShow;
+	private Boolean isShow;
 
 	@ApiModelProperty(value = "评价")
 	private String comment;
@@ -95,15 +95,15 @@ public class StudentCompetition {
 	public Integer getAge(){
 		return this.age;
 	}
-			
-	public void setGender(boolean gender){
-		this.gender = gender;
+
+	public Boolean getGender() {
+		return gender;
 	}
-	
-	public boolean isGender(){
-		return this.gender;
+
+	public void setGender(Boolean gender) {
+		this.gender = gender;
 	}
-			
+
 	public void setGrade(String grade){
 		this.grade = grade;
 	}
@@ -168,14 +168,14 @@ public class StudentCompetition {
 		this.prizeLevel = prizeLevel;
 	}
 
-	public void setIsShow(boolean isShow){
-		this.isShow = isShow;
+	public Boolean getShow() {
+		return isShow;
 	}
-	
-	public boolean isIsShow(){
-		return this.isShow;
+
+	public void setShow(Boolean show) {
+		isShow = show;
 	}
-			
+
 	public void setComment(String comment){
 		this.comment = comment;
 	}

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -1220,7 +1220,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 //                String[] studentNames = classGroupStudentMapperDao.findCourseStudentName(courseScheduleDto.getId().intValue());
                 List<StudentNameAndPhoneDto> courseStudentNameAndPhone = classGroupStudentMapperDao.findCourseStudentNameAndPhone(courseScheduleDto.getId().intValue());
                 if(!CollectionUtils.isEmpty(courseStudentNameAndPhone)){
-                    List<String> studentNames = courseStudentNameAndPhone.stream().map(StudentNameAndPhoneDto::getUserName).collect(Collectors.toList());
+                    List<String> studentNames = courseStudentNameAndPhone.stream().filter(s->Objects.nonNull(s.getUserName())).map(StudentNameAndPhoneDto::getUserName).collect(Collectors.toList());
                     courseScheduleDto.setStudentNames(org.apache.commons.lang3.StringUtils.join(studentNames, ","));
                     courseScheduleDto.setStudents(courseStudentNameAndPhone);
                 }

+ 0 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentCompetitionServiceImpl.java

@@ -1,16 +1,13 @@
 package com.ym.mec.biz.service.impl;
 
-import cfca.sadk.org.bouncycastle.apache.bzip2.BZip2Constants;
 import com.ym.mec.biz.dal.dto.StudentCompetitionRankingDto;
 import com.ym.mec.biz.dal.page.StudentCompetitionQueryInfo;
-import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.util.collection.MapUtil;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
 import com.ym.mec.biz.dal.entity.StudentCompetition;
 import com.ym.mec.biz.service.StudentCompetitionService;

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentCompetitionMapper.xml

@@ -149,7 +149,7 @@
 	</select>
 
 	<select id="getWinnerList" resultMap="StudentCompetition">
-		SELECT * FROM student_competition WHERE is_show_ = 1 AND prize_level_ IS NOT NULL ORDER BY prize_level_
+		SELECT * FROM student_competition WHERE is_show_ = 1 AND prize_level_ &gt; 0 ORDER BY prize_level_,score_ DESC
 	</select>
 
 	<select id="getCompetitionWithUser" resultMap="StudentCompetition">