# pro环境
server.port=8080

logging.level.root=INFO

# MyBatis相关
mybatis.config-location=classpath:/mybatis-config.xml
mybatis.mapper-locations=classpath*:/mappings/*Mapper.xml
mybatis.hint.mapper-locations=classpath*:/hint/*Mapper.xml
mybatis.cy.mapper-locations=classpath*:/cy/*Mapper.xml
mybatis.temp.mapper-locations=classpath*:/temp/*Mapper.xml
mybatis.design.mapper-locations=classpath*:/design/*Mapper.xml
mybatis.tb.mapper-locations=classpath*:/tb/*Mapper.xml
mybatis.cy.marketing.mapper-locations=classpath*:/cymarketing/*Mapper.xml
mybatis.routing.mapper-locations=classpath*:/routing/*Mapper.xml
mybatis.hint.new.mapper-locations=classpath*:/hintnew/*Mapper.xml
mybatis.reta.mapper-locations=classpath*:/reta/*Mapper.xml
mybatis.old.routing.mapper-locations=classpath*:/oldrouting/*Mapper.xml
mybatis.history.data.mapper-locations=classpath*:/history/*Mapper.xml
mybatis.hint.history.data.mapper-locations=classpath*:/hinthistory/*Mapper.xml
mybatis.chen.mapper-locations=classpath*:/chen/*Mapper.xml


#普罗米修斯监控配置 暴露端口、路径
management.server.port=8081
management.endpoints.web.base-path=/
management.endpoints.web.exposure.include=*
management.metrics.export.prometheus.enabled=true
management.metrics.export.prometheus.step=1ms
management.metrics.export.prometheus.descriptions=true
management.health.defaults.enabled=false

sharding.index.size=2

# ES相关
es.host=elasticsearch-gateway.qmai.co
es.port=9200
es.username=elastic
es.password=hBcxqGHgbCVU2aMZ
es.connectionTimeout=500
es.socketTimeout=6000
# 订单索引数量 与prod非一致
es.orderIndexSize=2

# redis相关
redis.host=rdb.redis.db.qmai.co
redis.port=6379
redis.password=
redis.db=0
redis.timeout=3000
redis.minIdle=5
redis.maxIdle=10
redis.maxActive=20
redis.maxWait=6000
redis.inner.host=rdb.redis.db.qmai.co
redis.inner.port=6379
redis.inner.timeout=3000
redis.inner.db=4


zk.url=zk.zookeeper.db.qmai.co
application.server.profile=beta


###定义dubbo配置信息
dubbo.application.name=order-center
dubbo.application.logger=slf4j
dubbo.protocol.name=dubbo
dubbo.protocol.port=20880
## Dubbo Registry
#dubbo.config-center.address=zookeeper://zk.zookeeper.db.zmcms.cn:2181
dubbo.registry.address=zookeeper://zk.zookeeper.db.qmai.co:2181
#dubbo.metadata-report.address=zookeeper://zk.zookeeper.db.zmcms.cn:2181
#dubbo.registry.check=false
# dingTalk 提示
dingTalk.url=https://oapi.dingtalk.com/robot/send?access_token=66180731c83e10955d7e8e10329051a416646902b3181e0e6adc721caa2d7108
dingTalk.secret=SECfd25811594d782a9ffbe6f326a302e4e610ce551e5caf318e895b4ac1b50c838

sharding.db.size=2
sharding.tb.size=2

# 内部配置
new.sharding.db.size=2
new.sharding.tb.size=2

spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8

# rocketMQ
order.operation.topic=order-center-operation-log
order.operation.tag=order_operation
refund.operation.topic=order-center-operation-log
refund.operation.tag=refund_operation
order.sync.es.topic=order-center-sync-es
order.sync.es.tag=*
order.index.topic=order-center-index-order
order.index.tag=*
order.invalid.topic=order-center-invalid-order
order.invalid.tag=*
order.lineup.topic=order-center-lineup
order.lineup.tag=*
sync.sub.orders.topic=order-center-sync-sub-orders
sync.sub.orders.tag=*
order.message.push.queue.topic=order-center-order-message-push
order.message.push.queue.tag=order_message_push
refund.message.push.queue.tag=refund_message_push
order.batch.sync.es.topic=order-center-batch-sync-es
order.comment.count.topic=order-center-order-comment-count
order.comment.count.tag=*
order.message.queue.topic=order-center-order-message
order.message.queue.tag=*

order.common.topic=order-center-common
order.batch.sync.es.tag=batch_sync_es

ons.accessKey=LTAI4Fr5MGQ6w9YdA3AVKeQb
ons.secretKey=92JW7FciOyAXLoeLTZYD3SRxuXykKY
ons.nameSrvAddr=http://MQ_INST_1130346489794504_BbosuaTA.cn-shanghai.mq-internal.aliyuncs.com:8080
ons.groupId=GID_order-center
ons.maxReconsumeTimes=3
ons.sendMsgTimeoutMillis=3000
ons.orderlyGroupId=GID_orderly_order-center

cy.auto.cancel.order.routing.key=order-center.order-center.cy-auto-cancel-order-notice
cy.auto.complete.order.routing.key=order-center.order-center.cy-auto-complete-order-notice
cy.aggregate.order.create.routing.key=order-center.order-center.cy-create-aggregate-order-notice
retail.auto.cancel.order.routing.key=order-center.order-center.reta-auto-cancel-order-notice
retail.auto.complete.order.routing.key=order-center.order-center.reta-auto-complete-order-notice
retail.notice.auto.verify.order.routing.key=order-center.order-center.reta-auto-verify-order-notice
order.push.notice.key=order-center.order-center.order-push-notice
refund.push.notice.key=order-center.order-center.refund-push-notice
catering.auto.cancel.order.routing.key=order-center.order-center.catering-auto-cancel-notice

tidb.url=jdbc:mysql://47.102.253.7:4001/sqldwapibeta?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
tidb.driverClassName=com.mysql.cj.jdbc.Driver
tidb.userName=dwloadbeta
tidb.password=dwbeta@2020

goods.center.tool.url=http://goods-center-tool-svc/


#temp.url=jdbc:mysql://106.15.1.103:3306/order_pro?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
temp.url=jdbc:mysql://10.20.254.31:3306/chen_xiang_gui_sync?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
temp.driverClassName=com.mysql.cj.jdbc.Driver
temp.userName=root
temp.password=123.456

# 陈香贵数据库
chen.url=jdbc:mysql://124.71.161.47:13306/db_hll_data?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
chen.driverClassName=com.mysql.cj.jdbc.Driver
chen.userName=qmzy
chen.password=qm@2023

# 餐饮关联表
cy.url=jdbc:mysql://my57.mysql.db.qmai.co:3306/sqltakeoutbeta?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
cy.driverClassName=com.mysql.cj.jdbc.Driver
cy.userName=takeoutbeta
cy.password=Takeout2017_beta

# 零售关联表
reta.url=jdbc:mysql://mya.mysql.db.qmai.co:3306/sqlretabeta?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
reta.driverClassName=com.mysql.cj.jdbc.Driver
reta.userName=retabeta
reta.password=2018RetaBeta

# 装修
design.url=jdbc:mysql://mya.mysql.db.qmai.co:3306/sqldesignbeta?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
design.driverClassName=com.mysql.cj.jdbc.Driver
design.userName=designbeta
design.password=Design2019beta

# kafka配置
spring.kafka.bootstrap-servers=10.20.1.96:9092,10.20.1.97:9092,10.20.1.98:9092
spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.consumer.group-id=GID_bin_log_data_order_center
# 该属性指定了消费者在读取一个没有偏移量的分区或者偏移量无效的情况下该作何处理：
# latest（默认值）在偏移量无效的情况下，消费者将从最新的记录开始读取数据（在消费者启动之后生成的记录）
# earliest ：在偏移量无效的情况下，消费者将从起始位置读取分区的记录
spring.kafka.consumer.auto-offset-reset=latest
# 是否自动提交偏移量，默认值是true,为了避免出现重复数据和数据丢失，可以把它设置为false,然后手动提交偏移量
spring.kafka.consumer.enable-auto-commit=false
spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.listener.ack-mode=manual
spring.kafka.listener.missing-topics-fatal=false
#批量消费
spring.kafka.listener.type=batch
#最大消费数量
spring.kafka.consumer.max-poll-records=10

# kafka 消费topic列表 beta环境的topic多了个【beta_】前缀
kafka.bin.log.sync.order.topic=beta_orders
kafka.bin.log.sync.order.item.topic=beta_order_items
kafka.bin.log.sync.order.discount.topic=beta_order_discounts
kafka.bin.log.sync.order.pay.details.topic=beta_order_pay_details
kafka.bin.log.sync.order.address.topic=beta_order_addresses
kafka.bin.log.sync.order.self.take.topic=beta_order_self_take
kafka.bin.log.sync.order.item.batching.topic=beta_order_item_batching
kafka.bin.log.sync.order.extends.topic=beta_order_extends

kafka.bin.log.sync.order.refunds.topic=order_refunds_beta
kafka.bin.log.sync.refund.details.topic=order_refund_details_beta
kafka.bin.log.sync.order.comment.topic=order_comment_beta
kafka.bin.log.sync.item.comment.topic=order_item_comment_beta

kafka.bin.log.sync.new.order.topic=beta_new_orders
kafka.bin.log.sync.new.order.pay.details.topic=beta_new_order_pay_details
kafka.bin.log.sync.new.order.refunds.topic=beta_new_order_refunds
kafka.bin.log.sync.new.refund.details.topic=beta_new_order_refund_details
kafka.bin.log.sync.new.order.comment.topic=beta_new_order_comment
kafka.bin.log.sync.new.item.comment.topic=beta_new_order_item_comment

# kafka produce配置
kafka.produce.servers=alikafka-pre-cn-nwy3b4ih1009-1-vpc.alikafka.aliyuncs.com:9092,alikafka-pre-cn-nwy3b4ih1009-2-vpc.alikafka.aliyuncs.com:9092,alikafka-pre-cn-nwy3b4ih1009-3-vpc.alikafka.aliyuncs.com:9092
spring.kafka.producer.ack=1
spring.kafka.producer.buffer-memory=33554432
spring.kafka.producer.batch-size=200
spring.kafka.producer.retries=3
spring.kafka.producer.properties.max.request.size=10485760
spring.kafka.producer.properties.request.timeout.ms=100

# 负载均衡策略
spring.cloud.nacos.config.server-addr=a.nacos.conf.db.qmai.cn

#加解密模型，下面的配置讲解会单独解释
data.encrypt.rules.model=MAPPING
#需要做数据加解密的表名称
# orders
data.encrypt.rules.tables[0].tableName=orders
#是否开启了分表，true：开启分表，false：没有开启分表。默认即为false
data.encrypt.rules.tables[0].partition=true
#开启了分表的表名必须指定正则匹配的规则，以下是示例匹配  tablename_0 这种模式的分表名称
data.encrypt.rules.tables[0].tablePattern=^orders(_\\d+)?$
#待加密的明文字段
data.encrypt.rules.tables[0].columns[0].cipherColumn=mobile
#明文字段对应的密文字段
data.encrypt.rules.tables[0].columns[0].encryptorColumn=mobile_cipher

#order_address
data.encrypt.rules.tables[1].tableName=order_addresses
#是否开启了分表，true：开启分表，false：没有开启分表。默认即为false
data.encrypt.rules.tables[1].partition=true
#开启了分表的表名必须指定正则匹配的规则，以下是示例匹配  tablename_0 这种模式的分表名称
data.encrypt.rules.tables[1].tablePattern=^order_addresses(_\\d+)?$
# mobile
data.encrypt.rules.tables[1].columns[0].cipherColumn=mobile
data.encrypt.rules.tables[1].columns[0].encryptorColumn=mobile_cipher
# accept_name
data.encrypt.rules.tables[1].columns[1].cipherColumn=accept_name
data.encrypt.rules.tables[1].columns[1].encryptorColumn=accept_name_cipher
# street
data.encrypt.rules.tables[1].columns[2].cipherColumn=street
data.encrypt.rules.tables[1].columns[2].encryptorColumn=street_cipher
# door_number
data.encrypt.rules.tables[1].columns[3].cipherColumn=door_number
data.encrypt.rules.tables[1].columns[3].encryptorColumn=door_number_cipher

# order_refunds
data.encrypt.rules.tables[2].tableName=order_refunds
#是否开启了分表，true：开启分表，false：没有开启分表。默认即为false
data.encrypt.rules.tables[2].partition=false
#待加密的明文字段
data.encrypt.rules.tables[2].columns[0].cipherColumn=mobile
#明文字段对应的密文字段
data.encrypt.rules.tables[2].columns[0].encryptorColumn=mobile_cipher

# order_comment
data.encrypt.rules.tables[3].tableName=order_comment
#是否开启了分表，true：开启分表，false：没有开启分表。默认即为false
data.encrypt.rules.tables[3].partition=true
#开启了分表的表名必须指定正则匹配的规则，以下是示例匹配  tablename_0 这种模式的分表名称
data.encrypt.rules.tables[3].tablePattern=^order_comment(_\\d+)?$
#待加密的明文字段
data.encrypt.rules.tables[3].columns[0].cipherColumn=mobile
#明文字段对应的密文字段
data.encrypt.rules.tables[3].columns[0].encryptorColumn=mobile_cipher