mirror of
https://gitee.com/qqtt-ah/ai-crm.git
synced 2026-11-24 13:09:20 +08:00
refactor: 移除电商BI与渠道模块,保留智能体与系统基础能力
This commit is contained in:
@@ -60,8 +60,3 @@ logging:
|
||||
top.xyquan.ecomdmbbackend: INFO
|
||||
org.springframework.security: INFO
|
||||
org.springframework.web: INFO
|
||||
|
||||
# 拼多多 PMC:本地可开;多实例部署时仅一台 true
|
||||
pdd:
|
||||
msg:
|
||||
enabled: false
|
||||
|
||||
@@ -53,8 +53,3 @@ logging:
|
||||
top.xyquan.ecomdmbbackend: INFO
|
||||
org.springframework.security: INFO
|
||||
org.springframework.web: INFO
|
||||
|
||||
# 拼多多 PMC:多实例仅一台开启
|
||||
pdd:
|
||||
msg:
|
||||
enabled: false
|
||||
|
||||
@@ -54,8 +54,3 @@ logging:
|
||||
top.xyquan.ecomdmbbackend: INFO
|
||||
org.springframework.security: WARN
|
||||
org.springframework.web: WARN
|
||||
|
||||
# 拼多多 PMC:多实例仅一台开启
|
||||
pdd:
|
||||
msg:
|
||||
enabled: false
|
||||
|
||||
@@ -52,8 +52,3 @@ logging:
|
||||
top.xyquan.ecomdmbbackend: INFO
|
||||
org.springframework.security: WARN
|
||||
org.springframework.web: WARN
|
||||
|
||||
# 拼多多 PMC:多实例仅一台开启
|
||||
pdd:
|
||||
msg:
|
||||
enabled: true
|
||||
|
||||
@@ -4,12 +4,6 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
config:
|
||||
import:
|
||||
- optional:classpath:config/channel-pdd.yml
|
||||
- optional:file:./config/channel-pdd.yml
|
||||
- optional:classpath:config/channel-pdd-pop-rate-limit.yml
|
||||
- optional:file:./config/channel-pdd-pop-rate-limit.yml
|
||||
jackson:
|
||||
time-zone: Asia/Shanghai
|
||||
mvc:
|
||||
@@ -61,7 +55,7 @@ spring:
|
||||
ai:
|
||||
mcp:
|
||||
server:
|
||||
name: ecom-dmb-mcp
|
||||
name: ai-crm-mcp
|
||||
version: 1.0.0
|
||||
protocol: STREAMABLE
|
||||
type: SYNC
|
||||
@@ -69,18 +63,8 @@ spring:
|
||||
streamable-http:
|
||||
mcp-endpoint: /mcp
|
||||
|
||||
# 订单统计读模型(汇总表已删,待重构前关闭写入与 miss 补算)
|
||||
# BI 日汇聚、License、系统初始化(合并为单一 ecom 根键,避免 DuplicateKeyException)
|
||||
# License、系统初始化、Agent(合并为单一 ecom 根键,避免 DuplicateKeyException)
|
||||
ecom:
|
||||
bi:
|
||||
stat:
|
||||
lock-ttl-seconds: 600
|
||||
inc-delay-ms: 5000
|
||||
inc-max-retry: 20
|
||||
full-listener-concurrency: "2-4"
|
||||
inc-listener-concurrency: "2-4"
|
||||
inc-lag-threshold-minutes: 10
|
||||
inc-activity-window-hours: 24
|
||||
license:
|
||||
license-file: config/license.key
|
||||
revocation-file: config/revoked.jti
|
||||
@@ -124,7 +108,7 @@ oss:
|
||||
# 系统文件:路径 = {app-name}/{profile}/{category}/{yyyy}/{hash}{ext};本地再加 uploads/
|
||||
sys:
|
||||
file:
|
||||
app-name: ecom-dmb
|
||||
app-name: ai-crm
|
||||
storage-type: local
|
||||
upload-mode: multipart
|
||||
max-size-mb: 50
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
# 拼多多 POP 出站限流(按 API type)
|
||||
# 由 application.yml 通过 spring.config.import 引入;未声明的接口走 default-rule / 代码默认
|
||||
# key 与 PddPopApiTypes 一致
|
||||
|
||||
pdd:
|
||||
pop:
|
||||
rate-limit:
|
||||
enabled: true
|
||||
acquire-wait-ms: 5000
|
||||
# 平台频控被动退避:2s → 5s → 15s
|
||||
backoff-ms: [2000, 5000, 15000]
|
||||
# 约官方上限 60% 单店余量 + 本 ISV 短窗
|
||||
default-rule:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
apis:
|
||||
pdd.order.list.get:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.order.number.list.increment.get:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.order.information.get:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.detail.get:
|
||||
shop-limit: 5000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.list.get:
|
||||
shop-limit: 5000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.add:
|
||||
shop-limit: 2000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 400
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.image.upload:
|
||||
shop-limit: 3000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 600
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.authorization.cats:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.cats.get:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.logistics.template.get:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.cat.rule.get:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.spec.get:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.goods.spec.id.get:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.one.express.cost.template:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.mall.info.get:
|
||||
shop-limit: 6000
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 800
|
||||
app-burst-window-seconds: 10
|
||||
pdd.pmc.user.permit:
|
||||
shop-limit: 600
|
||||
shop-window-seconds: 60
|
||||
app-burst-limit: 200
|
||||
app-burst-window-seconds: 10
|
||||
@@ -1,47 +0,0 @@
|
||||
# 拼多多渠道配置(OAuth / POP 分页 / PMC topics / 订单同步)
|
||||
# 由 application.yml 通过 spring.config.import 引入
|
||||
# POP 限流见 channel-pdd-pop-rate-limit.yml;msg.enabled 见各 application-{profile}.yml
|
||||
|
||||
pdd:
|
||||
oauth:
|
||||
client-id: 9b71d887c8dc4b46998dedfdeca9b866
|
||||
client-secret: c626f640a6fd5f56b2c8c009a5eb2d5683e6b955
|
||||
# 须与开放平台应用回调一致;经网关时注意 /api-dev 与后端 /api 前缀
|
||||
redirect-uri: https://ecbi.newloop.top/api/channel/pdd/auth/callback
|
||||
authorize-url: https://fuwu.pinduoduo.com/service-market/auth
|
||||
state-ttl-seconds: 600
|
||||
|
||||
pop:
|
||||
default-page-size: 100
|
||||
|
||||
# PMC 消息:enabled 在环境配置中设置(多实例仅一台开启)
|
||||
msg:
|
||||
auto-permit: true
|
||||
goods-topics:
|
||||
- pdd_goods_GoodsAdd
|
||||
- pdd_goods_GoodsUpdate
|
||||
- pdd_goods_GoodsOnShelf
|
||||
- pdd_goods_GoodsOffShelf
|
||||
- pdd_goods_GoodsDelete
|
||||
- pdd_goods_GoodsCheckReject
|
||||
|
||||
order-sync:
|
||||
overlap-seconds: 120
|
||||
lock-ttl-seconds: 600
|
||||
incremental-job-enabled: true
|
||||
incremental-cron: "0 */5 * * * ?"
|
||||
full-task-enabled: true
|
||||
# 同店全量按天并行上限(受单店 POP 限流约束)
|
||||
max-parallel-days-per-shop: 2
|
||||
# Rabbit 消费者并发(多店并行)
|
||||
full-listener-concurrency: "2-4"
|
||||
inc-listener-concurrency: "2-4"
|
||||
|
||||
# 订单转换:同店 FULL 按天并行;FULL/INC 拆队列且同店互斥
|
||||
order-convert:
|
||||
max-parallel-days-per-shop: 2
|
||||
lock-ttl-seconds: 600
|
||||
full-listener-concurrency: "2-4"
|
||||
inc-listener-concurrency: "2-4"
|
||||
busy-delay-ms: 5000
|
||||
busy-max-retry: 20
|
||||
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="top.xyquan.ecomdmbbackend.modules.ec.product.sku.cost.mapper.ProductSkuCostMapper">
|
||||
|
||||
<select id="selectCostsAsOf" resultType="top.xyquan.ecomdmbbackend.modules.ec.product.sku.cost.model.po.ProductSkuCostPO">
|
||||
SELECT c.*
|
||||
FROM ec_product_sku_cost c
|
||||
INNER JOIN (
|
||||
SELECT sku_id, MAX(effective_from) AS ef
|
||||
FROM ec_product_sku_cost
|
||||
WHERE effective_from <= #{onDate}
|
||||
AND sku_id IN
|
||||
<foreach collection="skuIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
GROUP BY sku_id
|
||||
) t ON c.sku_id = t.sku_id AND c.effective_from = t.ef
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="top.xyquan.ecomdmbbackend.modules.ec.order.mapper.OrderMapper">
|
||||
|
||||
<sql id="orderListFrom">
|
||||
ec_order o
|
||||
<choose>
|
||||
<when test="useShopTimeIndex">
|
||||
FORCE INDEX (idx_ec_order_company_shop_time)
|
||||
</when>
|
||||
<otherwise>
|
||||
FORCE INDEX (idx_ec_order_company_order_time)
|
||||
</otherwise>
|
||||
</choose>
|
||||
</sql>
|
||||
|
||||
<sql id="orderListWhere">
|
||||
WHERE o.company_id = #{companyId}
|
||||
<if test="shopId != null">
|
||||
AND o.shop_id = #{shopId}
|
||||
</if>
|
||||
<if test="platformCode != null and platformCode != ''">
|
||||
AND o.platform_code = #{platformCode}
|
||||
</if>
|
||||
<if test="platformOrderNo != null and platformOrderNo != ''">
|
||||
<choose>
|
||||
<when test="platformOrderNoPrefix">
|
||||
AND o.platform_order_no LIKE CONCAT(#{platformOrderNo}, '%')
|
||||
</when>
|
||||
<otherwise>
|
||||
AND o.platform_order_no LIKE CONCAT('%', #{platformOrderNo}, '%')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND o.status = #{status}
|
||||
</if>
|
||||
<if test="minPayAmount != null">
|
||||
AND o.pay_amount >= #{minPayAmount}
|
||||
</if>
|
||||
<if test="maxPayAmount != null">
|
||||
AND o.pay_amount <= #{maxPayAmount}
|
||||
</if>
|
||||
<if test="startOrderTime != null">
|
||||
AND o.order_time >= #{startOrderTime}
|
||||
</if>
|
||||
<if test="endOrderTime != null">
|
||||
AND o.order_time <= #{endOrderTime}
|
||||
</if>
|
||||
<if test="importTaskId != null">
|
||||
AND o.import_task_id = #{importTaskId}
|
||||
</if>
|
||||
<if test="confirm != null">
|
||||
AND o.confirm = #{confirm}
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM ec_order_item i
|
||||
INNER JOIN ec_product_sku s ON s.id = i.product_sku_id
|
||||
WHERE i.order_id = o.id AND s.product_id = #{productId}
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="countOrderList" resultType="long">
|
||||
SELECT COUNT(*)
|
||||
FROM <include refid="orderListFrom"/>
|
||||
<include refid="orderListWhere"/>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderListIds" resultType="long">
|
||||
SELECT o.id
|
||||
FROM <include refid="orderListFrom"/>
|
||||
<include refid="orderListWhere"/>
|
||||
ORDER BY ${orderByClause}
|
||||
LIMIT #{limit} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<select id="selectMinOrderDateForSku" resultType="java.time.LocalDate">
|
||||
SELECT MIN(DATE(o.order_time))
|
||||
FROM ec_order o
|
||||
INNER JOIN ec_order_item i ON i.order_id = o.id
|
||||
WHERE o.company_id = #{companyId}
|
||||
AND i.product_sku_id = #{skuId}
|
||||
</select>
|
||||
|
||||
<select id="selectShopStatDatesForSku"
|
||||
resultType="top.xyquan.ecomdmbbackend.modules.bi.orderstat.model.dto.ShopStatDateRow">
|
||||
SELECT DISTINCT o.shop_id AS shopId, DATE(o.order_time) AS statDate
|
||||
FROM ec_order o
|
||||
INNER JOIN ec_order_item i ON i.order_id = o.id
|
||||
WHERE o.company_id = #{companyId}
|
||||
AND i.product_sku_id = #{skuId}
|
||||
AND o.order_time >= #{startTime}
|
||||
AND o.order_time < #{endTime}
|
||||
ORDER BY o.shop_id, statDate
|
||||
</select>
|
||||
|
||||
<select id="selectShopIdsWithRecentActivity" resultType="long">
|
||||
SELECT DISTINCT o.shop_id
|
||||
FROM ec_order o
|
||||
WHERE o.company_id = #{companyId}
|
||||
AND o.update_time >= #{since}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"updatedAt": "2026-09-16T14:53:37.608Z",
|
||||
"features": [
|
||||
{
|
||||
"id": "pdd-ad-fee",
|
||||
"name": "拼多多商品推广费同步",
|
||||
"version": "0.3.10",
|
||||
"description": "从推广总览读取推广费并同步到 BI(总花费为 0 不记录)",
|
||||
"matchUrlPatterns": [
|
||||
"*://yingxiao.pinduoduo.com/*",
|
||||
"https://yingxiao.pinduoduo.com/"
|
||||
],
|
||||
"entry": "pdd-ad-fee.js",
|
||||
"sha256": "35930f61306f190e88d70c12729c12650a7db1215ecb7220032dbedf036df737",
|
||||
"executionWorld": "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +0,0 @@
|
||||
# 扩展安装包由 browser-extension `pnpm build` 生成,勿手改
|
||||
*
|
||||
!.gitignore
|
||||
Reference in New Issue
Block a user