SDJKDBManager.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // SDJKDBManager.h
  3. // SDJK
  4. //
  5. // Created by 张嵘 on 2021/8/26.
  6. //
  7. #import <Foundation/Foundation.h>
  8. //#import "RQHomePageModule.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. #define RQ_SDJK_DB_MANAGER [SDJKDBManager sharedInstance]
  11. @class RQWrongModel, RQCollectionModel;
  12. @interface SDJKDBManager : NSObject
  13. /// 单例
  14. + (instancetype) sharedInstance;
  15. #pragma mark - WrongList
  16. - (void)addWrongRecordWithRQWrongModel:(RQWrongModel *)wrongModel;
  17. - (void)addWrongRecordWithRQWrongModelArr:(NSArray *)wrongModelArr isClearOldData:(BOOL)isClearOldData complete:(_Nullable VoidBlock)complete;
  18. - (void)updateWrongRecordWithRQWrongModel:(RQWrongModel *)wrongModel;
  19. - (void)deleteWrongRecordWithQuestionId:(NSInteger)questionId;
  20. - (void)deleteWrongRecordWithIdArr:(NSArray *)idArr;
  21. - (BOOL)isExistWithRQWrongModel:(RQWrongModel *)wrongModel;
  22. - (BOOL)isSelectWithRQWrongModel:(RQWrongModel *)wrongModel;
  23. - (NSArray *)setSelectWithRQWrongModel:(RQWrongModel *)wrongModel carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType isSelect:(BOOL)isSelect limitNum:(NSInteger)limit;
  24. - (NSArray *)setSelectWithRQWrongModelArr:(NSArray *)wrongModelArr carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType isSelect:(BOOL)isSelect limitNum:(NSInteger)limit complete:(VoidBlock)complete;
  25. - (NSArray *)querySelectedWrongModelsWithLimitNum:(NSInteger)limit carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType;
  26. - (NSArray *)querySelectedWrongModelsQuestionIdArrWithLimitNum:(NSInteger)limit carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType;
  27. - (void)deleteAllWrongModelsWithComplete:(VoidBlock_int)complete;
  28. - (NSInteger)getAllWrongModelsCount;
  29. - (void)queryWrongModelQuestionIdArrWithCarType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType complete:(VoidBlock_id)complete;
  30. #pragma mark - CollectionList
  31. - (void)addCollectionRecordWithRQCollectionModel:(RQCollectionModel *)collectionModel;
  32. - (void)addCollectionRecordWithQuestionIdArr:(NSArray *)questionIdArr;
  33. - (void)addCollectionRecordWithRQCollectionModelArr:(NSArray *)collectionModelArr isClearOldData:(BOOL)isClearOldData complete:(_Nullable VoidBlock)complete;
  34. - (void)updateCollectionRecordWithRQCollectionModel:(RQCollectionModel *)collectionModel;
  35. - (void)deleteCollectionRecordWithQuestionId:(NSInteger)questionId;
  36. - (void)deleteCollectionRecordWithIdArr:(NSArray *)idArr;
  37. - (BOOL)isExistWithRQCollectionModel:(RQCollectionModel *)collectionModel;
  38. - (BOOL)isSelectWithRQCollectionModel:(RQCollectionModel *)collectionModel;
  39. - (NSArray *)setSelectWithRQCollectionModel:(RQCollectionModel *)collectionModel carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType isSelect:(BOOL)isSelect limitNum:(NSInteger)limit;
  40. - (NSArray *)setSelectWithRQCollectionModelArr:(NSArray *)collectionModelArr carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType isSelect:(BOOL)isSelect limitNum:(NSInteger)limit complete:(VoidBlock)complete;
  41. - (NSArray *)querySelectedCollectionModelsWithLimitNum:(NSInteger)limit carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType;
  42. - (void)deleteAllCollectionModelsWithComplete:(VoidBlock_int)complete;
  43. - (NSInteger)getAllCollectionModelsCount;
  44. - (void)queryCollectionModelQuestionIdArrWithCarType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType complete:(VoidBlock_id)complete;
  45. @end
  46. NS_ASSUME_NONNULL_END