oms/backend/package.json
liufumingren 69b26bf7cc feat(platform): 统一系统预设平台编码,外部平台标识按预设转换
- 新增 app/lib/platformCode.js:17 个预设平台(1688/DW/DYCS/DYGX/DYXD/JD/KS/MAOCHAO/
  MTYYJK/OFFLINE/OTHER/PDD/SPH/TB/TGC/TM/XHS)+ 别名表(中英文、大小写)+ 未知落 OTHER
- 店管家硬编码 PlatformType → 预设映射(Pinduoduo→PDD、TouTiao→DYXD、WxVideo→SPH、
  Alibaba→1688、Taobao→TB、KuaiShou→KS、Tmall→TM、JingDong→JD…)
- 拉单落库统一:orders.platform_type、order_status_*.source_platform_code/name
  写预设编码与本系统中文名(推 WMS 的 sourcePlatformCode/Name 同源)
- 店铺商品 platform_type 同样落预设编码
- 新增 scripts/migrate-platform-codes.js(npm run platforms:migrate):
  按同一口径迁移历史数据,默认 dry-run;已执行迁移 14 类(订单 27 / 店铺商品 44 / 状态表 15+13)
- 前端新增 constants/platform.ts(code→中文名):店铺商品「平台类型」列显示中文名,
  订单详情新增「来源平台」行
- 新增 platformCode 单测(5 项,含未知平台落 OTHER)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 17:31:44 +08:00

56 lines
2.0 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"name": "oms",
"version": "1.0.0",
"description": "OMS 后端服务(Egg.js)",
"private": true,
"scripts": {
"dev": "egg-bin dev --port 6090",
"start": "egg-scripts start --daemon --title=egg-server-oms",
"stop": "egg-scripts stop --title=egg-server-oms",
"test": "npm run lint -- --fix && npm run test-local",
"test-local": "egg-bin test",
"cov": "egg-bin cov",
"lint": "eslint .",
"ci": "npm run lint && npm run cov",
"migration:up": "sequelize-cli db:migrate",
"migration:down": "sequelize-cli db:migrate:undo",
"migration:down:all": "sequelize-cli db:migrate:undo:all",
"migration:create": "sequelize-cli migration:generate --name",
"swagger:export": "node scripts/export-swagger.js",
"order-items:rebuild": "node scripts/rebuild-order-items.js",
"order-index:repair": "node scripts/repair-order-index.js",
"orders:cleanup-shipped": "node scripts/cleanup-shipped-pending-orders.js",
"orders:migrate-logic-id": "node scripts/migrate-logic-order-id.js",
"platforms:migrate": "node scripts/migrate-platform-codes.js",
"deploy": "npm run deploy:prod",
"deploy:prod": "npm --prefix ../tools run deploy --",
"deploy:backend": "npm --prefix ../tools run deploy:backend --",
"deploy:init": "npm --prefix ../tools run init",
"rollback": "npm run rollback:prod",
"rollback:prod": "npm --prefix ../tools run rollback --",
"rollback:backend": "npm --prefix ../tools run rollback:backend --"
},
"dependencies": {
"dotenv": "^17.4.2",
"egg": "^3.34.0",
"egg-jwt": "^3.1.7",
"egg-redis": "^2.6.1",
"egg-scripts": "^3.1.0",
"egg-sequelize": "^6.0.0",
"egg-swagger-doc": "^2.3.2",
"exceljs": "^4.4.0",
"mysql2": "^3.24.4",
"nodemailer": "^10.0.1"
},
"devDependencies": {
"egg-bin": "^6.13.0",
"egg-mock": "^5.12.0",
"eslint": "^8.57.0",
"eslint-config-egg": "^14.1.0",
"sequelize-cli": "^6.6.5"
},
"engines": {
"node": ">=16.0.0"
}
}