- 添加Struct2MapByJson

- 去掉将全局structs.DefaultTagName设置为"json"
This commit is contained in:
gazebo
2019-03-27 22:42:35 +08:00
parent 11c6386331
commit ea13a07fea
10 changed files with 26 additions and 23 deletions

View File

@@ -6,7 +6,6 @@ import (
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/baseapi/platformapi"
"git.rosy.net.cn/baseapi/utils"
"github.com/fatih/structs"
)
// https://open.shop.ele.me/openapi/documents/callback
@@ -187,7 +186,7 @@ func (a *API) GetCallbackMsg(data []byte) (msg *CallbackMsg, callbackResponse *C
return nil, callbackResponse
}
mapData := structs.Map(msg)
mapData := utils.Struct2MapByJson(msg)
callbackResponse = a.CheckCallbackValidation(mapData)
return msg, callbackResponse
}