From 4b65b390cef1b5ed9b68566e9f9f4b41b3289d91 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 20 Jun 2022 14:38:17 +0800
Subject: [PATCH] fix prod
---
src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java | 3 +++
src/main/resources/application-prod.yml | 18 +++++++++---------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java
index dbc7a6a..c7990b9 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java
@@ -281,6 +281,9 @@
}
BigDecimal income = profit.multiply(profitProp).divide(BigDecimal.valueOf(agentMemberList.size()), 2, RoundingMode.HALF_UP);
+ if (income.compareTo(BigDecimal.ZERO) > 0) {
+ continue;
+ }
for (MallMember agentMember : agentMemberList) {
// int reduce = walletService.reduce(income, agentMember.getId(), "score");
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
index 00f7aee..a737781 100644
--- a/src/main/resources/application-prod.yml
+++ b/src/main/resources/application-prod.yml
@@ -15,20 +15,20 @@
datasource:
# 数据源-1,名称为 base
base:
- username: ct_test
- password: 123456
+ username: db_mall
+ password: mall!@#123
driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://120.27.238.55:3306/db_amz?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
+ url: jdbc:mysql://127.0.0.1:3306/db_mall?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
redis:
# Redis数据库索引(默认为 0)
- database: 3
+ database: 0
# Redis服务器地址
- host: 120.27.238.55
+ host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis 密码
- password: xcong123
+ password: zhongji-mall=-0
lettuce:
pool:
# 连接池中的最小空闲连接
@@ -42,10 +42,10 @@
# 连接超时时间(毫秒)
timeout: 5000
rabbitmq:
- host: 120.27.238.55
+ host: 127.0.0.1
port: 5672
- username: ct_rabbit
- password: 123456
+ username: zj_mall
+ password: zj_mall123
publisher-confirm-type: correlated
pay:
--
Gitblit v1.9.1