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

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

店铺折扣券 向下取整。支付宝扫码退款

parent a3ade554
......@@ -93,19 +93,19 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
if (insertResult) {
switch (paymentType) {
case DragonConstant.REFUND_TYPE_APP_ALIPAY:
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime);
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime,orderCode);
break;
case DragonConstant.REFUND_TYPE_WAP_ALIPAY:
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime);
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime,orderCode);
break;
case DragonConstant.REFUND_TYPE_WEB_ALIPAY:
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime);
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime,orderCode);
break;
case DragonConstant.REFUND_TYPE_APP_WEPAY:
dto = weyPayRefund(code, orderRefundCode, code, reason, price, priceTotal, paymentId, paymentType, localWePayCallBackUrl, nowTime);
break;
case DragonConstant.REFUND_TYPE_MICROPAY_ALIPAY:
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime);
dto = aliPayRefund(code, orderRefundCode, code, reason, price, paymentId, paymentType, nowTime,orderCode);
break;
case DragonConstant.REFUND_TYPE_WAP_WEPAY:
dto = weyPayRefund(code, orderRefundCode, code, reason, price, priceTotal, paymentId, paymentType, localWePayCallBackUrl, nowTime);
......@@ -528,7 +528,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
//支付宝退款接口
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 orderCode) {
String refundStatus;
DragonRefundChannelDto channelDto = new DragonRefundChannelDto();
RefundContentDto contentDto = new RefundContentDto();
......@@ -610,10 +610,11 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
channelDto.setContent(contentDto);
if(DragonConstant.REFUND_TYPE_MICROPAY_ALIPAY.equals(paymentType) && response.getFundChange().equals("Y")) {
AliPayRefundReturnCallBackDto map = AliPayRefundReturnCallBackDto.getNew();
map.setOutBizNo(response.getOutTradeNo());
map.setTradeNo(response.getTradeNo());
map.setOutTradeNo(response.getOutTradeNo());
map.setOutBizNo(refundCode);
map.setTradeNo(paymentId);
map.setOutTradeNo(orderCode);
map.setGmtRefund(DateUtil.format(response.getGmtRefundPay(), DateUtil.Formatter.yyyyMMddHHmmss));
log.info(JSON.toJSONString(map));
aliPayRefundCallBack(JSON.toJSONString(map));
}
return channelDto;
......
......@@ -265,7 +265,7 @@ public class GoblinOrderUtils {
returnVo.setValue(vo.getValFace());
returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("2")) {//折扣
BigDecimal tempPrice = totalPrice.subtract(totalPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP));
BigDecimal tempPrice = totalPrice.subtract(totalPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_DOWN));
if (tempPrice.compareTo(vo.getDeduction()) > 0) {
tempPrice = vo.getDeduction();
}
......@@ -312,7 +312,7 @@ public class GoblinOrderUtils {
}
returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("2")) {//折扣
BigDecimal tempPrice = contentPrice.subtract(contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP));
BigDecimal tempPrice = contentPrice.subtract(contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_DOWN));
if (tempPrice.compareTo(vo.getDeduction()) > 0) {
tempPrice = vo.getDeduction();
}
......
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