mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
fix(payments_list): remove time range to filter payments attempts (#6159)
This commit is contained in:
@ -369,7 +369,6 @@ impl PaymentAttempt {
|
|||||||
payment_method: Option<Vec<enums::PaymentMethod>>,
|
payment_method: Option<Vec<enums::PaymentMethod>>,
|
||||||
payment_method_type: Option<Vec<enums::PaymentMethodType>>,
|
payment_method_type: Option<Vec<enums::PaymentMethodType>>,
|
||||||
authentication_type: Option<Vec<enums::AuthenticationType>>,
|
authentication_type: Option<Vec<enums::AuthenticationType>>,
|
||||||
time_range: Option<common_utils::types::TimeRange>,
|
|
||||||
profile_id_list: Option<Vec<common_utils::id_type::ProfileId>>,
|
profile_id_list: Option<Vec<common_utils::id_type::ProfileId>>,
|
||||||
merchant_connector_id: Option<Vec<common_utils::id_type::MerchantConnectorAccountId>>,
|
merchant_connector_id: Option<Vec<common_utils::id_type::MerchantConnectorAccountId>>,
|
||||||
) -> StorageResult<i64> {
|
) -> StorageResult<i64> {
|
||||||
@ -379,14 +378,6 @@ impl PaymentAttempt {
|
|||||||
.filter(dsl::attempt_id.eq_any(active_attempt_ids.to_owned()))
|
.filter(dsl::attempt_id.eq_any(active_attempt_ids.to_owned()))
|
||||||
.into_boxed();
|
.into_boxed();
|
||||||
|
|
||||||
if let Some(time_range) = time_range {
|
|
||||||
filter = filter.filter(dsl::created_at.ge(time_range.start_time));
|
|
||||||
|
|
||||||
if let Some(end_time) = time_range.end_time {
|
|
||||||
filter = filter.filter(dsl::created_at.le(end_time));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(connector) = connector {
|
if let Some(connector) = connector {
|
||||||
filter = filter.filter(dsl::connector.eq_any(connector));
|
filter = filter.filter(dsl::connector.eq_any(connector));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,7 +157,6 @@ pub trait PaymentAttemptInterface {
|
|||||||
payment_method_type: Option<Vec<storage_enums::PaymentMethodType>>,
|
payment_method_type: Option<Vec<storage_enums::PaymentMethodType>>,
|
||||||
authentication_type: Option<Vec<storage_enums::AuthenticationType>>,
|
authentication_type: Option<Vec<storage_enums::AuthenticationType>>,
|
||||||
merchant_connector_id: Option<Vec<id_type::MerchantConnectorAccountId>>,
|
merchant_connector_id: Option<Vec<id_type::MerchantConnectorAccountId>>,
|
||||||
time_range: Option<common_utils::types::TimeRange>,
|
|
||||||
profile_id_list: Option<Vec<id_type::ProfileId>>,
|
profile_id_list: Option<Vec<id_type::ProfileId>>,
|
||||||
storage_scheme: storage_enums::MerchantStorageScheme,
|
storage_scheme: storage_enums::MerchantStorageScheme,
|
||||||
) -> error_stack::Result<i64, errors::StorageError>;
|
) -> error_stack::Result<i64, errors::StorageError>;
|
||||||
|
|||||||
@ -3243,7 +3243,6 @@ pub async fn apply_filters_on_payments(
|
|||||||
constraints.payment_method_type,
|
constraints.payment_method_type,
|
||||||
constraints.authentication_type,
|
constraints.authentication_type,
|
||||||
constraints.merchant_connector_id,
|
constraints.merchant_connector_id,
|
||||||
constraints.time_range,
|
|
||||||
pi_fetch_constraints.get_profile_id_list(),
|
pi_fetch_constraints.get_profile_id_list(),
|
||||||
merchant.storage_scheme,
|
merchant.storage_scheme,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1604,7 +1604,6 @@ impl PaymentAttemptInterface for KafkaStore {
|
|||||||
payment_method_type: Option<Vec<common_enums::PaymentMethodType>>,
|
payment_method_type: Option<Vec<common_enums::PaymentMethodType>>,
|
||||||
authentication_type: Option<Vec<common_enums::AuthenticationType>>,
|
authentication_type: Option<Vec<common_enums::AuthenticationType>>,
|
||||||
merchant_connector_id: Option<Vec<id_type::MerchantConnectorAccountId>>,
|
merchant_connector_id: Option<Vec<id_type::MerchantConnectorAccountId>>,
|
||||||
time_range: Option<common_utils::types::TimeRange>,
|
|
||||||
profile_id_list: Option<Vec<id_type::ProfileId>>,
|
profile_id_list: Option<Vec<id_type::ProfileId>>,
|
||||||
storage_scheme: MerchantStorageScheme,
|
storage_scheme: MerchantStorageScheme,
|
||||||
) -> CustomResult<i64, errors::DataStorageError> {
|
) -> CustomResult<i64, errors::DataStorageError> {
|
||||||
@ -1617,7 +1616,6 @@ impl PaymentAttemptInterface for KafkaStore {
|
|||||||
payment_method_type,
|
payment_method_type,
|
||||||
authentication_type,
|
authentication_type,
|
||||||
merchant_connector_id,
|
merchant_connector_id,
|
||||||
time_range,
|
|
||||||
profile_id_list,
|
profile_id_list,
|
||||||
storage_scheme,
|
storage_scheme,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -52,7 +52,6 @@ impl PaymentAttemptInterface for MockDb {
|
|||||||
_payment_method_type: Option<Vec<common_enums::PaymentMethodType>>,
|
_payment_method_type: Option<Vec<common_enums::PaymentMethodType>>,
|
||||||
_authentication_type: Option<Vec<common_enums::AuthenticationType>>,
|
_authentication_type: Option<Vec<common_enums::AuthenticationType>>,
|
||||||
_merchanat_connector_id: Option<Vec<common_utils::id_type::MerchantConnectorAccountId>>,
|
_merchanat_connector_id: Option<Vec<common_utils::id_type::MerchantConnectorAccountId>>,
|
||||||
_time_range: Option<common_utils::types::TimeRange>,
|
|
||||||
_profile_id_list: Option<Vec<common_utils::id_type::ProfileId>>,
|
_profile_id_list: Option<Vec<common_utils::id_type::ProfileId>>,
|
||||||
_storage_scheme: storage_enums::MerchantStorageScheme,
|
_storage_scheme: storage_enums::MerchantStorageScheme,
|
||||||
) -> CustomResult<i64, StorageError> {
|
) -> CustomResult<i64, StorageError> {
|
||||||
|
|||||||
@ -403,7 +403,6 @@ impl<T: DatabaseStore> PaymentAttemptInterface for RouterStore<T> {
|
|||||||
payment_method_type: Option<Vec<common_enums::PaymentMethodType>>,
|
payment_method_type: Option<Vec<common_enums::PaymentMethodType>>,
|
||||||
authentication_type: Option<Vec<common_enums::AuthenticationType>>,
|
authentication_type: Option<Vec<common_enums::AuthenticationType>>,
|
||||||
merchant_connector_id: Option<Vec<common_utils::id_type::MerchantConnectorAccountId>>,
|
merchant_connector_id: Option<Vec<common_utils::id_type::MerchantConnectorAccountId>>,
|
||||||
time_range: Option<common_utils::types::TimeRange>,
|
|
||||||
profile_id_list: Option<Vec<common_utils::id_type::ProfileId>>,
|
profile_id_list: Option<Vec<common_utils::id_type::ProfileId>>,
|
||||||
_storage_scheme: MerchantStorageScheme,
|
_storage_scheme: MerchantStorageScheme,
|
||||||
) -> CustomResult<i64, errors::StorageError> {
|
) -> CustomResult<i64, errors::StorageError> {
|
||||||
@ -427,7 +426,6 @@ impl<T: DatabaseStore> PaymentAttemptInterface for RouterStore<T> {
|
|||||||
payment_method,
|
payment_method,
|
||||||
payment_method_type,
|
payment_method_type,
|
||||||
authentication_type,
|
authentication_type,
|
||||||
time_range,
|
|
||||||
profile_id_list,
|
profile_id_list,
|
||||||
merchant_connector_id,
|
merchant_connector_id,
|
||||||
)
|
)
|
||||||
@ -1289,7 +1287,6 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
|
|||||||
payment_method_type: Option<Vec<common_enums::PaymentMethodType>>,
|
payment_method_type: Option<Vec<common_enums::PaymentMethodType>>,
|
||||||
authentication_type: Option<Vec<common_enums::AuthenticationType>>,
|
authentication_type: Option<Vec<common_enums::AuthenticationType>>,
|
||||||
merchant_connector_id: Option<Vec<common_utils::id_type::MerchantConnectorAccountId>>,
|
merchant_connector_id: Option<Vec<common_utils::id_type::MerchantConnectorAccountId>>,
|
||||||
time_range: Option<common_utils::types::TimeRange>,
|
|
||||||
profile_id_list: Option<Vec<common_utils::id_type::ProfileId>>,
|
profile_id_list: Option<Vec<common_utils::id_type::ProfileId>>,
|
||||||
storage_scheme: MerchantStorageScheme,
|
storage_scheme: MerchantStorageScheme,
|
||||||
) -> CustomResult<i64, errors::StorageError> {
|
) -> CustomResult<i64, errors::StorageError> {
|
||||||
@ -1302,7 +1299,6 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
|
|||||||
payment_method_type,
|
payment_method_type,
|
||||||
authentication_type,
|
authentication_type,
|
||||||
merchant_connector_id,
|
merchant_connector_id,
|
||||||
time_range,
|
|
||||||
profile_id_list,
|
profile_id_list,
|
||||||
storage_scheme,
|
storage_scheme,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user