12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //
- // SDJKDBManager.h
- // SDJK
- //
- // Created by 张嵘 on 2021/8/26.
- //
- #import <Foundation/Foundation.h>
- //#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
|