first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#include "logservice.h"
|
||||
|
||||
#include "../models/logrecord.h"
|
||||
#include "../repositories/logrepository.h"
|
||||
|
||||
LogService &LogService::instance()
|
||||
{
|
||||
static LogService service;
|
||||
return service;
|
||||
}
|
||||
|
||||
bool LogService::record(const QString &type, const QString &module, const QString &action,
|
||||
const QString &content, const QString &status, QString *error)
|
||||
{
|
||||
LogRecord record;
|
||||
record.type = type;
|
||||
record.module = module;
|
||||
record.action = action;
|
||||
record.content = content;
|
||||
record.status = status;
|
||||
|
||||
LogRepository repository;
|
||||
return repository.insertLog(record, error);
|
||||
}
|
||||
Reference in New Issue
Block a user