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

Commit 63ec6c64 authored by jiangxiulong's avatar jiangxiulong

批量退款 查询订单状态 3 6的也处理 double处理

parent 8d8a8495
......@@ -68,26 +68,24 @@ public class KylinRefundPerformancesAdminServiceImpl {
HashMap<String, Object> orderStatisAlipay = kylinOrderTicketsMapper.getPerformanceRefundOrderStatis(targetId, paymentTypeAlipay);
String[] paymentTypeWepay = {"APPWEPAY", "APPLETWEPAY", "WAPWEPAY", "JSWEPAY", "wepay"};
HashMap<String, Object> orderStatisWepay = kylinOrderTicketsMapper.getPerformanceRefundOrderStatis(targetId, paymentTypeWepay);
Double totalPriceRefundAlipay = 0.0;
BigDecimal totalPriceRefundAlipay = new BigDecimal(0);
Integer totalRefundNumberAlipay = 0;
Double totalPriceRefundWepay = 0.0;
BigDecimal totalPriceRefundWepay = new BigDecimal(0);
Integer totalRefundNumberWepay = 0;
if (null != orderStatisAlipay || null != orderStatisWepay) {
if (null != orderStatisAlipay) {
BigDecimal totalPriceRefundAlipayBigDecimal = (BigDecimal) orderStatisAlipay.get("total_price_refund");
totalPriceRefundAlipay = totalPriceRefundAlipayBigDecimal.doubleValue();
totalPriceRefundAlipay = (BigDecimal) orderStatisAlipay.get("total_price_refund");
BigDecimal totalRefundNumberAlipayBigDecimal = (BigDecimal) orderStatisAlipay.get("total_refund_number");
totalRefundNumberAlipay = totalRefundNumberAlipayBigDecimal.intValue();
}
if (null != orderStatisWepay) {
BigDecimal totalPriceRefundWepayBigDecimal = (BigDecimal) orderStatisWepay.get("total_price_refund");
totalPriceRefundWepay = totalPriceRefundWepayBigDecimal.doubleValue();
totalPriceRefundWepay = (BigDecimal) orderStatisWepay.get("total_price_refund");
BigDecimal totalRefundNumberWepayBigDecimal = (BigDecimal) orderStatisWepay.get("total_refund_number");
totalRefundNumberWepay = totalRefundNumberWepayBigDecimal.intValue();
}
if (totalPriceRefundAlipay <= 0 && totalPriceRefundWepay <= 0) {
if (totalPriceRefundAlipay.compareTo(BigDecimal.ZERO) <= 0 && totalPriceRefundWepay.compareTo(BigDecimal.ZERO) <= 0) {
return ResponseDto.failure("演出退款金额为0,无需退款");
}
} else {
......@@ -106,8 +104,8 @@ public class KylinRefundPerformancesAdminServiceImpl {
createData.setTargetId(targetId);
createData.setStatus(KylinTableStatusConst.STATUS_APPLY11);
createData.setTotalNum(totalRefundNumberAlipay + totalRefundNumberWepay);
createData.setTotalAlipay(BigDecimal.valueOf(totalPriceRefundAlipay));
createData.setTotalWepay(BigDecimal.valueOf(totalPriceRefundWepay));
createData.setTotalAlipay(totalPriceRefundAlipay);
createData.setTotalWepay(totalPriceRefundWepay);
createData.setCreatedAt(LocalDateTime.now());
int resNum = kylinOrderRefundBatchesMapper.insert(createData);
if (resNum > 0) {
......
......@@ -59,7 +59,7 @@
JOIN kylin_order_ticket_status AS s ON s.order_id = o.order_tickets_id
<where>
r.performance_id=#{targetId}
AND s.status=1
AND s.status IN (1, 3, 6)
AND s.pay_status=1
AND o.coupon_type='no'
AND o.payment_type IN
......
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