{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "伊利券中心 ECC · 系统架构",
    "locale": "zh-CN",
    "quality_profile": "showcase",
    "viewBox": [
      1360,
      860
    ]
  },
  "components": [
    {
      "id": "clients",
      "type": "external",
      "label": "外部调用方",
      "sublabel": "小程序 / App / 经销商",
      "pos": [
        30,
        60
      ],
      "size": [
        140,
        64
      ]
    },
    {
      "id": "front",
      "type": "frontend",
      "label": "管理端 Web",
      "sublabel": "Vue3 + Vite",
      "pos": [
        1120,
        60
      ],
      "size": [
        125,
        60
      ]
    },
    {
      "id": "gateway",
      "type": "security",
      "label": "ecc-gateway",
      "sublabel": "API 网关 · Sentinel 流控",
      "pos": [
        820,
        60
      ],
      "size": [
        140,
        60
      ]
    },
    {
      "id": "hbq-api",
      "type": "backend",
      "label": "ecc-hbq-api",
      "sublabel": "红包券对外服务",
      "pos": [
        500,
        200
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "hbq-mgr",
      "type": "backend",
      "label": "ecc-hbq-mgr",
      "sublabel": "红包券管理端",
      "pos": [
        640,
        200
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "zzq-api",
      "type": "backend",
      "label": "ecc-zzq-api",
      "sublabel": "增值券对外服务",
      "pos": [
        780,
        200
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "zzq-mgr",
      "type": "backend",
      "label": "ecc-zzq-mgr",
      "sublabel": "增值券管理端",
      "pos": [
        920,
        200
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "admin",
      "type": "backend",
      "label": "ecc-admin",
      "sublabel": "通用管理服务",
      "pos": [
        1060,
        200
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "common-api",
      "type": "backend",
      "label": "ecc-common-api",
      "sublabel": "公共服务 API",
      "pos": [
        1200,
        200
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "nacos",
      "type": "cloud",
      "label": "Nacos",
      "sublabel": "注册 + 配置中心",
      "pos": [
        500,
        560
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "mysql-hbq",
      "type": "database",
      "label": "MySQL · hbq",
      "sublabel": "红包券库",
      "pos": [
        640,
        560
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "mysql-zzq",
      "type": "database",
      "label": "MySQL · zzq",
      "sublabel": "增值券库",
      "pos": [
        780,
        560
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "redis",
      "type": "database",
      "label": "Redis",
      "sublabel": "缓存",
      "pos": [
        920,
        560
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "mysql-base",
      "type": "database",
      "label": "MySQL · base",
      "sublabel": "基础库",
      "pos": [
        1060,
        560
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "rabbitmq",
      "type": "messagebus",
      "label": "RabbitMQ",
      "sublabel": "消息队列",
      "pos": [
        1200,
        560
      ],
      "size": [
        125,
        56
      ]
    },
    {
      "id": "xxljob",
      "type": "backend",
      "label": "XXL-Job",
      "sublabel": "分布式任务调度",
      "pos": [
        847.5,
        720
      ],
      "size": [
        125,
        56
      ]
    }
  ],
  "boundaries": [
    {
      "kind": "region",
      "label": "腾讯云 K8S 集群",
      "wraps": [
        "gateway",
        "front",
        "hbq-api",
        "hbq-mgr",
        "zzq-api",
        "zzq-mgr",
        "admin",
        "common-api"
      ]
    },
    {
      "kind": "region",
      "label": "平台基础设施",
      "wraps": [
        "nacos",
        "mysql-hbq",
        "mysql-zzq",
        "redis",
        "mysql-base",
        "rabbitmq",
        "xxljob"
      ]
    }
  ],
  "connections": [
    {
      "id": "clients-gateway",
      "from": "clients",
      "to": "gateway",
      "label": "HTTPS · 业务请求",
      "variant": "emphasis",
      "fromSide": "right",
      "toSide": "left",
      "labelAt": [194, 138]
    },
    {
      "id": "front-gateway",
      "from": "front",
      "to": "gateway",
      "label": "HTTPS · 管理请求",
      "variant": "emphasis",
      "fromSide": "left",
      "toSide": "right"
    },
    {
      "id": "gw-hbq-api",
      "from": "gateway",
      "to": "hbq-api",
      "label": "路由",
      "fromSide": "bottom",
      "toSide": "top",
      "labelAt": [562.5, 180]
    },
    {
      "id": "gw-hbq-mgr",
      "from": "gateway",
      "to": "hbq-mgr",
      "label": "路由",
      "fromSide": "bottom",
      "toSide": "top",
      "labelAt": [702.5, 180]
    },
    {
      "id": "gw-zzq-api",
      "from": "gateway",
      "to": "zzq-api",
      "label": "路由",
      "fromSide": "bottom",
      "toSide": "top",
      "labelAt": [842.5, 180]
    },
    {
      "id": "gw-zzq-mgr",
      "from": "gateway",
      "to": "zzq-mgr",
      "label": "路由",
      "fromSide": "bottom",
      "toSide": "top",
      "labelAt": [982.5, 180]
    },
    {
      "id": "gw-admin",
      "from": "gateway",
      "to": "admin",
      "label": "路由",
      "fromSide": "bottom",
      "toSide": "top",
      "labelAt": [1122.5, 180]
    },
    {
      "id": "gw-common",
      "from": "gateway",
      "to": "common-api",
      "label": "路由",
      "fromSide": "bottom",
      "toSide": "top",
      "labelAt": [1262.5, 180]
    },
    {
      "id": "hbq-nacos",
      "from": "hbq-api",
      "to": "nacos",
      "label": "注册 / 配置",
      "variant": "dashed",
      "fromSide": "bottom",
      "toSide": "top",
      "labelDy": 26
    },
    {
      "id": "hbqmgr-mysql",
      "from": "hbq-mgr",
      "to": "mysql-hbq",
      "label": "SQL · hbq 库",
      "fromSide": "bottom",
      "toSide": "top",
      "labelDy": 26
    },
    {
      "id": "zzqapi-mysql",
      "from": "zzq-api",
      "to": "mysql-zzq",
      "label": "SQL · zzq 库",
      "fromSide": "bottom",
      "toSide": "top",
      "labelDy": 26
    },
    {
      "id": "zzqmgr-redis",
      "from": "zzq-mgr",
      "to": "redis",
      "label": "缓存",
      "variant": "dashed",
      "fromSide": "bottom",
      "toSide": "top",
      "labelDy": 26
    },
    {
      "id": "admin-mysql",
      "from": "admin",
      "to": "mysql-base",
      "label": "SQL · base 库",
      "fromSide": "bottom",
      "toSide": "top",
      "labelDy": 26
    },
    {
      "id": "common-mq",
      "from": "common-api",
      "to": "rabbitmq",
      "label": "MQ 消息",
      "variant": "dashed",
      "fromSide": "bottom",
      "toSide": "top",
      "labelDy": 26
    },
    {
      "id": "xxl-zzqmgr",
      "from": "xxljob",
      "to": "zzq-mgr",
      "label": "批次 / 状态任务",
      "variant": "dashed",
      "fromSide": "top",
      "toSide": "left",
      "via": [
        [
          910,
          228
        ],
        [
          920,
          228
        ]
      ],
      "labelAt": [910, 640]
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "业务域",
      "items": [
        "红包券 HBQ：活动 / 券 / 套餐组合管理",
        "增值券 ZZQ：满减券 / 批次 / 经销商 / SKU",
        "通用：账户、基础数据、公共服务"
      ]
    },
    {
      "dot": "amber",
      "title": "技术底座",
      "items": [
        "Spring Cloud Alibaba · Nacos 注册与配置",
        "Sentinel 流控 · XXL-Job 定时调度",
        "Redis 缓存 + RabbitMQ 消息异步"
      ]
    },
    {
      "dot": "violet",
      "title": "数据与配置",
      "items": [
        "MySQL 按业务分库：hbq / zzq / base",
        "配置经 Nacos：redis.yml / rabbit.yml / *-db.yml",
        "命名空间 sip-ecc-prod · 腾讯云 K8S 部署"
      ]
    }
  ]
}
