1
This commit is contained in:
@@ -500,6 +500,23 @@ func GetStoreList4User(ctx *jxcontext.Context, mobileNum, userID string) (storeL
|
|||||||
|
|
||||||
storeList, err = dao.GetStoreListByMobileOrStoreIDs(dao.GetDB(), mobileNum, shortRoleNameList, storeIDs)
|
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
|
return storeList, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -532,6 +549,7 @@ func GetMyStoreListNew(ctx *jxcontext.Context, version string) (storesInfo inter
|
|||||||
"tel2": v.Tel2,
|
"tel2": v.Tel2,
|
||||||
"payeeName": v.PayeeName,
|
"payeeName": v.PayeeName,
|
||||||
"status": v.Status,
|
"status": v.Status,
|
||||||
|
"vendorStoreList": v.VendorStore,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
storesInfo = mapDataList
|
storesInfo = mapDataList
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import (
|
|||||||
type StoreWithCityName struct {
|
type StoreWithCityName struct {
|
||||||
model.Store
|
model.Store
|
||||||
CityName string `json:"cityName"`
|
CityName string `json:"cityName"`
|
||||||
|
VendorStore []StoreMapList `json:"vendorStore"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserDeliveryAddressEx struct {
|
type UserDeliveryAddressEx struct {
|
||||||
@@ -23,6 +24,13 @@ type UserDeliveryAddressEx struct {
|
|||||||
ParentCode int `json:"parentCode"`
|
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 {
|
type GetSelfInfoResult struct {
|
||||||
model.User
|
model.User
|
||||||
UserMembers []*model.UserMember `json:"userMembers"`
|
UserMembers []*model.UserMember `json:"userMembers"`
|
||||||
|
|||||||
Reference in New Issue
Block a user