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();