This commit is contained in:
邹宗楠
2022-01-04 09:01:19 +08:00
parent 5a499f48a6
commit 736c6422a2

View File

@@ -4,7 +4,6 @@ import (
"fmt"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler"
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model"
@@ -173,10 +172,9 @@ 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)
storebalance, err := cms.GetStoreAcctBalance(ctx, order.JxStoreID)
handlerInfo := partner.GetDeliveryPlatformFromVendorID(platformVendorID)
if handlerInfo != nil && handlerInfo.Use4CreateWaybill {
if model.DeliveryBrandMarkMap[platformVendorID]&storeDetail.BrandIsOpen != 0 && (balance >= model.BrandBalanceLimit || storebalance.AccountBalance >= 1000) { //判断品牌余额或者商店余额有一个大于10就可以开始创建
if model.DeliveryBrandMarkMap[platformVendorID]&storeDetail.BrandIsOpen != 0 && balance >= model.BrandBalanceLimit {
if c.IsReallyCallPlatformAPI {
bill, err = handlerInfo.Handler.CreateWaybill(order, maxDeliveryFee)
if err != nil {