feat:优化项目信息
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user