+StoreMap.BoxFee

美团外卖支持打包袋费,美团商品统一添加1角打包费
This commit is contained in:
gazebo
2019-12-30 16:50:32 +08:00
parent cee131b197
commit f1d025eb15
5 changed files with 33 additions and 5 deletions

View File

@@ -156,6 +156,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
errList.AddErr(p.UpdateStoreStatus(jxcontext.AdminCtx, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, mergedStoreStatus))
}
errList.AddErr(p.UpdateStoreOpTime(jxcontext.AdminCtx, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, storeDetail.GetOpTimeList()))
errList.AddErr(p.UpdateStoreBoxFee(jxcontext.AdminCtx, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, storeDetail.BoxFee))
return errList.GetErrListAsOne()
}
@@ -290,3 +291,8 @@ func (c *PurchaseHandler) GetAllStoresVendorID(ctx *jxcontext.Context, vendorOrg
func (c *PurchaseHandler) UpdateStoreCustomID(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID string, storeID int64) (err error) {
return err
}
func (c *PurchaseHandler) UpdateStoreBoxFee(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, boxFee int) (err error) {
err = api.MtwmAPI.PackagePriceUpdate(vendorStoreID, 1, boxFee)
return err
}

View File

@@ -28,6 +28,7 @@ const (
specialStoreID = "8171010"
// specialStoreID = "2523687"
fixBoxFee = 10
)
var (
@@ -252,8 +253,8 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
}
foodData["min_order_count"] = 1
foodData["unit"] = storeSku.Unit
foodData["box_num"] = 0
foodData["box_price"] = 0.0
foodData["box_num"] = 1
foodData["box_price"] = jxutils.IntPrice2Standard(fixBoxFee)
catCode := tryCatName2Code(storeSku.VendorCatID)
if catCode != "" {
foodData["category_code"] = catCode