/// <summary>
 /// 根据用户Id更新用户的最后登录时间
 /// </summary>
 /// <param name="userId"></param>
 /// <returns></returns>
 public Task UpdateLastLoginTimeAsync(long userId)
 {
     return(UpdateDiy.Set(r => new LinUser()
     {
         LastLoginTime = DateTime.Now
     }).Where(r => r.Id == userId).ExecuteAffrowsAsync());
 }
Exemple #2
0
        public async Task <bool> SoftDeleteAsync(TKey[] ids)
        {
            await UpdateDiy
            .SetDto(new { IsDeleted = true, ModifiedUserId = _user.Id, ModifiedUserName = _user.Name })
            .WhereDynamic(ids)
            .ExecuteAffrowsAsync();

            return(true);
        }
        public async Task <bool> SoftDeleteAsync(TKey[] ids)
        {
            await UpdateDiy
            .SetDto(new { IsDeleted = true, UpdatedBy = _authUser.Id, UpdatedByName = _authUser.UserName })
            .WhereDynamic(ids)
            .ExecuteAffrowsAsync();

            return(true);
        }
Exemple #4
0
        public async Task <bool> SoftDeleteAsync(TKey[] ids)
        {
            await UpdateDiy
            .SetDto(new
            {
                IsDeleted = true
            })
            .WhereDynamic(ids)
            .ExecuteAffrowsAsync();

            return(true);
        }
Exemple #5
0
        public async Task <bool> SoftDeleteAsync(Expression <Func <TEntity, bool> > exp, params string[] name)
        {
            await UpdateDiy
            .SetDto(new
            {
                IsDeleted        = true,
                ModifiedUserId   = User.Id,
                ModifiedUserName = User.Name
            })
            .Where(exp)
            .DisableGlobalFilter(name)
            .ExecuteAffrowsAsync();

            return(true);
        }