/// <summary> /// 冻结/解冻用户 /// </summary> /// <param name="user">系统用户</param> /// <returns>业务操作结果</returns> public async Task<OperationResult> LockUserOrNot(SysUser user) { user.CheckNotNull("user"); user.IsLocked = !user.IsLocked; await UserRepository.UpdateAsync(user); return new OperationResult(OperationResultType.Success, "操作成功"); }
/// <summary> /// 冻结/解冻用户 /// </summary> /// <param name="user">系统用户</param> /// <returns>业务操作结果</returns> public async Task <OperationResult> LockUserOrNot(SysUser user) { user.CheckNotNull("user"); user.IsLocked = !user.IsLocked; await UserRepository.UpdateAsync(user); return(new OperationResult(OperationResultType.Success, "操作成功")); }