关注列表增加2个搜索条件

This commit is contained in:
jianzhichu
2026-03-19 20:22:21 +08:00
parent 2aef300ab0
commit 77dbb8048e
7 changed files with 24 additions and 7 deletions
+3 -1
View File
@@ -43,7 +43,9 @@ namespace dy.net.repository
{
var where = this.Db.Queryable<DouyinFollowed>()
.Where(x => x.mySelfId == dto.MySelfId)
.WhereIF(!string.IsNullOrWhiteSpace(dto.FollowUserName), x => x.UperName.Contains(dto.FollowUserName) || x.DouyinNo.Contains(dto.FollowUserName));
.WhereIF(!string.IsNullOrWhiteSpace(dto.FollowUserName), x => x.UperName.Contains(dto.FollowUserName) || x.DouyinNo.Contains(dto.FollowUserName))
.WhereIF(dto.OpenSync,x=>x.OpenSync)
.WhereIF(dto.FullSync,x=>x.FullSync &&x.OpenSync);
var totalCount = await where.CountAsync();
var list = await where.OrderByDescending(x => x.OpenSync).OrderByDescending(x => x.LastSyncTime).Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
return (list, totalCount);