### dev环境

dataSources:
  ds_0: !!com.alibaba.druid.pool.DruidDataSource
    url: jdbc:mysql://shard01.mysql.db.zmcms.cn/ordernewdev_01?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
    driverClassName: com.mysql.cj.jdbc.Driver
    name: orders_0
    username: ordernewdev2020
    password: dafgjjjjj
  ds_1: !!com.alibaba.druid.pool.DruidDataSource
    url: jdbc:mysql://shard01.mysql.db.zmcms.cn/ordernewdev_02?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
    driverClassName: com.mysql.cj.jdbc.Driver
    name: orders_1
    username: ordernewdev2020
    password: dafgjjjjj

shardingRule:
  tables:
    orders:
      actualDataNodes: ds_${0..1}.orders_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_discounts:
      actualDataNodes: ds_${0..1}.order_discounts_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_index:
      actualDataNodes: ds_${0..1}.order_index_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: order_no
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonStringPreciseDateBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: order_no
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonStringPreciseTableAlgorithm
    source_index:
      actualDataNodes: ds_${0..1}.source_index_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: source_no
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonStringPreciseDateBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: source_no
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonStringPreciseTableAlgorithm
    order_line_up_records:
      actualDataNodes: ds_${0..1}.order_line_up_records_${0..1}
      databaseStrategy:
        inline:
          shardingColumn: seller_id
          algorithmExpression: ds_${seller_id % 2}
      tableStrategy:
        inline:
          shardingColumn: seller_id
          algorithmExpression: order_line_up_records_${seller_id.intdiv(2) % 2}
    order_items:
      actualDataNodes: ds_${0..1}.order_items_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_operations:
      actualDataNodes: ds_${0..1}.order_operations_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: order_no
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonStringPreciseDateBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: order_no
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonStringPreciseTableAlgorithm
    order_push_logs:
      actualDataNodes: ds_${0..1}.order_push_logs_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: order_no
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonStringPreciseDateBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: order_no
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonStringPreciseTableAlgorithm
    order_addresses:
      actualDataNodes: ds_${0..1}.order_addresses_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_self_take:
      actualDataNodes: ds_${0..1}.order_self_take_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_pay_details:
      actualDataNodes: ds_${0..1}.order_pay_details_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_item_batching:
      actualDataNodes: ds_${0..1}.order_item_batching_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_comment:
      actualDataNodes: ds_${0..1}.order_comment_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_item_comment:
      actualDataNodes: ds_${0..1}.order_item_comment_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_comment_details:
      actualDataNodes: ds_${0..1}.order_comment_details_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    comment_recommend_items:
      actualDataNodes: ds_${0..1}.comment_recommend_items_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    order_extends:
      actualDataNodes: ds_${0..1}.order_extends_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: user_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
    item_recommends:
      actualDataNodes: ds_${0..1}.item_recommends_${0..1}
      databaseStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseDataBaseAlgorithm
      tableStrategy:
        standard:
          shardingColumn: seller_id
          preciseAlgorithmClassName: com.zm.order.tool.server.sharding.CommonNumberPreciseTableAlgorithm
  defaultDataSourceName: ds_0

props:
  sql.show: true