1
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user