Commit e8d2214d by ping.wu

Merge branches 'feature/20211123_预支付接口空指针修复_wuping' and 'master' of…

Merge branches 'feature/20211123_预支付接口空指针修复_wuping' and 'master' of http://gitlab.freemud.com/order-group-application/order-group
parents 24c88525 f93d018b
...@@ -512,13 +512,19 @@ public class PayServiceImpl { ...@@ -512,13 +512,19 @@ public class PayServiceImpl {
} catch (Exception e) { } catch (Exception e) {
AppLogUtil.errorLog("获取预支付信息异常", JSONObject.toJSONString(requestDto), null,e); AppLogUtil.errorLog("获取预支付信息异常", JSONObject.toJSONString(requestDto), null,e);
} }
if (response == null || !ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(response.getCode())) { //预支付接口失败
if (null == response || !Objects.equals(ResponseCodeConstant.RESPONSE_SUCCESS_STR, response.getCode())
|| !Objects.equals(ResponseCodeConstant.RESPONSE_SUCCESS, response.getData().getResultCode()) ) {
String errorMessage = "unified fail";
if(null != response){
errorMessage = StringUtils.isNotEmpty(response.getMessage()) ? response.getMessage() : response.getData().getResultMsg();
}
//打印业务异常 //打印业务异常
if(response != null && printUnifiedPayResponseError){ if(response != null && printUnifiedPayResponseError){
AppLogUtil.errorLog("获取预支付信息失败", JSONObject.toJSONString(requestDto), JSONObject.toJSONString(response), null); AppLogUtil.errorLog("获取预支付信息失败", JSONObject.toJSONString(requestDto), JSONObject.toJSONString(response), null);
} }
//预支付失败需要把原因进行记录 //预支付失败需要把原因进行记录
orderPayResponse.setMsg(response == null ? "unified fail" : response.getMessage()); orderPayResponse.setMsg(errorMessage);
return orderPayResponse; return orderPayResponse;
} }
putDelMq(request.getPartnerId(), request.getStoreId(), response.getData().getFmId(), orderBean.getOid(), null); putDelMq(request.getPartnerId(), request.getStoreId(), response.getData().getFmId(), orderBean.getOid(), null);
......
...@@ -42,7 +42,7 @@ public interface PaymentNewClient { ...@@ -42,7 +42,7 @@ public interface PaymentNewClient {
/** /**
* 创建预支付订单,唤起支付 * 创建预支付订单,唤起支付
*/ */
@LogIgnoreFeign(logMessage="unifiedOrder",statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE) @LogIgnoreFeign(logMessage="unifiedOrder",statusCodeFieldName= ResponseCodeKeyConstant.CODE)
@PostMapping("paymentcenter/unifiedOrder") @PostMapping("paymentcenter/unifiedOrder")
com.freemud.application.sdk.api.base.BaseResponse<UnifiedPayResponseDto> unifiedOrder(@RequestBody UnifiedOrderRequestDto requestDto); com.freemud.application.sdk.api.base.BaseResponse<UnifiedPayResponseDto> unifiedOrder(@RequestBody UnifiedOrderRequestDto requestDto);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment