记得上下班打卡 | git大法好,push需谨慎

Commit 072b2288 authored by 胡佳晨's avatar 胡佳晨

修改 退款 错误 日志提示

parent 5c335e88
......@@ -43,4 +43,8 @@ public class WePayRefundReturnDto {
private String couponRefundCount;
@XStreamAlias("cash_refund_fee")
private String cashRefundFee;
@XStreamAlias("err_code")
private String errCode;
@XStreamAlias("err_code_des")
private String errCodeDes;
}
......@@ -104,11 +104,10 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
} else if (dto.getResult().equalsIgnoreCase("error")) {
//调用回调
log.error("");
return ResponseDto.failure("退款失败:" + dto.getMessage());
} else if (dto.getResult().equalsIgnoreCase("exception")) {
log.error("");
}
DragonRefundAppDto refundAppDto = new DragonRefundAppDto();
refundAppDto.setOrderCode(orderCode);
refundAppDto.setCode(code);
......@@ -167,6 +166,14 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
String jsonStr = EntityUtils.toString(entity, "UTF-8");
log.debug("JSONSTR = " + jsonStr);
WePayRefundReturnDto wePayRefundReturnDto = XmlUtil.toBean(jsonStr, WePayRefundReturnDto.class);
if (wePayRefundReturnDto.getErrCodeDes() != null) {
channelDto.setResult("error");
channelDto.setMessage(paymentType + " refund error: " + wePayRefundReturnDto.getErrCodeDes());
contentDto.setRequest(data);
contentDto.setResponse(jsonStr);
channelDto.setContent(contentDto);
return channelDto;
}
log.debug("BEAN = " + wePayRefundReturnDto);
if (!wePayRefundReturnDto.getReturnCode().equalsIgnoreCase("SUCCESS") || wePayRefundReturnDto.getReturnCode() == null) {
try {
......@@ -376,7 +383,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
dto.setRefundPrice(info.getRefundFee());
dto.setRefundAt(refundAt);
dto.setRefundError(callBackDto.getReturnMsg());
log.debug("SEND WEPAY NOTIFTURL = "+ JSON.toJSONString(dto));
log.debug("SEND WEPAY NOTIFTURL = " + JSON.toJSONString(dto));
sendNotifyUrl(dto);
mqHandleUtil.sendMySqlRedis(
......@@ -432,7 +439,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
dto.setRefundAt(callBackDto.getGmtRefund());
dto.setRefundPrice(response.getRefundAmount());
dto.setRefundError("");
log.debug("SEND ALIPAY NOTIFTURL = "+ JSON.toJSONString(dto));
log.debug("SEND ALIPAY NOTIFTURL = " + JSON.toJSONString(dto));
sendNotifyUrl(dto);
mqHandleUtil.sendMySqlRedis(
......@@ -473,7 +480,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
params.add("refundError", notifyUrlDto.getRefundError());
params.add("refundPrice", notifyUrlDto.getRefundPrice());
params.add("status", notifyUrlDto.getStatus().toString());
String response = HttpUtil.post( dataUtils.getRefundNotifyUrl(DragonConstant.REFUND_REDIS_KET + notifyUrlDto.getOrderRefundCode()), params);
String response = HttpUtil.post(dataUtils.getRefundNotifyUrl(DragonConstant.REFUND_REDIS_KET + notifyUrlDto.getOrderRefundCode()), params);
log.debug("RETURN RESPONSE=" + response);
if (response.equals("success")) {
mqHandleUtil.sendMySqlRedis(
......
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