From cd36cce5ee6db83137b5b0a01131fc3468241b61 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 14 May 2021 14:36:36 +0800 Subject: [PATCH] modify --- src/main/resources/application-app.yml | 12 +++++++----- src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java | 10 ++++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java b/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java index fd185ed..17f2ddc 100644 --- a/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java @@ -231,12 +231,14 @@ quantityOwn = quantityOwn + ydOrderEntity.getQuantity(); } } - if(quantityOwn >= limitedNum){ + int quantityInt = quantity.intValue(); + if(quantityOwn + quantityInt > limitedNum){ return Result.fail("产品限购"+limitedNum); } - if (quantity.compareTo(BigDecimal.valueOf(ydProductEntity.getLimitedNum())) < 1) { - return Result.fail("产品限购" + ydProductEntity.getLimitedNum()); - } + +// if (quantity.compareTo(BigDecimal.valueOf(ydProductEntity.getLimitedNum())) < 1) { +// return Result.fail("产品限购" + ydProductEntity.getLimitedNum()); +// } BigDecimal salePrice = ydProductEntity.getSalePrice(); //剩余产品数量 BigDecimal surplusT = ydProductEntity.getSurplusT(); diff --git a/src/main/resources/application-app.yml b/src/main/resources/application-app.yml index 5e4b9a5..3ee37b0 100644 --- a/src/main/resources/application-app.yml +++ b/src/main/resources/application-app.yml @@ -7,9 +7,9 @@ profiles: active: app datasource: - url: jdbc:mysql://192.168.0.151:3306/db_hibit?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8 - username: db_hibit - password: hibit123!@# + url: jdbc:mysql://192.168.0.151:3306/yunding?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8 + username: yunding + password: yunding123!@# driver-class-name: com.mysql.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource druid: @@ -48,7 +48,7 @@ ## redis配置 redis: ## Redis数据库索引(默认为0) - database: 0 + database: 3 ## Redis服务器地址 host: 192.168.0.36 ## Redis服务器连接端口 @@ -100,7 +100,9 @@ other-job: false loop-job: false rabbit-consumer: false - block-job: false + block-job: true + xch-job: true + yunding-consumer: true aliyun: oss: -- Gitblit v1.9.1