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
}
@@ -532,6 +549,7 @@ func GetMyStoreListNew(ctx *jxcontext.Context, version string) (storesInfo inter
"tel2": v.Tel2,
"payeeName": v.PayeeName,
"status": v.Status,
"vendorStoreList": v.VendorStore,
}
}
storesInfo = mapDataList

View File

@@ -12,6 +12,7 @@ import (
type StoreWithCityName struct {
model.Store
CityName string `json:"cityName"`
VendorStore []StoreMapList `json:"vendorStore"`
}
type UserDeliveryAddressEx struct {
@@ -23,6 +24,13 @@ type UserDeliveryAddressEx struct {
ParentCode int `json:"parentCode"`
}
type StoreMapList struct {
JxStoreId int `json:"jx_store_id"`
VendorStoreId string `json:"vendor_store_id"`
VendorId int `json:"vendor_id"`
VendorOrgCode string `json:"vendor_org_code"`
}
type GetSelfInfoResult struct {
model.User
UserMembers []*model.UserMember `json:"userMembers"`