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

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

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

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