1
This commit is contained in:
@@ -934,12 +934,13 @@ func UpdateBoxPrice(ctx *jxcontext.Context, db *dao.DaoDB, list []int) error {
|
||||
},
|
||||
})
|
||||
}
|
||||
count := utils.Float64TwoInt(math.Ceil(float64(len(foodDataList)) / float64(200)))
|
||||
|
||||
count := utils.Float64TwoInt(math.Ceil(float64(len(foodDataList)) / float64(100)))
|
||||
api := getAPI(storeDetail.VendorOrgCode, v, storeDetail.VendorStoreID)
|
||||
for i := 1; i <= count; i++ {
|
||||
api.SetToken(storeDetail.MtwmToken)
|
||||
if i == count {
|
||||
result, err := api.RetailBatchInitData(ctx.GetTrackInfo(), storeDetail.VendorStoreID, foodDataList[(i-1)*200:])
|
||||
result, err := api.RetailBatchInitData(ctx.GetTrackInfo(), storeDetail.VendorStoreID, foodDataList[(i-1)*100:])
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("RetailBatchInitData1 err := %v", err)
|
||||
}
|
||||
@@ -947,7 +948,7 @@ func UpdateBoxPrice(ctx *jxcontext.Context, db *dao.DaoDB, list []int) error {
|
||||
globals.SugarLogger.Debugf("RetailBatchInitData1 result := %s", utils.Format4Output(result, false))
|
||||
}
|
||||
} else {
|
||||
result, err := api.RetailBatchInitData(ctx.GetTrackInfo(), storeDetail.VendorStoreID, foodDataList[(i-1)*200:i*200])
|
||||
result, err := api.RetailBatchInitData(ctx.GetTrackInfo(), storeDetail.VendorStoreID, foodDataList[(i-1)*100:i*100])
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("RetailBatchInitData2 err := %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user