This commit is contained in:
邹宗楠
2022-05-25 18:35:40 +08:00
parent 31754a6353
commit 48e8919377

View File

@@ -117,15 +117,18 @@ func CheckUserExist(store *dao.StoreDetail2) (string, error) {
} }
func GetCityCode(cityCode int) (string, error) { func GetCityCode(cityCode int) (string, error) {
for i := 0; i < 4; i++ {
place, err := dao.GetPlaceByCode(dao.GetDB(), cityCode) place, err := dao.GetPlaceByCode(dao.GetDB(), cityCode)
if err != nil { if err != nil {
return "", err return "", err
} }
if place.Level != model.YES && place.ParentCode != 0 { if place.Level == model.YES && place.ParentCode == 0 {
GetCityCode(place.ParentCode)
}
return place.Name, nil return place.Name, nil
} }
cityCode = place.ParentCode
}
return "", errors.New("未查询到目标城市")
}
// 获取当前门店企业内部人员信息 // 获取当前门店企业内部人员信息
func CheckBoosGroupChat(store *dao.StoreDetail2) ([]string, error) { func CheckBoosGroupChat(store *dao.StoreDetail2) ([]string, error) {