物料下单更改数据类型price
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
@@ -52,20 +53,20 @@ type QuerySpSourceResult struct {
|
||||
}
|
||||
|
||||
type AddOrderParam struct {
|
||||
IsvUUID string `json:"isvUUID"` //isv出库单号(商家出库单号),作为isv出库的唯一性校验码:长度不能超125
|
||||
IsvSource string `json:"isvSource"` //ISV来源编号
|
||||
ShopNo string `json:"shopNo"` //店铺编号(B2C订单必填,B2B(soType=2)订单非必填)
|
||||
DepartmentNo string `json:"departmentNo"` //事业部编号,且与pin匹配
|
||||
WarehouseNo string `json:"warehouseNo"` //库房编号,事业部开启寻源拆分服务可不填;否则必填;
|
||||
SalesPlatformOrderNo string `json:"salesPlatformOrderNo"` //销售平台订单号,如果销售平台来源为京东平台,则该字段不能为空,长度不超过200
|
||||
SalePlatformSource string `json:"salePlatformSource"` //销售平台来源
|
||||
ConsigneeName string `json:"consigneeName"` //收货人姓名,长度不能超20
|
||||
ConsigneeMobile string `json:"consigneeMobile"` //收货人手机(收货人电话、手机至少有一个不为空),长度不能超30
|
||||
ConsigneeAddress string `json:"consigneeAddress"` //收货人地址 ,长度不能超100
|
||||
OrderMark string `json:"orderMark"` //订单标记位,首位为1代表货到付款
|
||||
GoodsNo []string `json:"goodsNo"` //ECLP商品编号,与商家商品编号二选一必填(两者都指定,以goodsNo为准)
|
||||
Price []int `json:"price"` //商品金额,会在订单面单上线上商品单价
|
||||
Quantity []int `json:"quantity"` //商品的出库数量,必须>0
|
||||
IsvUUID string `json:"isvUUID"` //isv出库单号(商家出库单号),作为isv出库的唯一性校验码:长度不能超125
|
||||
IsvSource string `json:"isvSource"` //ISV来源编号
|
||||
ShopNo string `json:"shopNo"` //店铺编号(B2C订单必填,B2B(soType=2)订单非必填)
|
||||
DepartmentNo string `json:"departmentNo"` //事业部编号,且与pin匹配
|
||||
WarehouseNo string `json:"warehouseNo"` //库房编号,事业部开启寻源拆分服务可不填;否则必填;
|
||||
SalesPlatformOrderNo string `json:"salesPlatformOrderNo"` //销售平台订单号,如果销售平台来源为京东平台,则该字段不能为空,长度不超过200
|
||||
SalePlatformSource string `json:"salePlatformSource"` //销售平台来源
|
||||
ConsigneeName string `json:"consigneeName"` //收货人姓名,长度不能超20
|
||||
ConsigneeMobile string `json:"consigneeMobile"` //收货人手机(收货人电话、手机至少有一个不为空),长度不能超30
|
||||
ConsigneeAddress string `json:"consigneeAddress"` //收货人地址 ,长度不能超100
|
||||
OrderMark string `json:"orderMark"` //订单标记位,首位为1代表货到付款
|
||||
GoodsNo []string `json:"goodsNo"` //ECLP商品编号,与商家商品编号二选一必填(两者都指定,以goodsNo为准)
|
||||
Price []float64 `json:"price"` //商品金额,会在订单面单上线上商品单价
|
||||
Quantity []int `json:"quantity"` //商品的出库数量,必须>0
|
||||
}
|
||||
|
||||
type AddOrderResult struct {
|
||||
@@ -196,12 +197,11 @@ func (a *API) AccessAPI(action string, url string, bizParams map[string]interfac
|
||||
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||
}
|
||||
if err == nil {
|
||||
// returnCode := utils.Interface2String(jsonResult1["trxstatus"])
|
||||
// if returnCode != TrxStatusSuccess {
|
||||
// errLevel = platformapi.ErrLevelGeneralFail
|
||||
// err = utils.NewErrorCode(utils.Interface2String(jsonResult1["errmsg"])+utils.Interface2String(jsonResult1["retmsg"]), returnCode)
|
||||
// baseapi.SugarLogger.Debugf("tonglianpay AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
|
||||
// }
|
||||
if utils.Interface2String(jsonResult1["error_response"]) != "" {
|
||||
errLevel = platformapi.ErrLevelGeneralFail
|
||||
err = utils.NewErrorCode(utils.Interface2String(jsonResult1["error_response"]), jsonResult1["error_response"].(map[string]interface{})["code"].(string))
|
||||
baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
|
||||
}
|
||||
retVal = jsonResult1
|
||||
}
|
||||
return errLevel, err
|
||||
@@ -236,7 +236,7 @@ func (a *API) CancelOrder(eclpSoNo string) (cancelOrderResult *CancelOrderResult
|
||||
"eclpSoNo": eclpSoNo,
|
||||
})
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result, &cancelOrderResult, false)
|
||||
utils.Map2StructByJson(result["jingdong_eclp_order_cancelOrder_response"].(map[string]interface{})["cancelorder_result"], &cancelOrderResult, false)
|
||||
}
|
||||
return cancelOrderResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user