- 获取平台门店信息后,更新本地DeliveryType

This commit is contained in:
gazebo
2019-07-29 17:18:06 +08:00
parent bda7a4edb2
commit 1a8bcef392
4 changed files with 17 additions and 12 deletions

View File

@@ -1349,6 +1349,8 @@ func GetStoresVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, v
CloseTime1: store.CloseTime1,
OpenTime2: store.OpenTime2,
CloseTime2: store.CloseTime2,
DeliveryType: store.DeliveryType,
}}
}
}
@@ -1391,7 +1393,8 @@ func updateVendorStoreStatusBySnapshot(db *dao.DaoDB, curSnapshotList []*model.V
for _, v := range storeMapList {
if snapshot := snapshotMap[jxutils.Combine2Int(v.StoreID, v.VendorID)]; snapshot != nil && v.Status != snapshot.Status {
v.Status = snapshot.Status
if _, err = dao.UpdateEntity(db, v, model.FieldStatus); err != nil {
v.DeliveryType = snapshot.DeliveryType
if _, err = dao.UpdateEntity(db, v, model.FieldStatus, "DeliveryType"); err != nil {
return err
}
}