- 添加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

@@ -9,8 +9,6 @@ import (
"strconv"
"strings"
"github.com/fatih/structs"
"git.rosy.net.cn/baseapi/platformapi"
"git.rosy.net.cn/baseapi/utils"
)
@@ -244,7 +242,7 @@ func (a *API) result2OrderResponse(result *ResponseResult) (order *OrderResponse
}
func (a *API) CreateOrderByShop(basicParams *CreateOrderByShopParam, addParams map[string]interface{}) (order *OrderResponse, err error) {
params := structs.Map(basicParams)
params := utils.Struct2MapByJson(basicParams)
params["goods_value"] = strconv.FormatFloat(basicParams.GoodsValue, 'f', 2, 64)
params["goods_weight"] = strconv.FormatFloat(basicParams.GoodsWeight, 'f', 2, 64)
allParams := utils.MergeMaps(params, addParams)