You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
781 B
32 lines
781 B
package dao |
|
|
|
import ( |
|
"context" |
|
"encoding/json" |
|
|
|
"go-common/app/service/live/resource/api/grpc/v1" |
|
"go-common/library/log" |
|
) |
|
|
|
//TitansTeam 话题team值 |
|
const TitansTeam = 40 |
|
|
|
//TitansKeyword 话题标签值 |
|
const TitansKeyword = "topic" |
|
|
|
//GetTopicList 获取话题列表 |
|
func (d *Dao) GetTopicList(c context.Context) (resp []string, err error) { |
|
reply, err := d.titansCli.GetConfigByKeyword(c, &v1.GetConfigReq{Team: TitansTeam, Keyword: TitansKeyword}) |
|
if err != nil { |
|
log.Error("main_member_GetIdentityStatus_error:%v", err) |
|
return |
|
} |
|
log.Info("main_member_GetIdentityStatus:%v", reply) |
|
resp = make([]string, 0) |
|
e := json.Unmarshal([]byte(reply.Value), &resp) |
|
if e != nil { |
|
log.Error("GetTopicList_json_error:%v,res=%v,", e, reply.Value) |
|
return |
|
} |
|
return |
|
}
|
|
|