关注博主列表同步bug修复

This commit is contained in:
jianzhichu
2026-01-22 21:38:42 +08:00
parent b331e73bd3
commit e011bd089f
26 changed files with 424 additions and 89 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ namespace dy.net.repository
if (dtoDict.TryGetValue(item.Id, out var dtocate))
{
item.Sync = dtocate.Sync;
item.SaveFolder = string.IsNullOrWhiteSpace(dtocate.Folder) ? DouyinFileNameHelper.SanitizeLinuxFileName(item.Name, item.Id, true) : dtocate.Folder;
item.SaveFolder = string.IsNullOrWhiteSpace(dtocate.SaveFolder) ? DouyinFileNameHelper.SanitizeLinuxFileName(item.Name, item.Id, true) : dtocate.SaveFolder;
item.UpdateTime = DateTime.Now;
}
});
+11
View File
@@ -51,5 +51,16 @@ namespace dy.net.repository
return res > 0;
}
public async Task<bool> UpdateCookie(DouyinCookie cookie)
{
if (cookie != null)
{
var res = await Db.Updateable<DouyinCookie>(cookie).IgnoreColumns(x => new { x.MyUserId }).ExecuteCommandAsync();
return res > 0;
}
return false;
}
}
}
+1 -1
View File
@@ -208,7 +208,7 @@ namespace dy.net.repository
// 6. 提交事务
await Db.Ado.CommitTranAsync();
// 【重要】删除逻辑已移除:增量场景下不能通过批次对比删除,需单独设计取消关注逻辑
Serilog.Log.Debug($"dy_followed_users{ck.UserName}关注列表同步完成:新增{toAddFollows.Count}条,更新{toUpdateFollows.Count}条");
Serilog.Log.Debug($"[{ck.UserName}]关注列表同步完成:新增{toAddFollows.Count}条,更新{toUpdateFollows.Count}条");
return (toAddFollows.Count, toUpdateFollows.Count, true);
}
catch (Exception ex)