StoreSkuExt中添加VendorInfoMap,将所有平台相关的信息移入到这里
This commit is contained in:
@@ -256,6 +256,22 @@ func GetStoresMapList(db *DaoDB, vendorIDs, storeIDs []int, status, isSync int,
|
||||
return GetStoresMapList2(db, vendorIDs, storeIDs, status, isSync, pricePack, false)
|
||||
}
|
||||
|
||||
func StoreMapList2Map(storeMapList []*model.StoreMap) (storeMapMap map[int][]*model.StoreMap) {
|
||||
storeMapMap = make(map[int][]*model.StoreMap)
|
||||
for _, v := range storeMapList {
|
||||
storeMapMap[v.StoreID] = append(storeMapMap[v.StoreID], v)
|
||||
}
|
||||
return storeMapMap
|
||||
}
|
||||
|
||||
func StoreCourierList2Map(storeCourierList []*model.StoreCourierMap) (storeCourierMap map[int][]*model.StoreCourierMap) {
|
||||
storeCourierMap = make(map[int][]*model.StoreCourierMap)
|
||||
for _, v := range storeCourierList {
|
||||
storeCourierMap[v.StoreID] = append(storeCourierMap[v.StoreID], v)
|
||||
}
|
||||
return storeCourierMap
|
||||
}
|
||||
|
||||
// 此函数在检测到一个门店的所有平台状态一样,且不为StoreStatusOpened时,
|
||||
// 将平台门店状态全部改为StoreStatusOpened,则把京西门店状态改为之前那个统一的平台门店状态
|
||||
func FormalizeStoreStatus(db *DaoDB, storeID, storeStatus int) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user