- Implement `cleanupOldData` in `DatabaseManager` to remove outdated entries and optimize storage. - Introduce `unlockScreen` in `AdbUtils` and integrate it into common scripts for screen unlocking. - Enhance `GeneralLogDAO` to support screenshot storage and retrieval. - Expand `FileLogWindow` with screenshot viewer and horizontal layout. - Add device ID migration logic in `BankProfileDAO` and `MaterialDAO`. - Improve error handling in `EventHandler` by saving and logging screenshots for critical events.
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
#pragma once
|
|
#include <QSet>
|
|
#include "db/MaterialInfo.h"
|
|
|
|
class MaterialDAO {
|
|
public:
|
|
[[nodiscard]] static bool upsertAccount(const MaterialInfo &info);
|
|
|
|
[[nodiscard]] static bool updateAccountById(
|
|
int id,
|
|
const QString &status,
|
|
const QString &description,
|
|
const QString ¤cy
|
|
);
|
|
|
|
[[nodiscard]] static bool deleteAccount(int id);
|
|
|
|
[[nodiscard]] static bool updateCardNumber(int accountId, const QString &cardNumber);
|
|
|
|
[[nodiscard]] static bool updateMaterialId(int accountId, const QString &materialId);
|
|
|
|
[[nodiscard]] static QList<MaterialInfo> getAccounts(const QString &deviceId, const QString &appName);
|
|
|
|
[[nodiscard]] static MaterialInfo getAccountById(int accountId);
|
|
|
|
[[nodiscard]] static QList<MaterialInfo> getAccountsByAppCode(const QString &appCode);
|
|
|
|
[[nodiscard]] static MaterialInfo findAppAccount(
|
|
const QString &deviceId,
|
|
const QString &appName,
|
|
const QString &lastNumber
|
|
);
|
|
|
|
[[nodiscard]] static MaterialInfo findByMaterialId(const QString &materialId);
|
|
|
|
[[nodiscard]] static QStringList getActiveMaterialIds();
|
|
|
|
[[nodiscard]] static QStringList getActiveMaterialIdsExcludingDevices(const QSet<QString> &excludeDevices);
|
|
|
|
[[nodiscard]] static bool migrateDeviceId(const QString &oldDeviceId, const QString &newDeviceId);
|
|
};
|