Exemplo n.º 1
0
        private ObjectResult QueryStatus_1_0(String traceService, String requestService, ref String traceMethod)
        {
            var queryStatusRequest = JsonUtil.DeserializeObject <WithdrawBindCardQueryStatusRequest>(_request.BizContent);

            if (!queryStatusRequest.Success)
            {
                _logger.Error(TraceType.ROUTE.ToString(), CallResultStatus.ERROR.ToString(), traceService, requestService, "BizContent解析失败", queryStatusRequest.FirstException, _request.BizContent);
                return(new ObjectResult(null, ErrorCode.BIZ_CONTENT_DESERIALIZE_FAILED));
            }
            queryStatusRequest.Value.AppId = _request.AppId;
            traceMethod = $"{_service.GetType().FullName}.{nameof(_service.QueryBindCardStatus)}(...)";
            _logger.Trace(TraceType.ROUTE.ToString(), CallResultStatus.OK.ToString(), traceService, traceMethod, LogPhase.BEGIN, "开始查询个人绑卡状态", queryStatusRequest.Value);

            var queryStatusResult = _service.QueryBindCardStatus(queryStatusRequest.Value);

            _logger.Trace(TraceType.ROUTE.ToString(), (queryStatusResult.Success ? CallResultStatus.OK : CallResultStatus.ERROR).ToString(), traceService, traceMethod, LogPhase.END, "结束查询个人绑卡状态", queryStatusResult.Value);

            return(queryStatusResult.Success ? new ObjectResult(queryStatusResult.Value) : new ObjectResult(null, queryStatusResult.ErrorCode, queryStatusResult.FirstException));
        }