浏览代码

Merge branch 'dev/v1.2.7_dx' of SocialPlatform/messageCenter into feature/v1.2.7

duxin 2 年之前
父节点
当前提交
488fd17cda
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      service/chat_group.go

+ 3 - 0
service/chat_group.go

@@ -14,6 +14,9 @@ func EntPerson(entId int64, isAll bool) (map[string]string, map[string]string, m
 	phoneData := map[string]string{}
 	nameData := map[string]string{}
 	positionData := map[int]string{}
+	if entId == 0 { //个人身份 企业查询默认为nil
+		return phoneData, nameData, positionData
+	}
 	//在职人员查询
 	personList := IC.MainMysql.SelectBySql(fmt.Sprintf(`SELECT a.phone,IF(a.name = "我" AND b.role_id = 1 ,"%s",a.name)  AS name,b.role_id FROM %s a
 					LEFT JOIN entniche_user_role b on a.id = b.user_id