|
|
@ -7,6 +7,7 @@ import com.hfkj.service.coupon.BsOrderCouponService; |
|
|
|
import com.hfkj.service.goods.BsOrderCinemaService; |
|
|
|
import com.hfkj.service.goods.BsOrderCinemaService; |
|
|
|
import com.hfkj.service.goods.BsOrderStarbucksService; |
|
|
|
import com.hfkj.service.goods.BsOrderStarbucksService; |
|
|
|
import com.hfkj.service.goods.impl.BsOrderGoodsServiceImpl; |
|
|
|
import com.hfkj.service.goods.impl.BsOrderGoodsServiceImpl; |
|
|
|
|
|
|
|
import com.hfkj.service.goods.impl.BsOrderMeiTuanServiceImpl; |
|
|
|
import com.hfkj.sysenum.order.OrderChildProductTypeEnum; |
|
|
|
import com.hfkj.sysenum.order.OrderChildProductTypeEnum; |
|
|
|
import com.hfkj.sysenum.order.OrderChildStatusEnum; |
|
|
|
import com.hfkj.sysenum.order.OrderChildStatusEnum; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -35,6 +36,8 @@ public class OrderRefundSuccessService { |
|
|
|
private BsOrderCouponService orderCouponService; |
|
|
|
private BsOrderCouponService orderCouponService; |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private BsOrderStarbucksService bsOrderStarbucksService; |
|
|
|
private BsOrderStarbucksService bsOrderStarbucksService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private BsOrderMeiTuanServiceImpl bsOrderMeiTuanService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 订单业务处理 |
|
|
|
* 订单业务处理 |
|
|
@ -52,6 +55,9 @@ public class OrderRefundSuccessService { |
|
|
|
} else if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type3.getCode())) { |
|
|
|
} else if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type3.getCode())) { |
|
|
|
// 电影票退款业务
|
|
|
|
// 电影票退款业务
|
|
|
|
cinema(orderChild); |
|
|
|
cinema(orderChild); |
|
|
|
|
|
|
|
} else if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type5.getCode())) { |
|
|
|
|
|
|
|
// 美团退款业务
|
|
|
|
|
|
|
|
meiTuan(orderChild); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
System.out.println("========================================="); |
|
|
|
System.out.println("========================================="); |
|
|
@ -114,6 +120,36 @@ public class OrderRefundSuccessService { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @MethodName meiTuan |
|
|
|
|
|
|
|
* @Description: 美团退款 |
|
|
|
|
|
|
|
* @param childOrder |
|
|
|
|
|
|
|
* @Author: Sum1Dream |
|
|
|
|
|
|
|
* @Date: 2024/9/23 下午2:04 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void meiTuan(BsOrderChild childOrder) { |
|
|
|
|
|
|
|
// 美团退款
|
|
|
|
|
|
|
|
BsOrderMeituan orderMeiTuan = bsOrderMeiTuanService.findOrderMeiTuan(childOrder.getOrderNo()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (orderMeiTuan != null) { |
|
|
|
|
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("orderNo", childOrder.getOrderNo()); |
|
|
|
|
|
|
|
CinemaService.refundMovieOrder(map); |
|
|
|
|
|
|
|
orderMeiTuan.setStatus(OrderChildStatusEnum.status4.getCode()); |
|
|
|
|
|
|
|
orderMeiTuan.setRefundTime(new Date()); |
|
|
|
|
|
|
|
orderMeiTuan.setExceptionStatus(false); |
|
|
|
|
|
|
|
bsOrderMeiTuanService.update(orderMeiTuan); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
orderMeiTuan.setExceptionStatus(true); |
|
|
|
|
|
|
|
orderMeiTuan.setExceptionMsg(e.getMessage()); |
|
|
|
|
|
|
|
bsOrderMeiTuanService.update(orderMeiTuan); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void starbucks(BsOrderChild childOrder) { |
|
|
|
public void starbucks(BsOrderChild childOrder) { |
|
|
|
// 查询星巴克订单
|
|
|
|
// 查询星巴克订单
|
|
|
|
BsOrderStarbucks orderStarbucks = bsOrderStarbucksService.findGoodsOrder(childOrder.getOrderNo()); |
|
|
|
BsOrderStarbucks orderStarbucks = bsOrderStarbucksService.findGoodsOrder(childOrder.getOrderNo()); |
|
|
|