server:
  port: 19001
  tomcat:
    uri-encoding: UTF-8
  servlet:
    session:
      timeout: 3600

spring:
  # ShardingSphere 配置项
  shardingsphere:
    datasource:
      # 所有数据源的名字
      names: baiduutil
      # baiduutil 数据源配置
      baiduutil:
        type: com.alibaba.druid.pool.DruidDataSource
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://49.4.21.141:45611/baiduutil?useUnicode=true&characterEncoding=utf8&useCompression=true&serverTimezone=GMT%2B8&useSSL=false
        username: bcx
        password: Wstestv5qy#2022
        # 用来检测连接是否有效的sql，要求是一个查询语句，常用select 'x'。如果validationQuery为null，testOnBorrow、testOnReturn、testWhileIdle都不会起作用。
        validationQuery: SELECT 1
        # 申请连接的时候检测，如果空闲时间大于timeBetweenEvictionRunsMillis，执行validationQuery检测连接是否有效。
        testWhileIdle: true
        # 申请连接时执行validationQuery检测连接是否有效
        testOnBorrow: false
        # 归还连接时执行validationQuery检测连接是否有效
        testOnReturn: false

    # 分片规则
    sharding:
      tables:
        # file_download_log_ex 表配置
        file_download_log_ex:
          actual-data-nodes: baiduutil.file_download_log_ex_$->{[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49]}
          key-generator: # 主键生成策略
            column: id
            type: SNOWFLAKE
          table-strategy:
            standard:
              sharding-column: md5
              precise-algorithm-class-name: com.bcxin.autodownloadupload.sharding.strategy.ConsistentShardingAlgorithm
    # 拓展属性配置
    props:
      sql:
        show: false # 打印 SQL

mybatis-plus:
  mapper-locations: classpath:mybatis/*Mapper.xml
  configuration:
    cache-enabled: false
    use-generated-keys: true
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
    # 字段名称下划线转驼峰命名
    map-underscore-to-camel-case: true

#拉取数据配置
pull-config:
  #生成sql文件和txt文件的api地址
  api: http://172.20.0.160:50001/obpm/v3/extends/change-logs
  #配置sql文件最多几条sql，一条sql平均4k，以200M的文件计算，大概最多50000条sql
  file-sql-count: 50000
  #从V5下载拉取zip存放地址
  v5-path: /data/baidu/pull/v5
  #生成完整zip包存放地址，zip包名称为：V5的拉取id
  completed-path: /data/baidu/pull
  #下载文件是否进行数据库去重
  is-remove-repeat: true
  #调度任务配置
  scheduled:
    #每天凌晨0点10分开始执行
    cron: 0 10 0 * * ?
    #周一凌晨，拉取前3天的数据，周六周天的凌晨，不进行拉取，其他时间拉取前1天的数据
    time-range:
      monday: 3
      tuesday: 1
      wednesday: 1
      thursday: 1
      friday: 1
      saturday: 0
      sunday: 0
    #目标系统配置
    region-codes: beijing,ningxia,hunan,shanxi
    #拉取表格配置，放空表示拉取全部
    tables:
  #下载日志表分表迁移数据库配置
  datasource:
    url: jdbc:mysql://114.115.153.118:3306/test_ftpser?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf8&useCompression=true&serverTimezone=GMT%2B8&useSSL=false&socketTimeout=60000&connectTimeout=60000
    username: root
    password: Bcx#20202008

#推送数据配置
push-config:
  #zip文件所在目录
  file-path: /data/baidu/push/%s.zip
  #服务环境
  envir: out-te
  #用命令行执行脚本的数据库配置
  db-ip: 49.4.21.141
  db-port: 45611
  db-username: bcx
  db-password: Wstestv5qy#2022
  #内外网配置
  internet:
    #服务地址或域名
    server-url: https://v5qy.te.baibaodun.com.cn/obpm
    #in内网，out外网
    type: out
    #内网配置
    in:
      #ftp配置
      ftp:
        ip: 220.243.148.23
        port: 6211
        username: linchunpeng
        password: linchunpeng
        path: /data/linchunpeng
    #外网配置
    out:
      #存储路径
      save-path: /data/storage-merged

# 模拟边界服务
boundary-server:
  # 对面服务地址
  opposite-url: http://172.20.0.248:15001
