优化
This commit is contained in:
@@ -22,6 +22,10 @@ namespace dy.net.service
|
||||
return _cookieRepository.GetAllCookies(whereExpression);
|
||||
}
|
||||
|
||||
public Task<List<DouyinCookie>> GetAllAsync()
|
||||
{
|
||||
return _cookieRepository.GetAllAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> Add(DouyinCookie dyUserCookies)
|
||||
{
|
||||
@@ -85,5 +89,12 @@ namespace dy.net.service
|
||||
}
|
||||
|
||||
|
||||
public async Task<bool> ImportCookies(List<DouyinCookie> cookies)
|
||||
{
|
||||
await _cookieRepository.DeleteAsync(x => !string.IsNullOrWhiteSpace(x.Id));
|
||||
await _cookieRepository.InsertRangeAsync(cookies);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user