Browse Source

api入库时间不能取到的bug

master
xyiege 3 years ago
parent
commit
f0004cf65c
  1. 2
      src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java
  2. 2
      src/main/java/cn/chjyj/szwh/utils/ApiGoodsUtils.java
  3. 2
      src/main/resources/application.properties
  4. 183
      src/test/java/cn/chjyj/szwh/service/impl/GoodsServiceImplTest.java

2
src/main/java/cn/chjyj/szwh/service/impl/GoodsServiceImpl.java

@ -571,7 +571,7 @@ public class GoodsServiceImpl implements GoodsService {
int wkday = calendar.get(Calendar.DAY_OF_WEEK);
//周末顺延
// notice:在节假日调休时候,会有变动
day = wkday > 5 ? (wkday - 5 + 1) : 0;
day += wkday > 5 ? (wkday - 5 + 1) : 0;
// 委托终止时间
Date wtEnd = DateUtils.daysAgoOrAfter(wtStart, day);
// 统计该时间段内的节假日

2
src/main/java/cn/chjyj/szwh/utils/ApiGoodsUtils.java

@ -90,7 +90,7 @@ public class ApiGoodsUtils {
goodsDetail.setGoodsImage(json.getString("cover"));
goodsDetail.setPrice(new BigDecimal(sprice));
// 商品类型
int igtype = "文化资源数据".equalsIgnoreCase(json.getString("collectionType"))?1:2;
int igtype = "文化资源数据".equals(json.getString("collectionType"))?1:2;
goodsDetail.setGoodsType(igtype);
//
int ictype = price<=0?1:2;

2
src/main/resources/application.properties

@ -30,7 +30,7 @@ spring.redis.jedis.pool.max-wait=-1
spring.quartz.scheduler-name=szwhQuartz
spring.quartz.job-store-type=memory
# quartz 自动启动
spring.quartz.auto-startup=true
spring.quartz.auto-startup=false
# 延迟5s启动
spring.quartz.startup-delay=5
# 应用关闭时候等待完成

183
src/test/java/cn/chjyj/szwh/service/impl/GoodsServiceImplTest.java

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save