# =============================================================================
# Nacos 配置模板
# - 命名空间：hbxhzt-test（与 bootstrap 默认 NACOS_NAMESPACE 一致）
# - Data ID：erp-api.yaml（与 spring.application.name + file-extension 一致）
# - Group：DEFAULT_GROUP
# - 共享：bootstrap 已拉取 yundt-cube-common.yaml（与 Yunxi 其他工程一致）
# 维护：guochengyu
# =============================================================================

# 与 maindata-aggboot 一致：日志目录（logback-spring.xml）；K8s 可挂载卷后改为 /data/logWork 等
yes.server.logWorkDir: ./logWork

server:
  port: 38083

spring:
  data:
    redis:
      host: 192.168.71.6
      port: 6379
      database: 0
      password: HbxinhuaDB@2025
      timeout: 10s

  datasource:
    driverClassName: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://192.168.71.10:3306/hbxh_erp_ecommerce_middleware?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
    username: root
    password: HbxinhuaDB@2025

mybatis-plus:
  mapper-locations: classpath*:mapper/**/*Mapper.xml
  type-aliases-package: cn.qihangerp.oms.domain;cn.qihangerp.module.domain;cn.qihangerp.security.entity;

# /external/** AK/SK：须与 maindata「yundt.maindata.erp-open.api-key / secret-key」完全一致。
# 本模板与 jar 内 application.yml 对齐；若环境 Nacos 另配一对密钥，maindata 必须同步改同一对。
external:
  auth:
    api-key: xh-uat-erp-api-ak
    secret-key: xh-uat-erp-api-sk-9f2d3c4b5a6e7d8c
    timestamp-skew-ms: 300000
  goods:
    # upsert 请求体日志（pddPopAuth 已脱敏）；生产可关
    log-full-request: true

  # 拼多多 POP：与 jar 内 application.yml 对齐；Nacos 下发会覆盖本地
  pdd:
    publish-enabled: true
    gateway-url: https://gw-api.pinduoduo.com/api/router
    auto-fetch-cat-rule: false
    auto-resolve-spec-ids-when-sku-overrides-empty: true
    two-pieces-discount: 99
    group-buy-discount-percent: 75
    single-buy-add-fen: 200
    isbn-goods-property-ref-pid: 425
    fill-goods-properties-from-cat-rule: true
    image-upload-enabled: true
    material-validation-enabled: true
    image-upload-max-bytes: 3145728
    image-upload-allowed-host-suffixes:
      - etjbooks.com.cn
    image-upload-skip-host-suffixes:
      - pddpic.com
      - pinduoduo.com
      - yangkeduo.com
    category-map:
      DEFAULT: "15693"
    cost-template-map:
      DEFAULT: "303351846671360"
    sku-overrides: []

  # 微信视频号小店（platform=WEIXIN）；联调时开启 publish-enabled
  sph:
    publish-enabled: false
    image-upload-url: https://api.weixin.qq.com/shop/ec/basics/img/upload
    product-classify-url: https://api.weixin.qq.com/channels/ec/product/category/classify
    product-add-url: https://api.weixin.qq.com/channels/ec/product/add
    product-update-url: https://api.weixin.qq.com/channels/ec/product/update
    fixed-leaf-cat-id-v2: 537901187
    min-head-images: 3
    listing-on-save: 1
    http-read-timeout-seconds: 90
