docs: 统一修正全项目“SN管理”相关术语为“序列号”

本次 commit 统一修正了全项目范围内关于 SN 管理的术语表述,将原“SN管理”、“序列号件”、“批次件”等表述调整为“序列号”、“序列号=是”、“序列号=否”,同时同步更新了相关文档、代码注释、前端提示文本、数据库 schema 注释、API 文档等,确保全链路术语统一,消除理解歧义。
This commit is contained in:
SunYF
2026-10-10 15:58:59 +08:00
parent b032f47fc7
commit 8be6e03a15
335 changed files with 5742 additions and 1616 deletions
+15 -1
View File
@@ -223,11 +223,25 @@ func main() {
staticHandler.ServeHTTP(w, r)
})
server := rest.MustNewServer(c.RestConf, rest.WithNotFoundHandler(notFound))
server := rest.MustNewServer(c.RestConf,
rest.WithNotFoundHandler(notFound),
// JWT 鉴权失败统一回调(条17):401 业务码 JSON,前端据此跳登录页。
// 仅作用于 JWT 保护路由(/api/v1 业务组),内部 X-API-TOKEN 路由不走此回调。
rest.WithUnauthorizedCallback(func(w http.ResponseWriter, r *http.Request, err error) {
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.WriteHeader(http.StatusUnauthorized)
_, _ = w.Write([]byte(`{"code":401,"message":"登录已过期,请重新登录"}`))
}),
)
defer server.Stop()
ctx := svc.NewServiceContext(c)
// 滑动续签(条17):全局挂载 RenewalMiddleware——每个携带有效 Bearer token 的请求
// 重签新 token 写入响应头 X-Renewed-Token,前端/工位终端据此滚动续期;
// 无 Bearer 头的请求(登录、内部 X-API-TOKEN、静态资源)原样放行。
server.Use(handler.RenewalMiddleware(ctx))
handler.RegisterRoutes(server, ctx)
handler.RegisterProductionRoutes(server, ctx)