Browse Source

update 通用化反序列对象

pull/2/head
lucas 2 months ago
parent
commit
e586dbab16
  1. 2
      configFiles/config_转发http2axy60000端口.json
  2. 2
      consumers/consumerHTTP_PRPXY.go
  3. 3
      dbHelper/apiServerHelper.go

2
configFiles/config_转发http2axy60000端口.json

@ -9,7 +9,7 @@
"routers": [
{
"router": "POST /upload/work/ABStatus",
"idTemplate": "{{.Values.UcId}}"
"idTemplate": "{{.values.ucId}}"
},
{
"router": "POST /upload/work/ABSHeart",

2
consumers/consumerHTTP_PRPXY.go

@ -73,7 +73,7 @@ func (the *consumerHttpProxy) onData(w http.ResponseWriter, r *http.Request) {
log.Printf("收到 %s 请求 %s", r.RequestURI, body)
bodyObj := HTTP_PRPXY.ABStatus{}
bodyObj := map[string]any{}
err = json.Unmarshal(body, &bodyObj)
if err != nil {
log.Printf("body 解析失败,请检查 %s", err.Error())

3
dbHelper/apiServerHelper.go

@ -35,9 +35,8 @@ func (the *ApiServerHelper) Initial() {
}
func (the *ApiServerHelper) Run() {
the.server.ListenAndServe()
log.Printf("apiServer监听端口 %d", the.port)
the.server.ListenAndServe()
}
func (the *ApiServerHelper) routeRegister() {

Loading…
Cancel
Save