Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package cms
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
@@ -258,6 +259,7 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi
|
||||
if v.SkuId == "" {
|
||||
v.SkuId = storeSku.AppFoodCode
|
||||
}
|
||||
salesCycle, _ := json.Marshal(v.AvailableTimes)
|
||||
mapSkuList := utils.Struct2MapByJson(v)
|
||||
if v.BoxNum == "" {
|
||||
delete(mapSkuList, "box_num")
|
||||
@@ -265,6 +267,7 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi
|
||||
if v.BoxPrice == "" {
|
||||
delete(mapSkuList, "box_price")
|
||||
}
|
||||
mapSkuList["available_times"] = string(salesCycle)
|
||||
skus = append(skus, mapSkuList)
|
||||
}
|
||||
foodData["skus"] = skus
|
||||
@@ -306,7 +309,6 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi
|
||||
if len(foodDataList)%10 != 0 {
|
||||
count += 1
|
||||
}
|
||||
globals.SugarLogger.Debugf("===============data := %s", utils.Format4Output(foodDataList, false))
|
||||
for i := 0; i < count; i++ {
|
||||
if i == count-1 {
|
||||
failedFoodList, _ := toApi.RetailBatchInitData(ctx.GetTrackInfo(), vendorStoreID, foodDataList[i*10:])
|
||||
|
||||
Reference in New Issue
Block a user