|
@@ -43,6 +43,10 @@ public class AppHomeServiceImpl implements IAppHomeService {
|
|
@Resource
|
|
@Resource
|
|
private AppGameMapper appGameMapper;
|
|
private AppGameMapper appGameMapper;
|
|
@Resource
|
|
@Resource
|
|
|
|
+ private AppSitePlaceMapper appSitePlaceMapper;
|
|
|
|
+ @Resource
|
|
|
|
+ private AppSitePriceRulesMapper appSitePriceRulesMapper;
|
|
|
|
+ @Resource
|
|
private AppSearchHotMapper appSearchHotMapper;
|
|
private AppSearchHotMapper appSearchHotMapper;
|
|
@Resource
|
|
@Resource
|
|
private AppGamePriceRulesMapper appGamePriceRulesMapper;
|
|
private AppGamePriceRulesMapper appGamePriceRulesMapper;
|
|
@@ -155,8 +159,22 @@ public class AppHomeServiceImpl implements IAppHomeService {
|
|
Page<PlaceVO> page = new Page<>(getPlaceListDTO.getCurrent(), getPlaceListDTO.getSize());
|
|
Page<PlaceVO> page = new Page<>(getPlaceListDTO.getCurrent(), getPlaceListDTO.getSize());
|
|
Page<PlaceVO> placeList = appSiteMapper.getPlaceList(page, getPlaceListDTO.getVenueType());
|
|
Page<PlaceVO> placeList = appSiteMapper.getPlaceList(page, getPlaceListDTO.getVenueType());
|
|
placeList.getRecords().forEach(placeVO -> {
|
|
placeList.getRecords().forEach(placeVO -> {
|
|
|
|
+ boolean ticketWhether = false;
|
|
|
|
+ List<AppSitePriceRules> appSitePriceRules = new ArrayList<>();
|
|
|
|
+ appSitePlaceMapper.selectList(Wrappers.<AppSitePlace>lambdaQuery()
|
|
|
|
+ .eq(AppSitePlace::getSiteId, placeVO.getId())
|
|
|
|
+ .eq(AppSitePlace::getDelFlag,0)
|
|
|
|
+ .eq(AppSitePlace::getStatus,0)).forEach(appSitePlace -> {
|
|
|
|
+ appSitePriceRules.addAll(appSitePriceRulesMapper.selectList(Wrappers.<AppSitePriceRules>lambdaQuery()
|
|
|
|
+ .eq(AppSitePriceRules::getSitePlaceId, appSitePlace.getId())
|
|
|
|
+ .eq(AppSitePriceRules::getDelFlag, 0)
|
|
|
|
+ .eq(AppSitePriceRules::getStatus, 0)
|
|
|
|
+ .ne(AppSitePriceRules::getInventory, 0)));
|
|
|
|
+ });
|
|
|
|
+ if(!appSitePriceRules.isEmpty()) ticketWhether = true;
|
|
placeVO.setKm(PositionUtil.calculateDistance(getPlaceListDTO.getLatitude(), getPlaceListDTO.getLongitude(), placeVO.getLatitude().doubleValue(), placeVO.getLongitude().doubleValue()))
|
|
placeVO.setKm(PositionUtil.calculateDistance(getPlaceListDTO.getLatitude(), getPlaceListDTO.getLongitude(), placeVO.getLatitude().doubleValue(), placeVO.getLongitude().doubleValue()))
|
|
- .setCategory(getCategoryName(placeVO.getCategoryId()));
|
|
|
|
|
|
+ .setCategory(getCategoryName(placeVO.getCategoryId()))
|
|
|
|
+ .setTicketWhether(ticketWhether);
|
|
});
|
|
});
|
|
if(getPlaceListDTO.getVenueType().equals("0-2")
|
|
if(getPlaceListDTO.getVenueType().equals("0-2")
|
|
|| getPlaceListDTO.getVenueType().equals("1-1")
|
|
|| getPlaceListDTO.getVenueType().equals("1-1")
|