重构: 手续费改为百分比/固定二选一,清理旧 Skin/Order/ShipLog 演示链路

手续费:
- 新增 fee_type 字段(rate/fixed),百分比与固定金额二选一,不再叠加
- calculateServiceFee 按 fee_type 分支计算
- 商户创建/更新校验 fee_type,订单落库快照 fee_type
- 前端表单改为下拉选择手续费类型,动态显示对应输入框
- 测试拆为 TestFeeRate + TestFeeFixed

清理旧链路:
- 删除旧 Skin/Order/ShipLog 模型及 OrderService/SkinService
- Dashboard 迁移到 FulfillmentService
- 上游 /api/open/v1 改为基于 FulfillmentOrder 实现,接口契约不变
- 推送留痕改用 AuditLog,不再建 ShipLog 表
- 删除前端 Skins/Orders/ShipLogs/Distributors 页面及路由、菜单、API、类型
- 新增迁移 003: 添加 fee_type 列并 DROP 旧表
This commit is contained in:
yml2213
2026-07-30 14:12:27 +08:00
parent 83429456a6
commit bafe41a3ea
36 changed files with 1247 additions and 2446 deletions
+2 -10
View File
@@ -11,14 +11,10 @@ import {
} from 'antd'
import {
DashboardOutlined,
SkinOutlined,
ShoppingOutlined,
TeamOutlined,
UserOutlined,
LogoutOutlined,
MenuFoldOutlined,
MenuUnfoldOutlined,
SendOutlined,
ApiOutlined,
ShopOutlined,
} from '@ant-design/icons'
@@ -39,15 +35,11 @@ export default function MainLayout() {
const menuItems: MenuProps['items'] = useMemo(() => {
const items: MenuProps['items'] = [
{ key: '/', icon: <DashboardOutlined />, label: '数据概览' },
{ key: '/skins', icon: <SkinOutlined />, label: '皮肤商品' },
{ key: '/orders', icon: <ShoppingOutlined />, label: '订单管理' },
{ key: '/merchant-center', icon: <ShopOutlined />, label: '商户中心' },
]
if (isAdmin) {
items.push(
{ key: '/distributors', icon: <TeamOutlined />, label: '分销商' },
{ key: '/platform-merchants', icon: <ShopOutlined />, label: '商户管理' },
{ key: '/ship-logs', icon: <SendOutlined />, label: '发货记录' },
{ key: '/open-api', icon: <ApiOutlined />, label: '开放接口' },
)
}
@@ -81,7 +73,7 @@ export default function MainLayout() {
letterSpacing: 1,
}}
>
{collapsed ? '皮肤' : '皮肤分销系统'}
{collapsed ? '供货' : '皮肤供货平台'}
</div>
<Menu
theme="dark"
@@ -112,7 +104,7 @@ export default function MainLayout() {
<Avatar size="small" icon={<UserOutlined />} />
<Typography.Text>
{user?.nickname || user?.username}
{isAdmin ? '(管理员)' : '分销商)'}
{isAdmin ? '平台管理员)' : '(商户账号'}
</Typography.Text>
</Space>
</Dropdown>