fix: 批量导入并发哈希并校正 CSV 行号

This commit is contained in:
Nixevol
2026-09-30 16:22:48 +08:00
parent ac08b6c071
commit 43f847483b
4 changed files with 483 additions and 77 deletions
+11
View File
@@ -649,3 +649,14 @@ func writeCSVValidationError(w http.ResponseWriter, errs []csvLineError) {
Data: map[string]any{"errors": errs},
})
}
func writeCSVConflictError(w http.ResponseWriter, errs []csvLineError) {
httpx.WriteJSON(w, http.StatusConflict, httpx.Envelope{
OK: false,
Error: &httpx.ErrorBody{
Code: "id_taken",
Message: "编号已占用",
},
Data: map[string]any{"errors": errs},
})
}