/// <summary> /// 删除权限 /// </summary> /// <param name="request"></param> /// <returns></returns> public DelPermissionsResponse DelPermissions(DelPermissionsRequest request) { var response = new DelPermissionsResponse(); try { var entity = _permissionsRepository.Find <PermissionsPo>(e => e.IsValid == 1 && e.Id == request.Id); if (entity == null) { throw new Exception("删除权限不存在"); } entity.IsValid = 0; EntityLogger.UpdateEntity(entity); _permissionsRepository.UpdateColumns(entity, e => new { e.IsValid, e.UpdateTime, e.UpdateUserId }); } catch (Exception ex) { response.IsSuccess = false; response.MessageCode = "-1"; response.MessageText = ex.ToString(); LogManager.LogicLogger.ErrorFormat("删除权限出错:{0}", new { request, err = ex.ToString() }.ToJson()); } return(response); }