- 监控平台门店状态时,如果平台门店是自动接单的,改为非自动接单
This commit is contained in:
@@ -1432,6 +1432,7 @@ func GetStoresVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, v
|
|||||||
|
|
||||||
DeliveryType: store.DeliveryType,
|
DeliveryType: store.DeliveryType,
|
||||||
StoreName: store.OriginalName,
|
StoreName: store.OriginalName,
|
||||||
|
IsAutoOrder: store.IsAutoOrder,
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1483,6 +1484,18 @@ func updateVendorStoreStatusBySnapshot(db *dao.DaoDB, curSnapshotList []*model.V
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dao.Commit(db)
|
dao.Commit(db)
|
||||||
|
|
||||||
|
utils.CallFuncAsync(func() {
|
||||||
|
for _, v := range storeMapList {
|
||||||
|
if snapshot := snapshotMap[jxutils.Combine2Int(v.StoreID, v.VendorID)]; snapshot != nil {
|
||||||
|
if snapshot.IsAutoOrder == 1 {
|
||||||
|
if handler, ok := partner.GetPurchasePlatformFromVendorID(snapshot.VendorID).(partner.IStoreHandler); ok {
|
||||||
|
handler.EnableAutoAcceptOrder(jxcontext.AdminCtx, v.StoreID, v.VendorStoreID, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ type StoreDetail struct {
|
|||||||
|
|
||||||
DistrictName string `json:"districtName"`
|
DistrictName string `json:"districtName"`
|
||||||
CityName string `json:"cityName"`
|
CityName string `json:"cityName"`
|
||||||
|
|
||||||
|
IsAutoOrder int8 `json:"isAutoOrder"` // 平台是否自动接单,-1:否,0:未知,1:是
|
||||||
}
|
}
|
||||||
|
|
||||||
// 带快递门店信息的
|
// 带快递门店信息的
|
||||||
|
|||||||
@@ -412,6 +412,7 @@ type VendorStoreSnapshot struct {
|
|||||||
CloseTime2 int16 `json:"closeTime2"` // 格式同上
|
CloseTime2 int16 `json:"closeTime2"` // 格式同上
|
||||||
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
|
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
|
||||||
StoreName string `orm:"size(255)" json:"storeName"` // 平台门店的名字
|
StoreName string `orm:"size(255)" json:"storeName"` // 平台门店的名字
|
||||||
|
IsAutoOrder int8 `json:"isAutoOrder"` // 平台是否自动接单,-1:否,0:未知,1:是
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*VendorStoreSnapshot) TableUnique() [][]string {
|
func (*VendorStoreSnapshot) TableUnique() [][]string {
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorStoreID string
|
|||||||
Tel1: result.Phone,
|
Tel1: result.Phone,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
if result.IsAutoOrder == 0 {
|
||||||
|
retVal.IsAutoOrder = 1
|
||||||
|
} else {
|
||||||
|
retVal.IsAutoOrder = -1
|
||||||
|
}
|
||||||
retVal.OriginalName = result.StationName
|
retVal.OriginalName = result.StationName
|
||||||
_, retVal.Name = jxutils.SplitStoreName(retVal.OriginalName, partner.StoreNameSeparator, VendorStorePrefix)
|
_, retVal.Name = jxutils.SplitStoreName(retVal.OriginalName, partner.StoreNameSeparator, VendorStorePrefix)
|
||||||
retVal.DeliveryType = JdDeliveryType2Jx(result.CarrierNo)
|
retVal.DeliveryType = JdDeliveryType2Jx(result.CarrierNo)
|
||||||
|
|||||||
Reference in New Issue
Block a user