自查新做的下游订单页时发现的问题:商户筛选下拉调用 /api/platform/merchants?size=200,而分页查询会把 >100 的 size 静默降级为 20 (service.normalizePage),因此商户超过 20 家时下拉里会少一批商户,界面不报任何错。 - 新增 service.ListMerchantOptions:不分页返回全部启用商户的精简信息 (id/code/name),独立于分页的 ListMerchants - 新增 GET /api/platform/merchant-options - 前端改用该接口;types 增加 MerchantOption,api 增加 merchantOptions() 测试: - TestListMerchantOptionsReturnsAllActiveMerchants:造 25 家启用 + 1 家禁用, 断言返回数量与库中启用数一致、必须超过分页上限、且不含已禁用商户 - TestListMerchantsClampsOversizedPageSize:钉住「size=200 实际只返回 20 条, 而 total 反映真实总数」这一事实,即上面接口存在的理由
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the Oxlint configuration
If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"options": {
"typeAware": true
},
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
See the Oxlint rules documentation for the full list of rules and categories.