修改回调
This commit is contained in:
@@ -249,7 +249,7 @@ func (s *DefScheduler) CheckStoreBalance(ctx *jxcontext.Context, order *model.Go
|
||||
//京西后台则是点一下发3个,len courierVendorIDs 是0
|
||||
//如果是小程序上点哪个扣哪个平台的钱
|
||||
//如果是后台,则选最高的那个扣
|
||||
storeAcct, err := cms.GetStoreAcctBalance(ctx, jxutils.GetSaleStoreIDFromOrder(order))
|
||||
storeAcct, err := cms.GetStoreAcctBalance(ctx, jxutils.GetSaleStoreIDFromOrder(order)) // 0.0
|
||||
deliveryFeeMap, _ := s.QueryOrderWaybillFeeInfoEx(ctx, order.VendorOrderID, order.VendorID)
|
||||
if err != nil {
|
||||
return errCode, fmt.Errorf("获取账户余额失败!")
|
||||
@@ -286,6 +286,12 @@ func (s *DefScheduler) CheckStoreBalance(ctx *jxcontext.Context, order *model.Go
|
||||
}
|
||||
} else {
|
||||
if storeAcct.AccountBalance < partner.MinCreateWaybillBalance {
|
||||
//// 如果门店没钱,查看品牌
|
||||
//if storeAcct.AccountBalance == 0 {
|
||||
// // 查询门店品牌id
|
||||
// dao.GetStoreList(dao.GetDB(), []int{order.JxStoreID}, nil, nil, nil, nil, "")
|
||||
// dao.GetBrandBalance(dao.GetDB(),brandId)
|
||||
//}
|
||||
return model.ErrCodeAccountBalanceNotEnough, fmt.Errorf("门店账户余额小于[%v]元,不能发配送!", jxutils.IntPrice2Standard(partner.MinCreateWaybillBalance))
|
||||
}
|
||||
if len(courierVendorIDs) == 1 {
|
||||
|
||||
@@ -155,7 +155,7 @@ func (s *StoreAcctManager) InsertStoreAcctIncomeAndUpdateStoreAcctBalance(ctx *j
|
||||
return err
|
||||
}
|
||||
|
||||
// 检查单子运费收入支出差
|
||||
// 检查当前订单的状态以及支出收入比
|
||||
func (s *StoreAcctManager) CheckStoreAcctExpendExist(vendorOrderID string) (isEqual, isZero bool, err error) {
|
||||
var (
|
||||
expends, incomes int
|
||||
|
||||
@@ -1173,7 +1173,7 @@ func GetStoreAcctExpendLastCreateWayBillFee(db *DaoDB, vendorOrderID string) (ex
|
||||
20,
|
||||
}
|
||||
if vendorOrderID != "" {
|
||||
sql += " AND vendor_order_id = ?"
|
||||
sql += " AND a.vendor_order_id = ?"
|
||||
sqlParams = append(sqlParams, vendorOrderID)
|
||||
}
|
||||
sql += `
|
||||
|
||||
Reference in New Issue
Block a user