package common import ( "context" "fmt" "github.com/zeromicro/go-zero/core/logx" ) //人脉通公用方法 var NetworkCom = &networkCom{} type networkCom struct{} //根据标签类型获取标签占位 func (n *networkCom) GetEntTagSeat(labelType int) []string { rows, err := ClickhouseConn.Query(context.Background(), `select bitmap_num from information.ent_label where label_type=?`, labelType) if err != nil { logx.Error(err) return nil } array := []string{} for rows.Next() { var ( bitmap_num int8 ) if err := rows.Scan(&bitmap_num); err != nil { logx.Error(err) continue } array = append(array, fmt.Sprint(bitmap_num)) } rows.Close() if err := rows.Err(); err != nil { logx.Error(err) } return array }