swagger:
    enabled: false
pay:
    h5BaseUrl: https://dj-h5.hnsiyao.cn/me/detail/detail?allId=
    orderNotifyUrl: https://pay.hnsiyao.cn/czg/app/wuyou/notify
    extractNotifyUrl: https://pay.hnsiyao.cn/czg/app/wuyou/extractNotify


server:
    port: 8200

nsq:
    address: 47.122.26.160
    port:
        produce: 4150
        consumer: 4161

# 数据源的一些配置
driver-class-name: com.mysql.cj.jdbc.Driver
# 最小空闲连接，默认值10，小于0或大于maximum-pool-size，都会重置为maximum-pool-size
minimum-idle: 5
# 最大连接数，小于等于0会被重置为默认值10；大于零小于1会被重置为minimum-idle的值
maximum-pool-size: 15
# 空闲连接超时时间，默认值600000（10分钟），大于等于max-lifetime且max-lifetime>0，会被重置为0；不等于0且小于10秒，会被重置为10秒。
idle-timeout: 20000
# 连接最大存活时间.不等于0且小于30秒，会被重置为默认值30分钟.设置应该比mysql设置的超时时间短
max-lifetime: 30000
# 连接超时时间:毫秒，小于250毫秒，否则被重置为默认值30秒
connection-timeout: 30000

spring:
    redis:
        open: true  # 是否开启redis缓存  true开启   false关闭
        database: 0
        host: 47.122.73.144   # Redis服务器地址
        port: 6379
        password: 222222    # 密码（默认为空）
        timeout: 6000ms  # 连接超时时长（毫秒）
        jedis:
            pool:
                max-active: 1000  # 连接池最大连接数（使用负值表示没有限制）
                max-wait: -1ms      # 连接池最大阻塞等待时间（使用负值表示没有限制）
                max-idle: 10      # 连接池中的最大空闲连接
                min-idle: 5       # 连接池中的最小空闲连接
    # sharding-jdbc 配置
    shardingsphere:
        # 显示sharding-jdbc改写的sql语句
        show-sql: false

        center-tables-data-node: duanju.%s
        # 区域表的数据源节点
        region-tables-data-node: duanju-$->{0..4}.%s
        # 区域分库策略的计算字段
        region-tables-sharding-database-column: user_id
        # 分库的计算方法
        region-tables-sharding-database-algorithm: duanju-$->{user_id % 5}

        # 短剧集表 拆分
        course_details-sharding-database-column: course_id
        course_details-sharding-database-algorithm: duanju-$->{course_id % 5}
        # 数据源名称
        datasource:
            duanju:
                driver-class-name: ${driver-class-name}
                jdbc-url: jdbc:mysql://rm-gc7xx913734hv5w5qxo.mysql.cn-chengdu.rds.aliyuncs.com/duanju?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
                username: video_user
                password: VideoUser@1
                minimum-idle: ${minimum-idle}
                maximum-pool-size: ${maximum-pool-size}
                idle-timeout: ${idle-timeout}
                max-lifetime: ${max-lifetime}
                connection-timeout: ${connection-timeout}
            # 数据源配置begin
            duanju-0:
                driver-class-name: ${driver-class-name}
                jdbc-url: jdbc:mysql://rm-gc7xx913734hv5w5qxo.mysql.cn-chengdu.rds.aliyuncs.com/duanju-0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
                username: video_user
                password: VideoUser@1
                minimum-idle: ${minimum-idle}
                maximum-pool-size: ${maximum-pool-size}
                idle-timeout: ${idle-timeout}
                max-lifetime: ${max-lifetime}
                connection-timeout: ${connection-timeout}
            duanju-1:
                driver-class-name: ${driver-class-name}
                jdbc-url: jdbc:mysql://rm-gc7xx913734hv5w5qxo.mysql.cn-chengdu.rds.aliyuncs.com/duanju-1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
                username: video_user
                password: VideoUser@1
                minimum-idle: ${minimum-idle}
                maximum-pool-size: ${maximum-pool-size}
                idle-timeout: ${idle-timeout}
                max-lifetime: ${max-lifetime}
                connection-timeout: ${connection-timeout}
            duanju-2:
                driver-class-name: ${driver-class-name}
                jdbc-url: jdbc:mysql://rm-gc7xx913734hv5w5qxo.mysql.cn-chengdu.rds.aliyuncs.com/duanju-2?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
                username: video_user
                password: VideoUser@1
                minimum-idle: ${minimum-idle}
                maximum-pool-size: ${maximum-pool-size}
                idle-timeout: ${idle-timeout}
                max-lifetime: ${max-lifetime}
                connection-timeout: ${connection-timeout}
            duanju-3:
                driver-class-name: ${driver-class-name}
                jdbc-url: jdbc:mysql://rm-gc7xx913734hv5w5qxo.mysql.cn-chengdu.rds.aliyuncs.com/duanju-3?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
                username: video_user
                password: VideoUser@1
                minimum-idle: ${minimum-idle}
                maximum-pool-size: ${maximum-pool-size}
                idle-timeout: ${idle-timeout}
                max-lifetime: ${max-lifetime}
                connection-timeout: ${connection-timeout}
            duanju-4:
                driver-class-name: ${driver-class-name}
                jdbc-url: jdbc:mysql://rm-gc7xx913734hv5w5qxo.mysql.cn-chengdu.rds.aliyuncs.com/duanju-4?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
                username: video_user
                password: VideoUser@1
                minimum-idle: ${minimum-idle}
                maximum-pool-size: ${maximum-pool-size}
                idle-timeout: ${idle-timeout}
                max-lifetime: ${max-lifetime}
                connection-timeout: ${connection-timeout}

#            duanju-slave:
#                driver-class-name: ${driver-class-name}
#                jdbc-url: jdbc:mysql://47.122.30.120:3306/duanju?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
#                username: root
#                password: VideoUser1@
#                minimum-idle: ${minimum-idle}
#                maximum-pool-size: ${maximum-pool-size}
#                idle-timeout: ${idle-timeout}
#                max-lifetime: ${max-lifetime}
#                connection-timeout: ${connection-timeout}
#            duanju-slave-0:
#                driver-class-name: ${driver-class-name}
#                jdbc-url: jdbc:mysql://47.122.30.120:3306/duanju-0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
#                username: root
#                password: VideoUser1@
#                minimum-idle: ${minimum-idle}
#                maximum-pool-size: ${maximum-pool-size}
#                idle-timeout: ${idle-timeout}
#                max-lifetime: ${max-lifetime}
#                connection-timeout: ${connection-timeout}
#            duanju-slave-1:
#                driver-class-name: ${driver-class-name}
#                jdbc-url: jdbc:mysql://47.122.30.120:3306/duanju-1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
#                username: root
#                password: VideoUser1@
#                minimum-idle: ${minimum-idle}
#                maximum-pool-size: ${maximum-pool-size}
#                idle-timeout: ${idle-timeout}
#                max-lifetime: ${max-lifetime}
#                connection-timeout: ${connection-timeout}
#            duanju-slave-2:
#                driver-class-name: ${driver-class-name}
#                jdbc-url: jdbc:mysql://47.122.30.120:3306/duanju-2?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
#                username: root
#                password: VideoUser1@
#                minimum-idle: ${minimum-idle}
#                maximum-pool-size: ${maximum-pool-size}
#                idle-timeout: ${idle-timeout}
#                max-lifetime: ${max-lifetime}
#                connection-timeout: ${connection-timeout}
#            duanju-slave-3:
#                driver-class-name: ${driver-class-name}
#                jdbc-url: jdbc:mysql://47.122.30.120:3306/duanju-3?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
#                username: root
#                password: VideoUser1@
#                minimum-idle: ${minimum-idle}
#                maximum-pool-size: ${maximum-pool-size}
#                idle-timeout: ${idle-timeout}
#                max-lifetime: ${max-lifetime}
#                connection-timeout: ${connection-timeout}
#            duanju-slave-4:
#                driver-class-name: ${driver-class-name}
#                jdbc-url: jdbc:mysql://47.122.30.120:3306/duanju-4?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
#                username: root
#                password: VideoUser1@
#                minimum-idle: ${minimum-idle}
#                maximum-pool-size: ${maximum-pool-size}
#                idle-timeout: ${idle-timeout}
#                max-lifetime: ${max-lifetime}
#                connection-timeout: ${connection-timeout}
            # 数据源配置end

        # 读写分离配置begin
        master-slave-rules:
            #数据源
            duanju:
                masterDataSourceName: duanju
                slaveDataSourceNames:
                    - duanju
#                    - duanju-slave
            duanju-0:
                masterDataSourceName: duanju-0
                slaveDataSourceNames:
                    - duanju-0
#                    - duanju-slave-0
            duanju-1:
                masterDataSourceName: duanju-1
                slaveDataSourceNames:
                    - duanju-1
#                    - duanju-slave-1
            duanju-2:
                masterDataSourceName: duanju-2
                slaveDataSourceNames:
                    - duanju-2
#                    - duanju-slave-2
            duanju-3:
                masterDataSourceName: duanju-3
                slaveDataSourceNames:
                    - duanju-3
#                    - duanju-slave-3
            duanju-4:
                masterDataSourceName: duanju-4
                slaveDataSourceNames:
                    - duanju-4
#                    - duanju-slave-4
