【fix】过滤空数据,修复酒店数据字段问题

This commit is contained in:
nixj 2024-07-11 13:37:49 +08:00
parent 66c53b2faa
commit dfb90dfa31
1 changed files with 6 additions and 6 deletions

View File

@ -108,7 +108,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
private Page<TrainOrderDetailExcel> trainPageConsumptionDetail(ConsumptionDetailQuery dto) {
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
"WHERE 1=1 ";
"WHERE tod.order_no IS NOT NULL ";
Map<String, Object> params = new HashMap<>();
PageRequest pageRequest = PageRequest
@ -127,7 +127,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
private Page<FlightOrderDetailExcel> flightPageConsumptionDetail(ConsumptionDetailQuery dto) {
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
"WHERE 1=1 ";
"WHERE tod.order_no IS NOT NULL ";
Map<String, Object> params = new HashMap<>();
PageRequest pageRequest = PageRequest
@ -146,15 +146,15 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
private Page<HotelOrderDetailExcel> hotelPageConsumptionDetail(ConsumptionDetailQuery dto) {
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
"WHERE 1=1 ";
"WHERE tod.order_no IS NOT NULL ";
Map<String, Object> params = new HashMap<>();
PageRequest pageRequest = PageRequest
.of(dto.getPageNum() - 1, dto.getPageSize());
query = getString(dto, query, params, pageRequest);
String pagedQuery = "SELECT tod.* FROM hotel_order_detail tod "
+ query + " ORDER BY tod.create_time DESC LIMIT :limit OFFSET :offset";
String pagedQuery = "SELECT tod.booking_name AS userName,tod.check_in_date,tod.departure_date,tod.check_in_city,tod.night_count AS nightRates,tod.order_amount,tod.over_standard,tod.over_standard_reason,tod.agreement_hotel,tod.order_no,tod.create_time " +
" FROM hotel_order_detail tod "+ query + " ORDER BY tod.create_time DESC LIMIT :limit OFFSET :offset";
List<HotelOrderDetailExcel> results = jdbcTemplate.query(pagedQuery, params, BeanPropertyRowMapper.newInstance(HotelOrderDetailExcel.class));
String countQuery = "SELECT COUNT(*) FROM hotel_order_detail tod " + query;
@ -165,7 +165,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
private Page<CarOrderDetailExcel> carPageConsumptionDetail(ConsumptionDetailQuery dto) {
String query = "LEFT JOIN order_detail od ON tod.order_id=od.order_id " +
"LEFT JOIN route_order_extension_field roef ON roef.route_id=od.route_id " +
"WHERE 1=1 ";
"WHERE tod.order_no IS NOT NULL ";
Map<String, Object> params = new HashMap<>();
PageRequest pageRequest = PageRequest