Prechádzať zdrojové kódy

Merge branch 'feature/0427-school' of http://git.dayaedu.com/yonge/mec into feature/0427-school

liujc 2 rokov pred
rodič
commit
371abffe09

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/DailySummaryOfClassesForTheCurrentSemesterWrapper.java

@@ -50,6 +50,8 @@ public class DailySummaryOfClassesForTheCurrentSemesterWrapper {
 
         private String week;
 
+        private String weekTime;
+
         @ApiModelProperty(value = "课程状态NOT_START,ING,END",required = false)
         private String courseStatus;
     }

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

@@ -6023,15 +6023,16 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		LocalDate currentWeekStart = startDate.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
 		DateTimeFormatter format = DateTimeFormatter.ofPattern("MM月dd日");
 		StringBuffer sb;
+		StringBuffer sb1;
 		int week = 0;
 		while (!currentWeekStart.isAfter(endDate)) {
 			DailySummaryOfClassesForTheCurrentSemesterWrapper.DailySummaryOfClassesForTheCurrentSemesterMapDto vo =
 					new DailySummaryOfClassesForTheCurrentSemesterWrapper.DailySummaryOfClassesForTheCurrentSemesterMapDto();
 			String weekStart = currentWeekStart.format(format);
-			sb = new StringBuffer("第").append(toChineseNumber(week)).append("周 (").append(weekStart).append("-");
+			sb = new StringBuffer("第").append(toChineseNumber(week)).append("周");
 			LocalDate currentWeekEnd = currentWeekStart.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY));
 			String endStart = currentWeekEnd.format(format);
-			sb.append(endStart).append(")");
+			sb1 = new StringBuffer("(").append(weekStart).append("-").append(endStart).append(")");
 			// 判断课程状态
 			String courseStatus;
 			if (currentWeekEnd.isBefore(now)) {
@@ -6051,6 +6052,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 			week++;
 			currentWeekStart = currentWeekEnd.plusDays(1);
 			vo.setWeek(sb.toString());
+			vo.setWeekTime(sb1.toString());
 			vo.setDailySummaryOfClassesForTheCurrentSemesterDtos(currentWeekDates);
 			result.add(vo);
 		}

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysNewsInformationServiceImpl.java

@@ -62,9 +62,9 @@ public class SysNewsInformationServiceImpl extends ServiceImpl<SysNewsInformatio
         List<NewsInformationDto> resultList = new ArrayList<>();
         if(CollectionUtils.isNotEmpty(dtos)){
             List<String> musicGroupIds = musicGroupDao.findNormalByCooperationId(coopId);
-            if(CollectionUtils.isNotEmpty(musicGroupIds)){
-                for (SysNewsInformation dto : dtos) {
-                    NewsInformationDto informationDto = JSON.parseObject(JSON.toJSONString(dto), NewsInformationDto.class);
+            for (SysNewsInformation dto : dtos) {
+                NewsInformationDto informationDto = JSON.parseObject(JSON.toJSONString(dto), NewsInformationDto.class);
+                if(CollectionUtils.isNotEmpty(musicGroupIds)){
                     if(informationDto.getRedPoint() != null){
                         //统计是否有红点
                         switch (informationDto.getRedPoint()) {
@@ -77,8 +77,8 @@ public class SysNewsInformationServiceImpl extends ServiceImpl<SysNewsInformatio
                                 break;
                         }
                     }
-                    resultList.add(informationDto);
                 }
+                resultList.add(informationDto);
             }
         }
         return resultList;