|
|
@@ -16,6 +16,7 @@ import org.jeecg.modules.app.vo.CourseInfoVO;
|
|
|
import org.jeecg.modules.app.vo.PlaceInfoVO;
|
|
|
import org.jeecg.modules.app.vo.course.CourseRequestVo;
|
|
|
import org.jeecg.modules.app.vo.course.CourseResponseVo;
|
|
|
+import org.jeecg.modules.app.vo.stadium.ConcertsDetailsVO;
|
|
|
import org.jeecg.modules.app.vo.stadium.ConcertsVO;
|
|
|
import org.jeecg.modules.app.vo.stadium.StadiumConcertsResponseVO;
|
|
|
import org.jeecg.modules.app.vo.stadium.StadiumConcertsVO;
|
|
|
@@ -220,16 +221,37 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
stadiumConcertsResponseVO = new StadiumConcertsResponseVO();
|
|
|
}
|
|
|
List<StadiumConcertsVO> stadiumConcertsVOS = new ArrayList<>();
|
|
|
+ Boolean label = true;
|
|
|
for (NextSevenDayVo nextSevenDay : nextSevenDays) {
|
|
|
StadiumConcertsVO stadiumConcertsVO = new StadiumConcertsVO();
|
|
|
BeanUtils.copyProperties(nextSevenDay,stadiumConcertsVO);
|
|
|
- //
|
|
|
- //查询预约总数
|
|
|
-// appSitePlaceMapper.findCount();
|
|
|
-// 查询过期和已预约数
|
|
|
- //查询当天所有场地和场次
|
|
|
- List<ConcertsVO> concertsVOList= appSitePlaceMapper.findByConcerts(stadiumConcertsVO.getWeekDay(),siteId,categoryId);
|
|
|
+ List<ConcertsVO> concertsVOList=null;
|
|
|
+ //查询当天所有场地和场次及状态
|
|
|
+ if (label){
|
|
|
+ concertsVOList= appSitePlaceMapper.findByConcertsAndTime(stadiumConcertsVO.getWeekDay(),siteId,categoryId);
|
|
|
+ }else {
|
|
|
+ concertsVOList= appSitePlaceMapper.findByConcerts(stadiumConcertsVO.getWeekDay(),siteId,categoryId);
|
|
|
+ }
|
|
|
+
|
|
|
+ label=false;
|
|
|
stadiumConcertsVO.setConcertsVOList(concertsVOList);
|
|
|
+ long count=0L;
|
|
|
+ if (concertsVOList!=null&&!concertsVOList.isEmpty()){
|
|
|
+
|
|
|
+ for (ConcertsVO concertsVO : concertsVOList) {
|
|
|
+ List<ConcertsDetailsVO> concertsDetailsVOList = concertsVO.getConcertsDetailsVOList();
|
|
|
+ if (concertsDetailsVOList!=null&&!concertsDetailsVOList.isEmpty()){
|
|
|
+ count = count+concertsDetailsVOList.stream()
|
|
|
+ .filter(Objects::nonNull) // 过滤掉null元素
|
|
|
+ .filter(vo -> vo.getConcertStatus() == 0) // 精确匹配状态0
|
|
|
+ .count();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ stadiumConcertsVO.setNoDayConcertsReservationNum(count);
|
|
|
+
|
|
|
+
|
|
|
stadiumConcertsVOS.add(stadiumConcertsVO);
|
|
|
}
|
|
|
stadiumConcertsResponseVO.setStadiumConcertsVOList(stadiumConcertsVOS);
|