|
|
|
@ -8,10 +8,7 @@ import com.hfkj.common.exception.SysCode; |
|
|
|
|
import com.hfkj.common.utils.DateUtil; |
|
|
|
|
import com.hfkj.common.utils.RandomUtils; |
|
|
|
|
import com.hfkj.dao.BsOrderRefundMapper; |
|
|
|
|
import com.hfkj.entity.BsMerPayConfig; |
|
|
|
|
import com.hfkj.entity.BsOrder; |
|
|
|
|
import com.hfkj.entity.BsOrderRefund; |
|
|
|
|
import com.hfkj.entity.BsOrderRefundExample; |
|
|
|
|
import com.hfkj.entity.*; |
|
|
|
|
import com.hfkj.mer.BsMerPayConfigService; |
|
|
|
|
import com.hfkj.model.order.OrderChildModel; |
|
|
|
|
import com.hfkj.model.order.OrderModel; |
|
|
|
@ -39,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @className: BsOrderRefundServiceImpl |
|
|
|
@ -229,8 +227,17 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService { |
|
|
|
|
|
|
|
|
|
// 退款业务处理
|
|
|
|
|
orderRefundSuccessService.orderRefundHandle(orderChild); |
|
|
|
|
|
|
|
|
|
orderChildService.editData(orderChild); |
|
|
|
|
|
|
|
|
|
// 查询子订单已全部退款
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
map.put("orderNo", orderChild.getOrderNo()); |
|
|
|
|
List<BsOrderChild> orderChildList = orderChildService.getList(map); |
|
|
|
|
if (orderChildList.size() == orderChildList.stream().filter(o->o.getStatus().equals(OrderChildStatusEnum.status4.getCode())).collect(Collectors.toList()).size()) { |
|
|
|
|
order.setOrderStatus(OrderStatusEnum.status4.getCode()); |
|
|
|
|
order.setRefundTime(new Date()); |
|
|
|
|
orderService.editData(order); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 删除缓存
|
|
|
|
|