123
This commit is contained in:
@@ -4,13 +4,18 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler"
|
"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"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
"git.rosy.net.cn/jx-callback/business/partner"
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
ctx *jxcontext.Context
|
||||||
|
)
|
||||||
var (
|
var (
|
||||||
FixedBaseScheduler *BaseScheduler
|
FixedBaseScheduler *BaseScheduler
|
||||||
)
|
)
|
||||||
@@ -167,10 +172,11 @@ func (c *BaseScheduler) CreateWaybill(platformVendorID int, order *model.GoodsOr
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, order.VendorOrgCode)
|
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, order.VendorOrgCode)
|
||||||
//balance, _ := partner.CurStoreAcctManager.GetBrandBalance(storeDetail.BrandID)
|
balance, _ := partner.CurStoreAcctManager.GetBrandBalance(storeDetail.BrandID)
|
||||||
|
storebalance, err := cms.GetStoreAcctBalance(ctx, order.JxStoreID)
|
||||||
handlerInfo := partner.GetDeliveryPlatformFromVendorID(platformVendorID)
|
handlerInfo := partner.GetDeliveryPlatformFromVendorID(platformVendorID)
|
||||||
if handlerInfo != nil && handlerInfo.Use4CreateWaybill {
|
if handlerInfo != nil && handlerInfo.Use4CreateWaybill {
|
||||||
if model.DeliveryBrandMarkMap[platformVendorID]&storeDetail.BrandIsOpen != 0 && /*balance */ 100 >= model.BrandBalanceLimit {
|
if model.DeliveryBrandMarkMap[platformVendorID]&storeDetail.BrandIsOpen != 0 && (balance >= model.BrandBalanceLimit || storebalance.AccountBalance >= 1000) {
|
||||||
if c.IsReallyCallPlatformAPI {
|
if c.IsReallyCallPlatformAPI {
|
||||||
bill, err = handlerInfo.Handler.CreateWaybill(order, maxDeliveryFee)
|
bill, err = handlerInfo.Handler.CreateWaybill(order, maxDeliveryFee)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const (
|
|||||||
BrandOpenSMS = 8 //短信
|
BrandOpenSMS = 8 //短信
|
||||||
BrandOpenVoice = 16 //语音
|
BrandOpenVoice = 16 //语音
|
||||||
|
|
||||||
BrandBalanceLimit = 10
|
BrandBalanceLimit = 1000
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
Reference in New Issue
Block a user