- 添加Struct2MapByJson
- 去掉将全局structs.DefaultTagName设置为"json"
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user