diff --git a/src/main/java/com/cultural/heritage/service/good/impl/GoodServiceImpl.java b/src/main/java/com/cultural/heritage/service/good/impl/GoodServiceImpl.java index 4f958a0..39b13a0 100644 --- a/src/main/java/com/cultural/heritage/service/good/impl/GoodServiceImpl.java +++ b/src/main/java/com/cultural/heritage/service/good/impl/GoodServiceImpl.java @@ -93,7 +93,7 @@ public class GoodServiceImpl extends ServiceImpl implements Go if (ObjectUtils.isEmpty(inventory) || inventory < 1) { throw new BusinessException(ErrorCode.PARAMS_ERROR, "库存量不能小于1"); } - if (ObjectUtils.isEmpty(festivalOrder) || festivalOrder <= 0) { + if (ObjectUtils.isEmpty(festivalOrder) || festivalOrder < 0) { throw new BusinessException(ErrorCode.PARAMS_ERROR, "节日参数错误"); } if (ObjectUtils.isEmpty(price) || price.compareTo(BigDecimal.ZERO) <= 0) { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 0bb2203..7bcc45c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,17 +1,17 @@ spring: datasource: # 生产环境 - driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://154.8.193.216:3306/feiyi?serverTimezone=Asia/Shanghai - username: feiyi - password: 123456asd - -# 测试环境 # driver-class-name: com.mysql.cj.jdbc.Driver -# url: jdbc:mysql://123.249.108.160:3306/feiyi?serverTimezone=Asia/Shanghai +# url: jdbc:mysql://154.8.193.216:3306/feiyi?serverTimezone=Asia/Shanghai # username: feiyi # password: 123456asd +# 测试环境 + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://123.249.108.160:3306/feiyi?serverTimezone=Asia/Shanghai + username: feiyi + password: 123456asd + hikari: max-lifetime: 120000 data: