diff --git a/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java b/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java index ca3ef777..0ca0a472 100644 --- a/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java +++ b/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java @@ -108,7 +108,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai private Page 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 params = new HashMap<>(); PageRequest pageRequest = PageRequest @@ -127,7 +127,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai private Page 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 params = new HashMap<>(); PageRequest pageRequest = PageRequest @@ -146,15 +146,15 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai private Page 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 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 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 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 params = new HashMap<>(); PageRequest pageRequest = PageRequest