Merge branch 'ai/0.4.0/tag' into test

# Conflicts:
#	internal/service/siteinfo/siteinfo_service.go
#	internal/service/siteinfo_common/siteinfo_service.go
This commit is contained in:
LinkinStar 2022-11-21 11:27:28 +08:00
commit 17dd8e8930
1 changed files with 6 additions and 0 deletions

View File

@ -82,6 +82,9 @@ func (ts *TagCommonService) SearchTagLike(ctx context.Context, req *schema.Searc
func (ts *TagCommonService) GetSiteWriteRecommendTag(ctx context.Context) (tags []string, err error) {
tags = make([]string, 0)
list, err := ts.tagCommonRepo.GetRecommendTagList(ctx)
if err != nil {
return tags, err
}
for _, item := range list {
tags = append(tags, item.SlugName)
}
@ -124,6 +127,9 @@ func (ts *TagCommonService) SetSiteWriteTag(ctx context.Context, recommendTags,
func (ts *TagCommonService) GetSiteWriteReservedTag(ctx context.Context) (tags []string, err error) {
tags = make([]string, 0)
list, err := ts.tagCommonRepo.GetReservedTagList(ctx)
if err != nil {
return tags, err
}
for _, item := range list {
tags = append(tags, item.SlugName)
}