Forráskód Böngészése

fix 奈飞月付退款,车票时间计算

zoujiajian 2 éve
szülő
commit
bb893a36e3

+ 10 - 2
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderCommonServiceImpl.java

@@ -95,7 +95,11 @@ public class OrderCommonServiceImpl implements OrderCommonService {
 						if (sku.getDays() != null && sku.getDays() > 0) {
 							refundExpiryTime = DateUtil.offsetDay(expiryTime, -sku.getDays() * num);
 						} else {
-							refundExpiryTime = DateUtil.offsetMonth(expiryTime, -sku.getMonths() * num);
+							if (sku.getGoodsId() == 1 && sku.getMonths() == 1) {
+								refundExpiryTime = DateUtil.offsetDay(expiryTime, -30);
+							} else {
+								refundExpiryTime = DateUtil.offsetMonth(expiryTime, -sku.getMonths() * num);
+							}
 						}
 						if (now.isBefore(refundExpiryTime)) {
 							isFlag = false;
@@ -121,7 +125,11 @@ public class OrderCommonServiceImpl implements OrderCommonService {
 						if (sku.getDays() != null && sku.getDays() > 0) {
 							expiryTime = DateUtil.offsetDay(expiryTime, -sku.getDays() * num);
 						} else {
-							expiryTime = DateUtil.offsetMonth(expiryTime, -sku.getMonths() * num);
+							if (sku.getGoodsId() == 1 && sku.getMonths() == 1) {
+								expiryTime = DateUtil.offsetDay(expiryTime, -30);
+							} else{
+								expiryTime = DateUtil.offsetMonth(expiryTime, -sku.getMonths() * num);
+							}
 						}
 						relation.setExpiryTime(expiryTime);
 						groupsRelationMapper.updateById(relation);