From d70b6f52f7c9b292ffbacc1e713d66ae027111e2 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 14 二月 2025 13:33:02 +0800
Subject: [PATCH] 小程序登录

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java
index 659effc..5bd812d 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java
@@ -241,8 +241,10 @@
         try {
             TBill beforeBill = billService.lambdaQuery().eq(TBill::getContractId, contract.getId()).eq(TBill::getBillType, 1).orderByDesc(TBill::getCreateTime)
                     .last("limit 1").one();
+            if (!beforeBill.getEndTime().toLocalDate().equals(contract.getEndTime().toLocalDate())){
+
+
             while(beforeBill.getEndTime().plusMonths(contract.getPayType().equals("1")? 1:contract.getPayType().equals("2")? 3:12).isBefore(contract.getEndTime())){
-                if (beforeBill.getEndTime().toLocalDate().equals(contract.getEndTime().toLocalDate()))break;
 
                     TBill tBill = new TBill();
                     tBill.setContractId(contract.getId());
@@ -420,6 +422,8 @@
                     }
                     billMapper.insert(tBill);
                 }
+            }
+
         } catch (Exception e) {
             e.printStackTrace();
         }

--
Gitblit v1.7.1