zwhui há 2 anos atrás
pai
commit
5be389a198

+ 12 - 0
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -1017,6 +1017,18 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 		//订单金额为0 且订单为已完成 更新虚物车票
 		if (orderDon.getMoney().compareTo(BigDecimal.ZERO) == 0) {
 			OrderDon updateOrder = orderDonMapper.selectById(orderDon.getId());
+			//mj镜像续费订单
+			if(orderDon.getOrderType() == 2 && orderDon.getGoodsId() == 26){
+				GroupsRelation groupsRelation = groupsRelationMapper.selectById(orderDon.getRelationId());
+				if(groupsRelation != null){
+					Date expiryTime = groupsRelation.getExpiryTime();
+
+					//mj续费订单当天过期直接加次数
+					if (expiryTime != null && DateUtil.isSameDay(new Date(), expiryTime)) {
+						mjRenewOrder(orderDon);
+					}
+				}
+			}
 			updateOrder.setStatus(goodsDon.getType() == 1 && goodsDon.getSecondType() == 2 ? OrderDon.Status.complete : OrderDon.Status.hasPayment);
 			updateGroupsTicket(updateOrder, goodsDon, sku);
 			orderDonMapper.updateById(updateOrder);