|
|
@ -7,10 +7,12 @@ import com.hfkj.common.exception.SysCode; |
|
|
|
import com.hfkj.config.CommonSysConst; |
|
|
|
import com.hfkj.config.CommonSysConst; |
|
|
|
import com.hfkj.entity.BsOrderChild; |
|
|
|
import com.hfkj.entity.BsOrderChild; |
|
|
|
import com.hfkj.entity.BsOrderCinema; |
|
|
|
import com.hfkj.entity.BsOrderCinema; |
|
|
|
|
|
|
|
import com.hfkj.entity.BsOrderCoupon; |
|
|
|
import com.hfkj.entity.BsOrderGoods; |
|
|
|
import com.hfkj.entity.BsOrderGoods; |
|
|
|
import com.hfkj.model.order.OrderChildModel; |
|
|
|
import com.hfkj.model.order.OrderChildModel; |
|
|
|
import com.hfkj.model.order.OrderModel; |
|
|
|
import com.hfkj.model.order.OrderModel; |
|
|
|
import com.hfkj.qianzhu.channel.CinemaService; |
|
|
|
import com.hfkj.qianzhu.channel.CinemaService; |
|
|
|
|
|
|
|
import com.hfkj.service.coupon.BsOrderCouponService; |
|
|
|
import com.hfkj.service.goods.BsOrderCinemaService; |
|
|
|
import com.hfkj.service.goods.BsOrderCinemaService; |
|
|
|
import com.hfkj.service.goods.impl.BsOrderGoodsServiceImpl; |
|
|
|
import com.hfkj.service.goods.impl.BsOrderGoodsServiceImpl; |
|
|
|
import com.hfkj.sysenum.order.OrderChildProductTypeEnum; |
|
|
|
import com.hfkj.sysenum.order.OrderChildProductTypeEnum; |
|
|
@ -19,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
@ -37,6 +40,8 @@ public class OrderRefundSuccessService { |
|
|
|
private BsOrderCinemaService bsOrderCinemaService; |
|
|
|
private BsOrderCinemaService bsOrderCinemaService; |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private BsOrderGoodsServiceImpl bsOrderGoodsService; |
|
|
|
private BsOrderGoodsServiceImpl bsOrderGoodsService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private BsOrderCouponService orderCouponService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 订单业务处理 |
|
|
|
* 订单业务处理 |
|
|
@ -49,7 +54,8 @@ public class OrderRefundSuccessService { |
|
|
|
// 实物产品退款业务
|
|
|
|
// 实物产品退款业务
|
|
|
|
goods(orderChild); |
|
|
|
goods(orderChild); |
|
|
|
} else if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type2.getCode())) { |
|
|
|
} else if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type2.getCode())) { |
|
|
|
// todo 虚拟产品退款业务
|
|
|
|
// 虚拟产品退款业务
|
|
|
|
|
|
|
|
orderCoupon(orderChild); |
|
|
|
} else if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type3.getCode())) { |
|
|
|
} else if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type3.getCode())) { |
|
|
|
// 电影票退款业务
|
|
|
|
// 电影票退款业务
|
|
|
|
cinema(orderChild); |
|
|
|
cinema(orderChild); |
|
|
@ -82,9 +88,20 @@ public class OrderRefundSuccessService { |
|
|
|
orderGoods.setExceptionMsg(e.getMessage()); |
|
|
|
orderGoods.setExceptionMsg(e.getMessage()); |
|
|
|
bsOrderGoodsService.update(orderGoods); |
|
|
|
bsOrderGoodsService.update(orderGoods); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void orderCoupon(BsOrderChild childOrder) { |
|
|
|
|
|
|
|
// 查询虚拟订单
|
|
|
|
|
|
|
|
BsOrderCoupon orderCoupon = orderCouponService.getDetailByChildOrderNo(childOrder.getChildOrderNo()); |
|
|
|
|
|
|
|
if (orderCoupon != null) { |
|
|
|
|
|
|
|
orderCoupon.setRefundTime(new Date()); |
|
|
|
|
|
|
|
orderCoupon.setStatus(OrderChildStatusEnum.status4.getCode()); |
|
|
|
|
|
|
|
orderCouponService.editData(orderCoupon); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void cinema(BsOrderChild childOrder) { |
|
|
|
public void cinema(BsOrderChild childOrder) { |
|
|
|
// 查询电影票订单
|
|
|
|
// 查询电影票订单
|
|
|
|
BsOrderCinema orderCinema = bsOrderCinemaService.findGoodsOrder(childOrder.getOrderNo()); |
|
|
|
BsOrderCinema orderCinema = bsOrderCinemaService.findGoodsOrder(childOrder.getOrderNo()); |
|
|
|