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

@ -3,6 +3,7 @@ package search
import (
"SciencesServer/app/api/website/model"
"SciencesServer/app/basic/config"
"SciencesServer/app/basic/controller"
model2 "SciencesServer/app/common/model"
"SciencesServer/app/service"
config2 "SciencesServer/config"
@ -18,7 +19,7 @@ type (
}
)
func achievementSearch(page, pageSize int, keyword, industry string, params map[string]interface{}) (interface{}, error) {
func achievementSearch(page, pageSize int, keyword, industry string, params map[string]interface{}) (*controller.ReturnPages, error) {
manage := service.NewESAchievement(
service.WithAchievementTitle(keyword),
service.WithAchievementKeyword(keyword),
@ -26,7 +27,7 @@ func achievementSearch(page, pageSize int, keyword, industry string, params map[
if industry != "" {
service.WithAchievementIndustry(keyword)(manage)
}
out, err := manage.Search(page, pageSize)
out, count, err := manage.Search(page, pageSize)
if err != nil {
return nil, err
@ -65,5 +66,5 @@ func achievementSearch(page, pageSize int, keyword, industry string, params map[
Industrys: _industrys, Keywords: v.GetKeywordAttribute(),
})
}
return list, nil
return &controller.ReturnPages{Data: list, Count: count}, nil
}