2025-03-20 17:43:07 +08:00
|
|
|
databaseName: tmerclub_payment
|
2025-03-19 15:04:57 +08:00
|
|
|
|
|
|
|
dataSources:
|
|
|
|
ds:
|
2025-03-20 17:43:07 +08:00
|
|
|
url: jdbc:mysql://192.168.193.128:3306/tmerclub_payment?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true&useAffectedRows=true
|
2025-03-19 15:04:57 +08:00
|
|
|
username: root
|
|
|
|
password: hn02le.34lkdLKD
|
|
|
|
minPoolSize: 0
|
|
|
|
maxPoolSize: 100
|
|
|
|
idleTimeoutMilliseconds: 25000
|
|
|
|
|
|
|
|
rules:
|
|
|
|
- !SHARDING
|
|
|
|
tables:
|
|
|
|
# 正向订单业务表
|
|
|
|
pay_info:
|
|
|
|
actualDataNodes: ds.pay_info_$->{0..49}
|
|
|
|
tableStrategy:
|
|
|
|
complex:
|
|
|
|
shardingColumns: order_id,user_id,refund_id,pay_id
|
|
|
|
shardingAlgorithmName: customTableComplexKeysShardingAlgorithm
|
|
|
|
refund_info:
|
|
|
|
actualDataNodes: ds.refund_info_$->{0..49}
|
|
|
|
tableStrategy:
|
|
|
|
complex:
|
|
|
|
shardingColumns: user_id,refund_id,pay_id
|
|
|
|
shardingAlgorithmName: customTableComplexKeysShardingAlgorithm
|
|
|
|
|
|
|
|
# 绑定表配置
|
|
|
|
bindingTables:
|
|
|
|
- pay_info,refund_info
|
|
|
|
shardingAlgorithms:
|
|
|
|
customTableComplexKeysShardingAlgorithm : # 分片算法名称
|
|
|
|
type: class_based
|
|
|
|
props:
|
|
|
|
strategy: complex
|
|
|
|
algorithmClassName: com.mall4j.cloud.common.sharding.proxy.payment.CustomTableComplexKeysShardingAlgorithm
|
|
|
|
- !SINGLE
|
|
|
|
tables:
|
|
|
|
- ds.*
|
|
|
|
defaultDataSource: ds
|