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

Commit be775535 authored by 胡佳晨's avatar 胡佳晨

支付逻辑提交

parent a6bc4291
...@@ -20,4 +20,7 @@ public interface IDragonOrderRefundsService { ...@@ -20,4 +20,7 @@ public interface IDragonOrderRefundsService {
*/ */
ResponseDto<DragonRefundAppDto> dragonRefund(String orderCode, String tradeNo, String outTradeNo, String reason, String returnUrl, BigDecimal price, String paymentType,String paymentId); ResponseDto<DragonRefundAppDto> dragonRefund(String orderCode, String tradeNo, String outTradeNo, String reason, String returnUrl, BigDecimal price, String paymentType,String paymentId);
ResponseDto<DragonRefundAppDto> wePayRefundCallBack();
} }
...@@ -118,6 +118,80 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService ...@@ -118,6 +118,80 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
} }
public void wepaySomeThing(){
DragonRefundChannelDto channelDto = new DragonRefundChannelDto();
RefundContentDto contentDto = new RefundContentDto();
String xml = "<xml><result_code>SUCCESS</result_code></xml>";
// if (response.getFundChange().equals("N") || response.getFundChange() == null) {
// try {
// String refundError = "";
// refundStatus = DragonConstant.RefundStatusEnum.STATUS_ERROR.getCode();
// if (null == response.getSubMsg()) {
// refundError = "退款失败,原因未知";
// } else {
// refundError = response.getSubMsg();
// }
// // 修改退款订单
// sendMySqlRedis(
// SqlMapping.get("dragon_order_refund_error.update"),
// new Object[]{nowTime, refundError, refundStatus, orderRefundId}
// );
// } catch (Exception e) {
// e.printStackTrace();
// //保存错误信息
// log.error("");
// channelDto.setResult("exception");
// channelDto.setMessage("update order refund with db error: " + e.getMessage());
// contentDto.setRequest(JSON.toJSONString(response.getParams()));
// contentDto.setResponse(response.getBody());
// channelDto.setContent(contentDto);
// return channelDto;
// }
// channelDto.setResult("error");
// channelDto.setMessage(paymentType + " refund error: ");
// contentDto.setRequest(JSON.toJSONString(response.getParams()));
// contentDto.setResponse(response.getBody());
// channelDto.setContent(contentDto);
// return channelDto;
// }
//
// // 创建退款日志
// sendMySqlRedis(
// SqlMapping.get("dragon_order_refund_log.insert"),
// new Object[]{orderRefundId, paymentType, JSON.toJSONString(response.getBody()), nowTime, nowTime}
// );
// try {
// String refundAt = "";
// if (response.getFundChange().equals("Y")) {
// refundStatus = DragonConstant.RefundStatusEnum.STATUS_REFUNDED.getCode();
// refundAt = DateUtil.format(response.getGmtRefundPay(), DateUtil.Formatter.yyyyMMddHHmmss);
// } else {
// refundStatus = DragonConstant.RefundStatusEnum.STATUS_REFUNDING.getCode();
// }
// sendMySqlRedis(
// SqlMapping.get("dragon_order_refund_success.update"),
// new Object[]{nowTime, refundAt, refundStatus, orderRefundId}
// );
// } catch (Exception e) {
// e.printStackTrace();
// log.error("");
// channelDto.setResult("exception");
// channelDto.setMessage("update order refund with db error: " + e.getMessage());
// contentDto.setRequest(JSON.toJSONString(response.getParams()));
// contentDto.setResponse(response.getBody());
// channelDto.setContent(contentDto);
// return channelDto;
// }
// channelDto.setResult("refunded");
// channelDto.setMessage(paymentType + " refund info: ");
// contentDto.setRequest(JSON.toJSONString(response.getParams()));
// contentDto.setResponse(response.getBody());
// channelDto.setContent(contentDto);
// return channelDto;
}
public DragonRefundChannelDto aliPayRefund(String orderRefundId, String refundCode, String code, String reason, BigDecimal price, String paymentId, String paymentType, LocalDateTime nowTime) { public DragonRefundChannelDto aliPayRefund(String orderRefundId, String refundCode, String code, String reason, BigDecimal price, String paymentId, String paymentType, LocalDateTime nowTime) {
String refundStatus; String refundStatus;
......
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