Implemented a `maxCount` parameter in `GetLastTransactionsScript` to limit the number of transactions retrieved. Updated `AccountSettingsWindow` to include new transaction limit options in the UI. Enhanced retrieval logic to support either time-based filtering (24 hours) or count-based limits, ensuring flexibility in transaction handling.
30 lines
617 B
C++
30 lines
617 B
C++
#pragma once
|
|
#include "CommonScript.h"
|
|
|
|
namespace Ozon {
|
|
|
|
class GetLastTransactionsScript final : public CommonScript {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit GetLastTransactionsScript(
|
|
QString deviceId,
|
|
QString appCode,
|
|
int maxCount = 0,
|
|
QObject *parent = nullptr
|
|
);
|
|
|
|
~GetLastTransactionsScript() override;
|
|
|
|
protected:
|
|
void doStart() override;
|
|
|
|
private:
|
|
const QString m_deviceId;
|
|
const QString m_appCode;
|
|
const int m_maxCount; // 0 = без лимита (фильтр по 24ч), >0 = только N последних
|
|
QString m_error;
|
|
};
|
|
|
|
} // namespace Ozon
|