This commit is contained in:
lijianyou
2025-10-10 13:04:29 +08:00
parent 0e826c3cfa
commit e4dedcad30
13 changed files with 86 additions and 58 deletions
+3 -3
View File
@@ -36,11 +36,11 @@ namespace dy.net.repository
}
var where = this.Db.Queryable<DyCollectVideo>()
.WhereIF(!string.IsNullOrEmpty(tag), x => x.Tag1 == tag)
.WhereIF(!string.IsNullOrEmpty(author), x => x.Author == author)
.WhereIF(!string.IsNullOrWhiteSpace(tag), x => x.Tag1 == tag)
.WhereIF(!string.IsNullOrWhiteSpace(author), x => x.Author == author)
.WhereIF(start.HasValue, x => x.SyncTime >= start.Value)
.WhereIF(end.HasValue, x => x.SyncTime <= end.Value)
.WhereIF(!string.IsNullOrEmpty(viedoType) && viedoType != "*", x => x.ViedoType == viedoType);
.WhereIF(!string.IsNullOrWhiteSpace(viedoType) && viedoType != "*", x => x.ViedoType == viedoType);
var totalCount = await where.CountAsync();
+3 -3
View File
@@ -20,7 +20,7 @@ namespace dy.net.repository
/// <returns></returns>
public async Task<(int code, string erro)> UpdatePwd(UpdatePwdRequest loginUser)
{
if (string.IsNullOrEmpty(loginUser.UserId))
if (string.IsNullOrWhiteSpace(loginUser.UserId))
{
return (-1, "用户不存在");
}
@@ -52,7 +52,7 @@ namespace dy.net.repository
public async Task<LoginUserInfo> GetUser()
{
return await this.GetFirstAsync(x=>!string.IsNullOrEmpty(x.Id));
return await this.GetFirstAsync(x=>!string.IsNullOrWhiteSpace(x.Id));
}
@@ -84,7 +84,7 @@ namespace dy.net.repository
/// <returns></returns>
public (int code, string erro) InitUser(LoginUserInfo userInfo)
{
var isInit = this.GetFirst(x=>!string.IsNullOrEmpty(x.Id));
var isInit = this.GetFirst(x=>!string.IsNullOrWhiteSpace(x.Id));
if (isInit!=null)
{
return (-1, "系统用户已存在");