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 manage
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"
@ -103,7 +104,7 @@ func laboratory(ids []uint64) (interface{}, error) {
return out, nil
}
func (c *Search) Launch(identity int, param, industry string, page, pageSize int) (interface{}, error) {
func (c *Search) Launch(identity int, param, industry string, page, pageSize int) (*controller.ReturnPages, error) {
manage := service.NewESManage(
service.WithManageIdentity(identity),
service.WithManageTitle(param),
@ -111,7 +112,7 @@ func (c *Search) Launch(identity int, param, industry string, page, pageSize int
service.WithManageKeyword(param),
service.WithManageResearch(param),
)
out, err := manage.Search(page, pageSize, nil)
out, count, err := manage.Search(page, pageSize, nil)
if err != nil {
return nil, err
@ -129,7 +130,12 @@ func (c *Search) Launch(identity int, param, industry string, page, pageSize int
if !has {
return nil, errors.New("操作错误,未知的身份信息")
}
return handle(ids)
var data interface{}
if data, err = handle(ids); err != nil {
return nil, err
}
return &controller.ReturnPages{Data: data, Count: count}, nil
}
func NewSearch() SearchHandle {