收藏夹

This commit is contained in:
jianzhichu
2026-01-19 17:30:32 +08:00
parent 65e6b48d8e
commit 7c6ee0a8a6
5 changed files with 96 additions and 3 deletions
@@ -1,6 +1,7 @@
using ClockSnowFlake;
using dy.net.model.dto;
using dy.net.model.entity;
using dy.net.utils;
using SqlSugar;
using System.Linq.Expressions;
@@ -22,6 +23,7 @@ namespace dy.net.repository
public async Task<(List<DouyinCollectCate> list, int totalCount)> GetPagedAsync(DouyinCollectCateRequestDto dto)
{
var where = this.Db.Queryable<DouyinCollectCate>()
.Where(x=>x.CateType==dto.cateType)
.WhereIF(!string.IsNullOrWhiteSpace(dto.cookieId), x => x.CookieId == dto.cookieId);
var totalCount = await where.CountAsync();
@@ -52,6 +54,8 @@ 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.UpdateTime = DateTime.Now;
}
});