更新了商品管理模块

This commit is contained in:
chen-xin-zhi 2024-11-29 10:12:19 +08:00
parent c9af504c46
commit 4e65b8c416
2 changed files with 8 additions and 8 deletions

View File

@ -93,7 +93,7 @@ public class GoodServiceImpl extends ServiceImpl<GoodMapper, Good> 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) {

View File

@ -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: