酒店
This commit is contained in:
1 parent
ae8d5d0835
commit
617bd2ef24
1 file changed
+12
-4
+12
-4
@@ -87,7 +87,7 @@ public class SmHotelAppController {
|
||||
private static final String CANDIDATE_CACHE_OVERFLOW = "OVERFLOW";
|
||||
|
||||
/** 列表页结果短缓存(同条件重复进入/下拉) */
|
||||
private static final String PAGE_CACHE_PREFIX = "sm:hotel:app:page:v6:";
|
||||
private static final String PAGE_CACHE_PREFIX = "sm:hotel:app:page:v7:";
|
||||
|
||||
private static final long PAGE_CACHE_SECONDS = 45L;
|
||||
|
||||
@@ -297,9 +297,17 @@ public class SmHotelAppController {
|
||||
}
|
||||
wrapper.in(SmHotelEntity::getId, priceHitIds);
|
||||
}
|
||||
wrapper.orderByDesc(SmHotelEntity::getScore)
|
||||
.orderByDesc(SmHotelEntity::getUpdateTime)
|
||||
.orderByDesc(SmHotelEntity::getId);
|
||||
// 五星档次优先,同档按产品标价从高到低(无星级/无价格的靠后)
|
||||
wrapper.last("""
|
||||
ORDER BY IFNULL(star_level, 0) DESC,
|
||||
IFNULL((
|
||||
SELECT MIN(p.sell_price) FROM canteen_hotel_product p
|
||||
WHERE p.del_flag = '0'
|
||||
AND p.hotel_id = canteen_hotel.id
|
||||
AND p.sell_price IS NOT NULL
|
||||
), 0) DESC,
|
||||
id DESC
|
||||
""");
|
||||
raw = pageWithoutCount(page, wrapper);
|
||||
List<Long> ids = raw.getRecords().stream().map(SmHotelEntity::getId).filter(Objects::nonNull).toList();
|
||||
LocalDate priceFrom = stayFrom != null ? stayFrom : LocalDate.now();
|
||||
|
||||
Reference in new issue
Block a user