diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml index fd1a4fde..447e3522 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml @@ -632,7 +632,7 @@ and co.source=#{source} - and co.Plate_num=#{plateNum} + and co.Plate_num like concat('%', #{plateNum}, '%') and inu.internet_user_id=#{internetId} @@ -671,24 +671,31 @@ and op.operator_id =#{operatorId} - and co.user_id in (SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%')) or - co.user_id in (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', #{phone}, '%')) + and co.user_id in ( + SELECT cro.user_id + FROM xhpc_charge_order cro WHERE cro.source = 0 AND cro.user_id IN ( SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%')) + union + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 1 AND cro.user_id IN (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', #{phone}, '%')) + ) - and co.user_id in (SELECT app_user_id FROM xhpc_app_user) + and co.user_id in ( + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 0 AND cro.user_id IN ( SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%'))) - and co.user_id in (SELECT internet_user_id from xhpc_internet_user) + and co.user_id in ( + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 1 AND cro.user_id IN (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', #{phone}, '%'))) - and co.user_id in (SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%')) + and co.user_id in ( + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 0 AND cro.user_id IN ( SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%'))) - and co.user_id in (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', - #{phone}, '%')) + and co.user_id in ( + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 1 AND cro.user_id IN (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', #{phone}, '%'))) diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcRealTimeOrderMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcRealTimeOrderMapper.xml index 60e36a5d..1ad0939f 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcRealTimeOrderMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcRealTimeOrderMapper.xml @@ -425,9 +425,6 @@ and co.source =#{source} - - and co.status =#{status} - and co.start_time >= #{startTime} @@ -447,24 +444,31 @@ and op.operator_id =#{operatorId} - and co.user_id in (SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%')) or - co.user_id in (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', #{phone}, '%')) + and co.user_id in ( + SELECT cro.user_id + FROM xhpc_charge_order cro WHERE cro.source = 0 AND cro.user_id IN ( SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%')) + union + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 1 AND cro.user_id IN (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', #{phone}, '%')) + ) - and co.user_id in (SELECT app_user_id FROM xhpc_app_user) + and co.user_id in ( + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 0 AND cro.user_id IN ( SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%'))) - and co.user_id in (SELECT internet_user_id from xhpc_internet_user) + and co.user_id in ( + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 1 AND cro.user_id IN (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', #{phone}, '%'))) - and co.user_id in (SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%')) + and co.user_id in ( + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 0 AND cro.user_id IN ( SELECT app_user_id FROM xhpc_app_user where phone like concat('%', #{phone}, '%'))) - and co.user_id in (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', - #{phone}, '%')) + and co.user_id in ( + SELECT cro.user_id FROM xhpc_charge_order cro WHERE cro.source = 1 AND cro.user_id IN (SELECT internet_user_id from xhpc_internet_user where phone like concat('%', #{phone}, '%'))) diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml index ad100ae8..7c05cbbd 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml @@ -122,7 +122,6 @@ sum(platform_svc_commisssion) platformSvcCommisssion, sum(operation_commission) operationCommission, sum(operation_svc_commission) operationSvcCommission, - DATE_FORMAT(create_time,'%Y-%m-%d') createTime from xhpc_statistics_station where del_flag=0 and type=1