配送和发消息品牌余额限制

This commit is contained in:
suyl
2021-08-31 14:05:59 +08:00
parent c7b677fd07
commit 637efdc421
7 changed files with 21 additions and 10 deletions

View File

@@ -166,9 +166,10 @@ func (c *BaseScheduler) CreateWaybill(platformVendorID int, order *model.GoodsOr
// }
// }
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, order.VendorOrgCode)
balance, _ := partner.CurStoreAcctManager.GetBrandBalance(storeDetail.BrandID)
handlerInfo := partner.GetDeliveryPlatformFromVendorID(platformVendorID)
if handlerInfo != nil && handlerInfo.Use4CreateWaybill {
if model.DeliveryBrandMarkMap[platformVendorID]&storeDetail.BrandIsOpen != 0 {
if model.DeliveryBrandMarkMap[platformVendorID]&storeDetail.BrandIsOpen != 0 && balance >= model.BrandBalanceLimit {
if c.IsReallyCallPlatformAPI {
bill, err = handlerInfo.Handler.CreateWaybill(order, maxDeliveryFee)
if err != nil {