From 99644f37e97476b3afb6d220aef9da766ad6ef5f Mon Sep 17 00:00:00 2001 From: xyiege Date: Tue, 11 Oct 2022 11:22:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A7=94=E6=89=98=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E9=BB=98=E8=AE=A4=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java | 4 ++-- .../cn/chjyj/szwh/service/impl/GoodsServiceImplTest.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java b/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java index 1041852..585e1d7 100644 --- a/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java +++ b/src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java @@ -568,8 +568,8 @@ public class GoodsServiceImpl implements GoodsService { //委托开始时间 Timestamp ncst=new Timestamp(0l); - //委托结束时间 - Timestamp ncet=new Timestamp(0l); + //委托结束时间 default value 2099-12-31 23:59:59 + Timestamp ncet=new Timestamp(4102415999000l); // 未设置结束委托时间 if (StringUtils.isBlank(cend) && day != null) { //如果是一次性授权或单次授权,存在托管结束时间 diff --git a/src/test/java/cn/chjyj/szwh/service/impl/GoodsServiceImplTest.java b/src/test/java/cn/chjyj/szwh/service/impl/GoodsServiceImplTest.java index 482725b..639c1df 100644 --- a/src/test/java/cn/chjyj/szwh/service/impl/GoodsServiceImplTest.java +++ b/src/test/java/cn/chjyj/szwh/service/impl/GoodsServiceImplTest.java @@ -138,7 +138,7 @@ public class GoodsServiceImplTest { //委托开始时间 Timestamp ncst=new Timestamp(0l); //委托结束时间 - Timestamp ncet=new Timestamp(0l); + Timestamp ncet=new Timestamp(4102415999000l); if (StringUtils.isBlank(cend) && iday != null) { //如果是一次性授权或单次授权,存在托管结束时间 if (iperiod == 2) { @@ -158,7 +158,8 @@ public class GoodsServiceImplTest { int fdays = festivalsMapper.countDayBetweenDays(wtStart, wtEnd, iyear); // 节假日顺延后的日期 Date fwtEnd = DateUtils.daysAgoOrAfter(wtEnd, fdays); - String tmpcend = sdf.format(fwtEnd); + SimpleDateFormat nsdf = new SimpleDateFormat("yyyy-MM-dd"); + String tmpcend = nsdf.format(fwtEnd)+" 23:59:59"; ncet=new Timestamp(sdf.parse(tmpcend).getTime()); } catch (Exception ex) { ex.printStackTrace();