feat:完善项目信息

This commit is contained in:
henry
2022-01-20 11:51:02 +08:00
parent 9348c8970c
commit b87cd837be
23 changed files with 86 additions and 83 deletions

View File

@ -193,7 +193,7 @@ func (c *Patent) List(kind int, title, applyCode, openCode, ipcCode string, page
}
// Match 搜索信息
func (c *Patent) Match(title string, industrys, keywords []string) ([]*PatentMatchInfo, error) {
func (c *Patent) Match(title string, industrys, keywords []string) (*controller.ReturnPages, error) {
params := strings.Join([]string{
title, strings.Join(industrys, ","), strings.Join(keywords, ","),
}, ",")
@ -201,7 +201,7 @@ func (c *Patent) Match(title string, industrys, keywords []string) ([]*PatentMat
service.WithPatentTitle(params),
service.WithPatentIndustry(params),
)
out, err := patent.Search(0, 0)
out, count, err := patent.Search(0, 0)
if err != nil {
return nil, err
@ -229,7 +229,7 @@ func (c *Patent) Match(title string, industrys, keywords []string) ([]*PatentMat
ID: v.GetEncodeID(), Title: v.Title, Description: v.Description, ApplyAt: v.ApplyAt,
})
}
return list, nil
return &controller.ReturnPages{Data: list, Count: count}, nil
}
// Detail 详细信息