‘linchangsheng’ 10 月之前
父節點
當前提交
0ff01fbf8f

+ 4 - 1
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/policy/WorkerLogic.java

@@ -306,8 +306,11 @@ public class WorkerLogic {
 
 
         int month = DateUtil.month(startTime);
         int month = DateUtil.month(startTime);
         int month2 = DateUtil.month(policy.getEndTime());
         int month2 = DateUtil.month(policy.getEndTime());
+        int year = DateUtil.year(startTime);
+        int year2 = DateUtil.year(policy.getEndTime());
 
 
-        Integer integer = month2-month+1;
+
+        Integer integer =(year2-year)*12+( month2-month+1);
         if (integer > 12)
         if (integer > 12)
             throw new RemoteServiceException("保险配置错误");
             throw new RemoteServiceException("保险配置错误");