// // SDJKDBManager.h // SDJK // // Created by 张嵘 on 2021/8/26. // #import //#import "RQHomePageModule.h" NS_ASSUME_NONNULL_BEGIN #define RQ_SDJK_DB_MANAGER [SDJKDBManager sharedInstance] @class RQWrongModel, RQCollectionModel; @interface SDJKDBManager : NSObject /// 单例 + (instancetype) sharedInstance; #pragma mark - WrongList - (void)addWrongRecordWithRQWrongModel:(RQWrongModel *)wrongModel; - (void)addWrongRecordWithRQWrongModelArr:(NSArray *)wrongModelArr isClearOldData:(BOOL)isClearOldData complete:(_Nullable VoidBlock)complete; - (void)updateWrongRecordWithRQWrongModel:(RQWrongModel *)wrongModel; - (void)deleteWrongRecordWithQuestionId:(NSInteger)questionId; - (void)deleteWrongRecordWithIdArr:(NSArray *)idArr; - (BOOL)isExistWithRQWrongModel:(RQWrongModel *)wrongModel; - (BOOL)isSelectWithRQWrongModel:(RQWrongModel *)wrongModel; - (NSArray *)setSelectWithRQWrongModel:(RQWrongModel *)wrongModel carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType isSelect:(BOOL)isSelect limitNum:(NSInteger)limit; - (NSArray *)setSelectWithRQWrongModelArr:(NSArray *)wrongModelArr carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType isSelect:(BOOL)isSelect limitNum:(NSInteger)limit complete:(VoidBlock)complete; - (NSArray *)querySelectedWrongModelsWithLimitNum:(NSInteger)limit carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType; - (NSArray *)querySelectedWrongModelsQuestionIdArrWithLimitNum:(NSInteger)limit carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType; - (void)deleteAllWrongModelsWithComplete:(VoidBlock_int)complete; - (NSInteger)getAllWrongModelsCount; - (void)queryWrongModelQuestionIdArrWithCarType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType complete:(VoidBlock_id)complete; #pragma mark - CollectionList - (void)addCollectionRecordWithRQCollectionModel:(RQCollectionModel *)collectionModel; - (void)addCollectionRecordWithQuestionIdArr:(NSArray *)questionIdArr; - (void)addCollectionRecordWithRQCollectionModelArr:(NSArray *)collectionModelArr isClearOldData:(BOOL)isClearOldData complete:(_Nullable VoidBlock)complete; - (void)updateCollectionRecordWithRQCollectionModel:(RQCollectionModel *)collectionModel; - (void)deleteCollectionRecordWithQuestionId:(NSInteger)questionId; - (void)deleteCollectionRecordWithIdArr:(NSArray *)idArr; - (BOOL)isExistWithRQCollectionModel:(RQCollectionModel *)collectionModel; - (BOOL)isSelectWithRQCollectionModel:(RQCollectionModel *)collectionModel; - (NSArray *)setSelectWithRQCollectionModel:(RQCollectionModel *)collectionModel carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType isSelect:(BOOL)isSelect limitNum:(NSInteger)limit; - (NSArray *)setSelectWithRQCollectionModelArr:(NSArray *)collectionModelArr carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType isSelect:(BOOL)isSelect limitNum:(NSInteger)limit complete:(VoidBlock)complete; - (NSArray *)querySelectedCollectionModelsWithLimitNum:(NSInteger)limit carType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType; - (void)deleteAllCollectionModelsWithComplete:(VoidBlock_int)complete; - (NSInteger)getAllCollectionModelsCount; - (void)queryCollectionModelQuestionIdArrWithCarType:(RQHomePageCarType)carType subjectType:(RQHomePageSubjectType)subjectType complete:(VoidBlock_id)complete; @end NS_ASSUME_NONNULL_END