#pragma once #include #include "../sqlite/CppSQLite3.h" #include #include #include "../SmartEvaluationLogic/ScanDll.h" using namespace std; class CDataBaseService { public: CDataBaseService(void); ~CDataBaseService(void); bool InsertPapers(const wstring& db_path, vector& list_papers); bool UpdateIndexPicWrong(int total_cnt, int id); bool InsertIndex(int total_cnt, int& last_id); bool InsertIndex(const wstring& strBatchDBPath, const wstring& strWorkPath, const wstring& strZipfileName, int total_cnt, int& last_id); vector GetFailedBatch(); void GetBatchInfo(batch_info& info); vector GetCashBatch(); void GetBatchPapers(const wstring& db_path, vector& vctPapers); void GetPaperByID(const wstring& db_path, int id, paper_info& info); bool DeletePaper(const wstring& db_path, int paper_id); bool DeletePaperAll(const wstring& db_path, int state); bool DeleteIndex(int id); bool UpdatePapersPath(const wstring& db_path, paper_info& info); private: bool OpenSQLiteDB(CppSQLite3DB& db, const wstring& strdbpath); wstring m_strModuleDir; wstring m_strIndexDbPath; };