Helius
2021-05-14 cd36cce5ee6db83137b5b0a01131fc3468241b61
modify
2 files modified
22 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java 10 ●●●●● patch | view | raw | blame | history
src/main/resources/application-app.yml 12 ●●●●● patch | view | raw | blame | history
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();
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: