Commit 465b672e by wangxin

活动日历

parent a378de2c
...@@ -284,8 +284,9 @@ ...@@ -284,8 +284,9 @@
</select> </select>
<select id="apiPageListCount" resultType="com.yizhi.training.application.vo.domain.TrainingProjectVo"> <select id="apiPageListCount" resultType="com.yizhi.training.application.vo.domain.TrainingProjectVo">
select tb.start_time as startTime,tb.end_time as endTime select en.start_time as startTime,en.end_time as endTime
from training_project tb from training_project tb
left join tr_enroll en on tb.id = en.training_project_id
where where
-- 首先用站点 id 和上架状态缩小范围 -- 首先用站点 id 和上架状态缩小范围
(tb.site_id = #{siteId} and tb.status = 1 and tb.deleted = 0 ) (tb.site_id = #{siteId} and tb.status = 1 and tb.deleted = 0 )
......
...@@ -1528,12 +1528,15 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe ...@@ -1528,12 +1528,15 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
if(!CollectionUtils.isEmpty(trainingProjectVos)){ if(!CollectionUtils.isEmpty(trainingProjectVos)){
List<String> list = new ArrayList<String>(1); List<String> list = new ArrayList<String>(1);
trainingProjectVos.stream().forEach(trainingProjectVo -> { trainingProjectVos.stream().forEach(trainingProjectVo -> {
if(trainingProjectVo!=null&&trainingProjectVo.getStartTime()!=null&&trainingProjectVo.getEndTime()!=null){
List<String> dateList = LegacyDateUtils.getDatesBetween(trainingProjectVo.getStartTime(),trainingProjectVo.getEndTime()); List<String> dateList = LegacyDateUtils.getDatesBetween(trainingProjectVo.getStartTime(),trainingProjectVo.getEndTime());
dateList.stream().forEach(date->{ dateList.stream().forEach(date->{
if(!list.contains(date)){ if(!list.contains(date)){
list.add(date); list.add(date);
} }
}); });
}
}); });
item.setTheDay(list); item.setTheDay(list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment