重构: 手续费改为百分比/固定二选一,清理旧 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:
@@ -6,15 +6,10 @@ import MainLayout from './layouts/MainLayout'
|
||||
import Login from './pages/Login'
|
||||
import Register from './pages/Register'
|
||||
import Dashboard from './pages/Dashboard'
|
||||
import Skins from './pages/Skins'
|
||||
import Orders from './pages/Orders'
|
||||
import Distributors from './pages/Distributors'
|
||||
import ShipLogs from './pages/ShipLogs'
|
||||
import OpenApiDocs from './pages/OpenApiDocs'
|
||||
import MerchantCenter from './pages/MerchantCenter'
|
||||
import PlatformMerchants from './pages/PlatformMerchants'
|
||||
import type { ReactNode } from 'react'
|
||||
|
||||
function PrivateRoute({ children }: { children: ReactNode }) {
|
||||
const { token } = useAuth()
|
||||
if (!token) return <Navigate to="/login" replace />
|
||||
@@ -41,17 +36,7 @@ function AppRoutes() {
|
||||
}
|
||||
>
|
||||
<Route index element={<Dashboard />} />
|
||||
<Route path="skins" element={<Skins />} />
|
||||
<Route path="orders" element={<Orders />} />
|
||||
<Route path="merchant-center" element={<MerchantCenter />} />
|
||||
<Route
|
||||
path="distributors"
|
||||
element={
|
||||
<AdminRoute>
|
||||
<Distributors />
|
||||
</AdminRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="platform-merchants"
|
||||
element={
|
||||
@@ -60,14 +45,6 @@ function AppRoutes() {
|
||||
</AdminRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="ship-logs"
|
||||
element={
|
||||
<AdminRoute>
|
||||
<ShipLogs />
|
||||
</AdminRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="open-api"
|
||||
element={
|
||||
|
||||
Reference in New Issue
Block a user