Jelajahi Sumber

fix 奈飞月付按30天计算车票有效期

zoujiajian 2 tahun lalu
induk
melakukan
2e6bcd09b2

+ 6 - 1
netflix-service/src/main/java/com/cyksj/service/exchange/impl/ExchangeCodeServiceImpl.java

@@ -381,7 +381,12 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
 				if (sku.getDays() != null && sku.getDays() > 0) {
 					newDate = DateUtil.offsetDay(expiryTime, sku.getDays() * 1);
 				} else {
-					newDate = DateUtil.offset(expiryTime, DateField.MONTH, sku.getMonths() * 1);
+					//奈飞月付 按30天计算
+					if (sku.getId() == 4) {
+						newDate = DateUtil.offsetDay(expiryTime, 30);
+					} else {
+						newDate = DateUtil.offset(expiryTime, DateField.MONTH, sku.getMonths() * 1);
+					}
 				}
 				relation.setExpiryTime(newDate);
 				relation.setStartTime(relation.getStartTime() == null ? new Date() : null);

+ 6 - 1
netflix-service/src/main/java/com/cyksj/service/mange/group/CmsGroupServiceImpl.java

@@ -217,7 +217,12 @@ public class CmsGroupServiceImpl extends ServiceImpl<GroupsMapper,GroupsTrips> i
                     if (donSku.getDays() != null && donSku.getDays() > 0) {
                         newDate = DateUtil.offsetDay(expiryTime, donSku.getDays() * 1);
                     } else {
-                        newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * 1);
+                        //奈飞月付 按30天计算
+                        if (donSku.getId() == 4) {
+                            newDate = DateUtil.offsetDay(expiryTime, 30);
+                        } else {
+                            newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * 1);
+                        }
                     }
                     relation.setExpiryTime(newDate);
                     relation.setStartTime(relation.getStartTime() == null ? new Date() : null);

+ 6 - 1
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -1340,7 +1340,12 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 					if (donSku.getDays() != null && donSku.getDays() > 0) {
 						newDate = DateUtil.offsetDay(expiryTime, donSku.getDays() * order.getNum());
 					} else {
-						newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * order.getNum());
+						//奈飞月付 按30天计算
+						if (sku.getId() == 4) {
+							newDate = DateUtil.offsetDay(expiryTime, 30 * order.getNum());
+						} else {
+							newDate = DateUtil.offset(expiryTime, DateField.MONTH, donSku.getMonths() * order.getNum());
+						}
 					}
 					relation.setExpiryTime(newDate);
 					relation.setStartTime(relation.getStartTime() == null ? new Date() : null);