1
This commit is contained in:
@@ -82,17 +82,14 @@ func CheckUserExist(store *dao.StoreDetail2) (string, error) {
|
|||||||
|
|
||||||
// 查询本门店所属省code
|
// 查询本门店所属省code
|
||||||
parentCityName := ""
|
parentCityName := ""
|
||||||
for {
|
if store.CityCode == 0 {
|
||||||
place, err := dao.GetPlaceByCode(dao.GetDB(), store.CityCode)
|
return "", errors.New("门店位置不能为空")
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
if place.Level != model.YES && place.ParentCode != 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
parentCityName = place.Name
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
parentCityName, err = GetCityCode(store.CityCode)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
// 查询企业微信所有省份部门分类
|
// 查询企业微信所有省份部门分类
|
||||||
departmentList, err := api.EnterpriseChatHeadApi.GetAllDepartmentList()
|
departmentList, err := api.EnterpriseChatHeadApi.GetAllDepartmentList()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -116,6 +113,17 @@ func CheckUserExist(store *dao.StoreDetail2) (string, error) {
|
|||||||
return enterpriseUserId, err
|
return enterpriseUserId, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetCityCode(cityCode int) (string, error) {
|
||||||
|
place, err := dao.GetPlaceByCode(dao.GetDB(), cityCode)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
if place.Level != model.YES && place.ParentCode != 0 {
|
||||||
|
GetCityCode(place.ParentCode)
|
||||||
|
}
|
||||||
|
return place.Name, nil
|
||||||
|
}
|
||||||
|
|
||||||
// 获取当前门店企业内部人员信息
|
// 获取当前门店企业内部人员信息
|
||||||
func CheckBoosGroupChat(store *dao.StoreDetail2) ([]string, error) {
|
func CheckBoosGroupChat(store *dao.StoreDetail2) ([]string, error) {
|
||||||
// 获取门店角色
|
// 获取门店角色
|
||||||
|
|||||||
Reference in New Issue
Block a user