初始化

This commit is contained in:
SunYF
2026-08-28 14:07:22 +08:00
parent a185247ab1
commit b34325a16f
971 changed files with 291 additions and 220360 deletions
@@ -1,24 +0,0 @@
package handler
import (
"encoding/json"
"net/http"
"strconv"
)
// parseJSON 解析请求体 JSON,失败返回错误(风格仿 bj_power_wms/internal/handler/common.go
func parseJSON(r *http.Request, v any) error {
dec := json.NewDecoder(r.Body)
return dec.Decode(v)
}
func atoi(s string, def int) int {
if s == "" {
return def
}
n, err := strconv.Atoi(s)
if err != nil {
return def
}
return n
}