提交2。0代码

dev-discount
袁野 2 years ago
parent 3da4b9061e
commit e2e6d22948
  1. 6
      hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java
  2. 11
      hai-service/src/main/java/com/hai/service/impl/OutRechargeChildOrderServiceImpl.java

@ -1,5 +1,6 @@
package com.hai.schedule;
import com.hai.entity.HighChildOrder;
import com.hai.entity.OutRechargeChildOrder;
import com.hai.entity.OutRechargeOrder;
import com.hai.service.OutRechargeChildOrderService;
@ -116,6 +117,11 @@ public class HighRechargeOrderSchedule {
if (orderList != null && orderList.size() > 0) {
for (OutRechargeOrder order : orderList) {
try {
OutRechargeChildOrder childOrder = rechargeChildOrderService.findByOrderId(order.getId());
outRechargeOrderService.refundOrder(order.getId() , childOrder);
outRechargeOrderService.rechargeOrderToRefund(order.getId());
} catch (Exception e) {
log.error("HighCouponSchedule --> expiredCoupon() error!", e);

@ -72,6 +72,17 @@ public class OutRechargeChildOrderServiceImpl implements OutRechargeChildOrderSe
@Override
public OutRechargeChildOrder findByOrderId(Long orderId) {
OutRechargeChildOrderExample example = new OutRechargeChildOrderExample();
OutRechargeChildOrderExample.Criteria criteria = example.createCriteria();
criteria.andParentOrderIdEqualTo(orderId);
List<OutRechargeChildOrder> list = rechargeChildOrderMapper.selectByExample(example);
if (list.size() > 0 ) {
return list.get(0);
}
return null;
}

Loading…
Cancel
Save