From dfb90dfa310714cc908ec4b77d9fc63e6620ba16 Mon Sep 17 00:00:00 2001 From: nixj Date: Thu, 11 Jul 2024 13:37:49 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=E3=80=91=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E7=A9=BA=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=85=92?= =?UTF-8?q?=E5=BA=97=E6=95=B0=E6=8D=AE=E5=AD=97=E6=AE=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/JdbcConsumptionDetailRepositoryImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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