Implemented database migration for adding new fields (`json`, `sent_to_server`) in `events` table. Updated DAO methods to support the new fields and introduced `markSentToServer`. Enhanced Ozon transaction workflows with OCR-based extraction, event error handling improvements, and result reporting. Refactored `EventHandler` for streamlined task processing and stale event cleanup.
29 lines
776 B
C++
29 lines
776 B
C++
#pragma once
|
|
|
|
#include <db/EventInfo.h>
|
|
|
|
class EventDAO {
|
|
public:
|
|
[[nodiscard]] static int insertEvent(const EventInfo &event);
|
|
|
|
[[nodiscard]] static bool updateEvent(
|
|
int id,
|
|
const EventStatus &status,
|
|
const QString &comment
|
|
);
|
|
|
|
[[nodiscard]] static QList<EventInfo> getAllEvents(const EventStatus &status);
|
|
|
|
[[nodiscard]] static EventInfo getFirstWaitEventByDeviceId(const QString &key);
|
|
|
|
[[nodiscard]] static bool existsActiveByExternalId(const QString &externalId);
|
|
|
|
[[nodiscard]] static bool updateEventAmount(int id, double amount);
|
|
|
|
[[nodiscard]] static bool markSentToServer(int id);
|
|
|
|
[[nodiscard]] static QList<EventInfo> getEvents(int page, int pageSize);
|
|
|
|
[[nodiscard]] static int getTotalCount();
|
|
};
|