Browse Source

设置委托结束默认时间

master
xyiege 3 years ago
parent
commit
99644f37e9
  1. 4
      src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java
  2. 5
      src/test/java/cn/chjyj/szwh/service/impl/GoodsServiceImplTest.java

4
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) {
//如果是一次性授权或单次授权,存在托管结束时间

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

Loading…
Cancel
Save