From e7785b46994f1a9c841bc452e4f2d557b867e55a Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Fri, 9 Mar 2018 11:08:28 +0800 Subject: [PATCH] update --- .../manage/system/core/impl/ClientContractServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java index f053245a4..acf759073 100644 --- a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java @@ -164,15 +164,15 @@ public class ClientContractServiceImpl implements ClientContractService { } int waringDays = sysConfigManager.getSysConfig().getIntValue("rate_warning_days"); rateInfo.forEach((p) -> { - if (now.compareTo(p.getDate("expiry_time")) > -1) { + if (now.compareTo(DateUtils.addDays(p.getDate("expiry_time"),1)) > -1) { result.put("rate_expire", true); } - if (DateUtils.addDays(now, waringDays).compareTo(p.getDate("expiry_time")) > -1) { + if (DateUtils.addDays(now, waringDays).compareTo(DateUtils.addDays(p.getDate("expiry_time"),1)) > -1) { result.put("rate_waring", true); } }); int expireDay = 0; - long expireSS = (rateInfo.get(0).getDate("expiry_time").getTime()-now.getTime()); + long expireSS = (DateUtils.addDays(rateInfo.get(0).getDate("expiry_time"),1).getTime()-now.getTime()); expireDay = (int)expireSS/(1000*60*60*24); if(expireSS%(1000*60*60*24)>1){