up
This commit is contained in:
@@ -172,11 +172,11 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
|||||||
StationNo: store.VendorStoreID,
|
StationNo: store.VendorStoreID,
|
||||||
UserPin: userName,
|
UserPin: userName,
|
||||||
OpenDistanceFreight: true,
|
OpenDistanceFreight: true,
|
||||||
IsFullFree: len(storeDetail.FreightDeductionPackObj.FreightDeductionList) > 0,
|
|
||||||
StartCharge: int64(storeDetail.FreightDeductionPackObj.StartPrice),
|
StartCharge: int64(storeDetail.FreightDeductionPackObj.StartPrice),
|
||||||
}
|
}
|
||||||
if freightParams.IsFullFree {
|
if len(storeDetail.FreightDeductionPackObj.FreightDeductionList) > 0 {
|
||||||
for _, v := range storeDetail.FreightDeductionPackObj.FreightDeductionList {
|
for _, v := range storeDetail.FreightDeductionPackObj.FreightDeductionList {
|
||||||
|
if v.DeductFreight > 0 {
|
||||||
freightParams.FreeFreightInfoList = append(freightParams.FreeFreightInfoList, &jdapi.FreeFreightInfo{
|
freightParams.FreeFreightInfoList = append(freightParams.FreeFreightInfoList, &jdapi.FreeFreightInfo{
|
||||||
FullFreeMoney: int64(v.BeginPrice),
|
FullFreeMoney: int64(v.BeginPrice),
|
||||||
FreeType: jdapi.FreightFreeTypePartBase,
|
FreeType: jdapi.FreightFreeTypePartBase,
|
||||||
@@ -184,6 +184,8 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
freightParams.IsFullFree = len(freightParams.FreeFreightInfoList) > 0
|
||||||
globals.SugarLogger.Debug(utils.Format4Output(freightParams, false))
|
globals.SugarLogger.Debug(utils.Format4Output(freightParams, false))
|
||||||
if globals.EnableJdStoreWrite {
|
if globals.EnableJdStoreWrite {
|
||||||
err = getAPI("").UpdateStoreFreightConfigNew(freightParams)
|
err = getAPI("").UpdateStoreFreightConfigNew(freightParams)
|
||||||
|
|||||||
Reference in New Issue
Block a user