完成合集、短剧

This commit is contained in:
jianzhichu
2026-01-22 08:33:59 +08:00
parent 7175b3858a
commit e270397334
51 changed files with 3502 additions and 1411 deletions
+11 -4
View File
@@ -55,7 +55,14 @@ namespace dy.net.repository
var totalCount = await where.CountAsync();
var list = await where.OrderByDescending(x => x.SyncTime).Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
List<DouyinVideo> list = new List<DouyinVideo>();
if(string.IsNullOrWhiteSpace(dto.SortField))
list = await where.OrderByDescending(x => x.SyncTime).Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
else
{
list = await where.OrderBy($"{dto.SortField} {dto.SortOrder}").Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
}
if (list.Any())
{
var users = await this.Db.Queryable<DouyinCookie>().ToListAsync();
@@ -93,12 +100,12 @@ namespace dy.net.repository
/// <param name="AuthorId"></param>
/// <param name="ViedoNameSimplify"></param>
/// <returns></returns>
public async Task<(string, string)> GetUperLastViedoFileName(string AuthorId, string ViedoNameSimplify)
public (string, string) GetUperLastViedoFileName(string AuthorId, string ViedoNameSimplify)
{
var video = await this.Db.Queryable<DouyinVideo>().Where(x => x.AuthorId == AuthorId && x.ViedoType == VideoTypeEnum.dy_follows)
var video = this.Db.Queryable<DouyinVideo>().Where(x => x.AuthorId == AuthorId && x.ViedoType == VideoTypeEnum.dy_follows)
.Where(x => x.VideoTitleSimplify == ViedoNameSimplify)
.OrderByDescending(x => x.CreateTime).FirstAsync();
.OrderByDescending(x => x.CreateTime).First();
if (video != null)
{