京东物料订单增加逆向完成状态

This commit is contained in:
苏尹岚
2020-04-17 09:18:56 +08:00
parent 74ff5c875a
commit 05f6b0cf20
2 changed files with 10 additions and 7 deletions

View File

@@ -828,13 +828,15 @@ func (a *API) GetJdSkuDirectPrice(skuID int) (price int64, err error) {
"pageSize": 1,
}
body, err := a.AccessStorePage2("https://stock-store.jddj.com/storeproduct/query", jdParams, true, "")
bodyStr := body.(map[string]interface{})["fakeData"].(string)
result := regexpJDSkuDirectPrice.FindAllStringSubmatch(bodyStr, -1)
if len(result) > 0 {
if result[3][1] != "" {
return utils.Float64TwoInt64(utils.Str2Float64(result[3][1]) * 100), err
} else {
return 0, err
if body != nil {
bodyStr := body.(map[string]interface{})["fakeData"].(string)
result := regexpJDSkuDirectPrice.FindAllStringSubmatch(bodyStr, -1)
if len(result) > 0 {
if result[3][1] != "" {
return utils.Float64TwoInt64(utils.Str2Float64(result[3][1]) * 100), err
} else {
return 0, err
}
}
}
return price, err

View File

@@ -43,6 +43,7 @@ const (
SoStatusCode10054 = "10054" //分拣中心发货
SoStatusCode10033 = "10033" //站点验收
SoStatusCode10034 = "10034" //妥投
SoStatusCode10038 = "10038" //逆向完成
)
type API struct {