This commit is contained in:
邹宗楠
2026-01-26 13:33:32 +08:00
parent 09e9c310b4
commit 175dc47c60
2 changed files with 35 additions and 9 deletions

View File

@@ -500,6 +500,23 @@ func GetStoreList4User(ctx *jxcontext.Context, mobileNum, userID string) (storeL
storeList, err = dao.GetStoreListByMobileOrStoreIDs(dao.GetDB(), mobileNum, shortRoleNameList, storeIDs)
storeMap, _ := dao.GetStoresMapList(dao.GetDB(), nil, storeIDs, nil, -9, -1, "", "", "")
mapList := make(map[int][]dao.StoreMapList, len(storeMap))
if len(storeMap) != 0 {
for i := 0; i < len(storeMap); i++ {
mapList[storeMap[i].StoreID] = append(mapList[storeMap[i].StoreID], dao.StoreMapList{
JxStoreId: storeMap[i].StoreID,
VendorStoreId: storeMap[i].VendorStoreID,
VendorId: storeMap[i].VendorID,
VendorOrgCode: storeMap[i].VendorOrgCode,
})
}
}
for _, v := range storeList {
v.VendorStore = mapList[v.ID]
}
return storeList, err
}
@@ -524,14 +541,15 @@ func GetMyStoreListNew(ctx *jxcontext.Context, version string) (storesInfo inter
mapDataList := make([]map[string]interface{}, len(storeList))
for k, v := range storeList {
mapDataList[k] = map[string]interface{}{
"id": v.ID,
"address": v.Address,
"cityName": v.CityName,
"name": v.Name,
"tel1": v.Tel1,
"tel2": v.Tel2,
"payeeName": v.PayeeName,
"status": v.Status,
"id": v.ID,
"address": v.Address,
"cityName": v.CityName,
"name": v.Name,
"tel1": v.Tel1,
"tel2": v.Tel2,
"payeeName": v.PayeeName,
"status": v.Status,
"vendorStoreList": v.VendorStore,
}
}
storesInfo = mapDataList