Пример #1
0
        public override async Task <UserRoleResponse> GetUserRole(GetUserRoleRequest request, ServerCallContext context)
        {
            var getUserRoleQuery = _mapper.Map <GetUserRoleQuery>(request);
            var response         = await _mediator.Send(getUserRoleQuery);

            return(_mapper.Map <UserRoleResponse>(response));
        }
Пример #2
0
 /// <summary>
 /// 获取角色信息
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public async Task <ResponseBase> ProcessAction(GetUserRoleRequest request)
 {
     if (request.UserRoleId.Equals(0))
     {
         return(GetAnNewRole());
     }
     return(await GetRoleView(request.UserRoleId));
 }
Пример #3
0
 public async Task <ResponseBase> GetUserRole([FromBody] GetUserRoleRequest request)
 {
     try
     {
         var action = new GetUserRoleAction(_sysUserRoleBll);
         return(await action.ProcessAction(request));
     }
     catch (Exception ex)
     {
         Log.Error(request, ex, this.GetType());
         return(ResponseBase.CodeError());
     }
 }