feat:优化项目信息

This commit is contained in:
henry
2022-02-09 18:38:32 +08:00
parent 56e8243724
commit 957a4436a8
12 changed files with 134 additions and 119 deletions

View File

@ -33,7 +33,7 @@ type (
// PatentInfo 专利信息
PatentInfo struct {
ID string `json:"id"`
*model.UserPatentInfo
*model.TechnologyPatentExpertInfo
}
// PaperInfo 论文信息
PaperInfo struct {
@ -122,11 +122,12 @@ func project(uids []uint64, page, pageSize int) (*controller.ReturnPages, error)
// patent 专利信息
func patent(uids []uint64, page, pageSize int) (*controller.ReturnPages, error) {
mUserPatent := model.NewUserPatent()
// 查询用户的专利信息
mTechnologyPatentExpert := model.NewTechnologyPatentExpert()
var count int64
out, err := mUserPatent.Patents(uids, page, pageSize, &count)
out, err := mTechnologyPatentExpert.Patents(uids, page, pageSize, &count)
if err != nil {
return nil, err
@ -135,7 +136,7 @@ func patent(uids []uint64, page, pageSize int) (*controller.ReturnPages, error)
for _, v := range out {
list = append(list, &PatentInfo{
ID: v.GetEncodeID(), UserPatentInfo: v,
ID: v.GetEncodeID(), TechnologyPatentExpertInfo: v,
})
}
return &controller.ReturnPages{Data: list, Count: count}, nil