From e0465ecce35ba1f8f3eb57574df2ac9c2f959941 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 15 九月 2022 12:31:21 +0800
Subject: [PATCH] 优化代码
---
springboot/src/main/resources/application-debug.yml | 89 ++++++++++++++++++++++
java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java | 12 +-
springboot/src/main/resources/dataSource-debug.yml | 105 ++++++++++++++++++++++++++
3 files changed, 200 insertions(+), 6 deletions(-)
diff --git a/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java b/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
index 7217ed5..8e22c29 100755
--- a/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
+++ b/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
@@ -1745,12 +1745,6 @@
value = value.replace("F", roomDto.getFloorArea());
} else if (value.contains("U")) { //澶勭悊鍗曞厓
value = value.replace("U", roomDto.getUnitArea());
- } else if (value.contains("R")) { //澶勭悊 鎴垮眿闈㈢Н
- value = value.replace("R", roomDto.getBuiltUpArea());
- } else if (value.contains("X")) {// 澶勭悊 鎴垮眿绯绘暟
- value = value.replace("X", roomDto.getFeeCoefficient());
- } else if (value.contains("L")) {//澶勭悊鎴垮眿灞傛暟
- value = value.replace("L", roomDto.getLayer());
} else if (value.contains("RL")){
List<RoomAttrDto> roomAttrDtos = roomDto.getRoomAttrDto();
if(roomAttrDtos != null && roomAttrDtos.size() > 0){
@@ -1758,6 +1752,12 @@
value = value.replace("RL"+roomAttrDto.getSpecCd(), roomAttrDto.getValue());
}
}
+ } else if (value.contains("R")) { //澶勭悊 鎴垮眿闈㈢Н
+ value = value.replace("R", roomDto.getBuiltUpArea());
+ } else if (value.contains("X")) {// 澶勭悊 鎴垮眿绯绘暟
+ value = value.replace("X", roomDto.getFeeCoefficient());
+ } else if (value.contains("L")) {//澶勭悊鎴垮眿灞傛暟
+ value = value.replace("L", roomDto.getLayer());
}
ScriptEngineManager manager = new ScriptEngineManager();
diff --git a/springboot/src/main/resources/application-debug.yml b/springboot/src/main/resources/application-debug.yml
new file mode 100644
index 0000000..2eec72d
--- /dev/null
+++ b/springboot/src/main/resources/application-debug.yml
@@ -0,0 +1,89 @@
+jedis:
+ pool:
+ config:
+ maxTotal: 300
+ maxIdle: 50
+ minIdle: 20
+ maxWaitMillis: 3000
+ host: dev.redis.java110.com
+ port: 6379
+ timeout: 3000
+ password: hc12345678
+
+server:
+ port: 8008
+ tomcat:
+ uri-encoding: UTF-8
+
+java110:
+ community-service: community-service
+ acct-service: acct-service
+ user-service: user-service
+ store-service: store-service
+ common-service: common-service
+ job-service: job-service
+ fee-service: fee-service
+ report-service: report-service
+ dev-service: dev-service
+ oa-service: oa-service
+
+spring:
+ profiles:
+ active: share
+ http:
+ encoding:
+ charset: UTF-8
+ enabled: true
+ force: true
+ application:
+ name: boot-service
+ redis:
+ database: 0
+ host: dev.redis.java110.com
+ port: 6379
+ password: hc12345678
+ pool:
+ max-active: 300
+ max-wait: 3000
+ max-idle: 50
+ min-idle: 20
+ timeout: 0
+
+feign:
+ client:
+ config:
+ default:
+ connect-timeout: 10000
+ read-timeout: 20000
+
+#============== kafka ===================
+kafka:
+ consumer:
+ zookeeper:
+ connect: dev.zk.java110.com:2181
+ servers: dev.kafka.java110.com:9092
+ enable:
+ auto:
+ commit: true
+ session:
+ timeout: 6000
+ auto:
+ commit:
+ interval: 100
+ offset:
+ reset: latest
+ topic: test
+ group:
+ id: communityBusinessStatus
+ concurrency: 10
+
+ producer:
+ zookeeper:
+ connect: dev.zk.java110.com:2181
+ servers: dev.kafka.java110.com:9092
+ retries: 0
+ batch:
+ size: 4096
+ linger: 1
+ buffer:
+ memory: 40960
\ No newline at end of file
diff --git a/springboot/src/main/resources/dataSource-debug.yml b/springboot/src/main/resources/dataSource-debug.yml
new file mode 100644
index 0000000..2255f1d
--- /dev/null
+++ b/springboot/src/main/resources/dataSource-debug.yml
@@ -0,0 +1,105 @@
+dataSources:
+ ds0: !!com.alibaba.druid.pool.DruidDataSource
+ driverClassName: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
+ username: hc_community
+ password: hc12345678
+ minIdle: 5
+ validationQuery: SELECT 1 FROM DUAL
+ initialSize: 5
+ maxWait: 60000
+ filters: stat,wall,log4j
+ poolPreparedStatements: true
+ ds1: !!com.alibaba.druid.pool.DruidDataSource
+ driverClassName: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
+ username: TT
+ password: hc12345678
+ minIdle: 5
+ validationQuery: SELECT 1 FROM DUAL
+ initialSize: 5
+ maxWait: 60000
+ filters: stat,wall,log4j
+ poolPreparedStatements: true
+
+shardingRule:
+ tables:
+ business_community:
+ actualDataNodes: ds${0..1}.business_community
+ databaseStrategy:
+ inline:
+ shardingColumn: community_id
+ algorithmExpression: ds${Long.parseLong(community_id) % 2}
+ s_community:
+ actualDataNodes: ds${0..1}.s_community
+ databaseStrategy:
+ inline:
+ shardingColumn: community_id
+ algorithmExpression: ds${Long.parseLong(community_id) % 2}
+ business_community_attr:
+ actualDataNodes: ds${0..1}.business_community_attr
+ databaseStrategy:
+ inline:
+ shardingColumn: community_id
+ algorithmExpression: ds${Long.parseLong(community_id) % 2}
+ s_community_attr:
+ actualDataNodes: ds${0..1}.s_community_attr
+ databaseStrategy:
+ inline:
+ shardingColumn: community_id
+ algorithmExpression: ds${Long.parseLong(community_id) % 2}
+ business_community_member:
+ actualDataNodes: ds${0..1}.business_community_member
+ databaseStrategy:
+ inline:
+ shardingColumn: community_id
+ algorithmExpression: ds${Long.parseLong(community_id) % 2}
+ business_community_photo:
+ actualDataNodes: ds${0..1}.business_community_photo
+ databaseStrategy:
+ inline:
+ shardingColumn: community_id
+ algorithmExpression: ds${Long.parseLong(community_id) % 2}
+ s_community_member:
+ actualDataNodes: ds${0..1}.s_community_member
+ databaseStrategy:
+ inline:
+ shardingColumn: community_id
+ algorithmExpression: ds${Long.parseLong(community_id) % 2}
+ s_community_photo:
+ actualDataNodes: ds${0..1}.s_community_photo
+ databaseStrategy:
+ inline:
+ shardingColumn: community_id
+ algorithmExpression: ds${Long.parseLong(community_id) % 2}
+ bindingTables:
+ - business_community
+ - s_community
+ - business_community_member
+ - business_community_photo
+ - s_community_member
+ - s_community_photo
+ - business_community_attr
+ - s_community_attr
+
+ defaultDataSourceName: ds1
+ defaultDatabaseStrategy:
+ inline:
+ shardingColumn: community_id
+ algorithmExpression: ds${Long.parseLong(community_id) % 2}
+ defaultTableStrategy:
+ none:
+
+# masterSlaveRules:
+# ms_ds0:
+# masterDataSourceName: ds0
+# slaveDataSourceNames:
+# - ds0_slave0
+# loadBalanceAlgorithmType: ROUND_ROBIN
+# ms_ds1:
+# masterDataSourceName: ds1
+# slaveDataSourceNames:
+# - ds1_slave0
+# loadBalanceAlgorithmType: ROUND_ROBIN
+props:
+ sql.show: true
--
Gitblit v1.8.0