feat: add fnOS packaging, storage workflows and release pipeline

This commit is contained in:
2026-08-11 18:05:49 +08:00
parent c5922f9b08
commit 95932f0199
181 changed files with 24024 additions and 1164 deletions
+16 -2
View File
@@ -7,6 +7,13 @@ using SqlSugar;
namespace dy.net.service
{
public enum AddFollowResult
{
Added,
AlreadyExists,
Failed
}
public class DouyinFollowService
{
@@ -30,16 +37,23 @@ namespace dy.net.service
/// <param name="followed"></param>
/// <returns></returns>
public async Task<bool> AddAsync(DouyinFollowed followed)
{
return await TryAddAsync(followed) == AddFollowResult.Added;
}
public async Task<AddFollowResult> TryAddAsync(DouyinFollowed followed)
{
var foll = await _followRepository.GetFirstAsync(x => x.SecUid == followed.SecUid && x.mySelfId == followed.mySelfId);
if (foll != null)
{
return false;
return AddFollowResult.AlreadyExists;
}
followed.Id = IdGener.GetLong().ToString();
followed.LastSyncTime = DateTime.UtcNow;
followed.IsNoFollowed = true;
return await _followRepository.InsertAsync(followed);
return await _followRepository.InsertAsync(followed)
? AddFollowResult.Added
: AddFollowResult.Failed;
}
/// <summary>