- jdapi.handleBatchOpResult中,不判断inErr就解析
This commit is contained in:
@@ -149,7 +149,7 @@ func (a *API) GetStationInfoList(stationNo string, skuIds []int64) (priceInfo []
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *API) handleBatchOpResult(batchCount int, inErr error, result interface{}, tagName string) (responseList []*StoreSkuBatchUpdateResponse, err error) {
|
func (a *API) handleBatchOpResult(batchCount int, inErr error, result interface{}, tagName string) (responseList []*StoreSkuBatchUpdateResponse, err error) {
|
||||||
if inErr != nil {
|
if result != nil {
|
||||||
if err = utils.Map2Struct(result, &responseList, true, tagName); err == nil {
|
if err = utils.Map2Struct(result, &responseList, true, tagName); err == nil {
|
||||||
var failedList []*StoreSkuBatchUpdateResponse
|
var failedList []*StoreSkuBatchUpdateResponse
|
||||||
for _, v := range responseList {
|
for _, v := range responseList {
|
||||||
@@ -257,6 +257,7 @@ func (a *API) BatchUpdateVendibility(trackInfo, outStationNo, stationNo string,
|
|||||||
} else {
|
} else {
|
||||||
jdParams["stationNo"] = stationNo
|
jdParams["stationNo"] = stationNo
|
||||||
}
|
}
|
||||||
|
// 此函数在全部失败时,err仍然返回成功
|
||||||
result, err := a.AccessAPINoPage2("stock/batchUpdateVendibility", jdParams, nil, nil, genNoPageResultParser("retCode", "retMsg", "data", "0"), trackInfo)
|
result, err := a.AccessAPINoPage2("stock/batchUpdateVendibility", jdParams, nil, nil, genNoPageResultParser("retCode", "retMsg", "data", "0"), trackInfo)
|
||||||
if result != nil {
|
if result != nil {
|
||||||
var err2 error
|
var err2 error
|
||||||
|
|||||||
Reference in New Issue
Block a user