Merge remote-tracking branch 'origin/mark' into su

This commit is contained in:
苏尹岚
2020-01-07 11:04:54 +08:00
57 changed files with 2348 additions and 934 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))
return errList.GetErrListAsOne()
}
@@ -290,3 +291,13 @@ 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) (err error) {
boxFee, err := dao.GetSysConfigAsInt64(dao.GetDB(), model.ConfigSysMtwmBoxFee)
if err == nil {
if globals.EnableMtwmStoreWrite && globals.IsProductEnv() {
err = api.MtwmAPI.PackagePriceUpdate(vendorStoreID, 1, int(boxFee))
}
}
return err
}

View File

@@ -259,8 +259,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(storeSku.BoxFee)
catCode := tryCatName2Code(storeSku.VendorCatID)
if catCode != "" {
foodData["category_code"] = catCode