feat: incr sync version.
This commit is contained in:
parent
792dadf5f2
commit
e4503b4ec3
@ -86,7 +86,7 @@ func (ds *DataFetcher[T]) FetchMissingAndFillLocal(ctx context.Context, uids []s
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(serverData) > 0 {
|
||||
if err := ds.batchInsert(ctx, serverData); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -94,5 +94,7 @@ func (ds *DataFetcher[T]) FetchMissingAndFillLocal(ctx context.Context, uids []s
|
||||
localData = append(localData, serverData...)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return localData, nil
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ func (d *DataBase) InsertGroupMember(ctx context.Context, groupMember *model_str
|
||||
func (d *DataBase) BatchInsertGroupMember(ctx context.Context, groupMemberList []*model_struct.LocalGroupMember) error {
|
||||
d.groupMtx.Lock()
|
||||
defer d.groupMtx.Unlock()
|
||||
return errs.WrapMsg(d.conn.WithContext(ctx).Create(groupMemberList).Error, "BatchInsertMessageList failed")
|
||||
return errs.WrapMsg(d.conn.WithContext(ctx).Create(groupMemberList).Error, "BatchInsertGroupMember failed")
|
||||
}
|
||||
|
||||
func (d *DataBase) DeleteGroupMember(ctx context.Context, groupID, userID string) error {
|
||||
|
Loading…
x
Reference in New Issue
Block a user