This commit is contained in:
苏尹岚
2021-01-28 10:01:13 +08:00
parent 599749191b
commit a32c7f7983
3 changed files with 28 additions and 0 deletions

View File

@@ -248,6 +248,15 @@ func (c *DeliveryHandler) getBillParams(db *dao.DaoDB, order *model.GoodsOrder)
// IDeliveryPlatformHandler
func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee int64) (bill *model.Waybill, err error) {
db := dao.GetDB()
if vendorOrgCode, err := dao.GetVendorOrgCode(db, model.VendorIDDada, "", model.VendorOrgTypeDelivery); err == nil {
if len(vendorOrgCode) > 0 {
if vendorOrgCode[0].IsOpen == model.YES {
return nil, fmt.Errorf("此平台配送已被系统关闭,暂不发配送 [%v]", vendorOrgCode[0].Comment)
}
}
} else {
return nil, err
}
billParams, err := c.getBillParams(db, order)
if err == nil {
if globals.EnableStoreWrite {