feat:优化项目信息
This commit is contained in:
@ -204,18 +204,16 @@ func (c *Patent) List(kind int, title, applyCode, openCode, ipcCode string, page
|
||||
// 查询当前用户对应的专家信息
|
||||
mUserExpert := model.NewUserExpert()
|
||||
|
||||
isExist, err := model2.LastWhere(mUserExpert.UserExpert, []string{"id", "expert_id"},
|
||||
model2.NewWhere("uid", c.UID),
|
||||
model2.NewWhere("invalid_status", model2.InvalidStatusForNot),
|
||||
)
|
||||
expert, err := mUserExpert.ExpertBasic(c.UID)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !isExist {
|
||||
return nil, nil
|
||||
} else if expert.UserExpertID <= 0 {
|
||||
return &controller.ReturnPages{}, nil
|
||||
}
|
||||
mTechnologyPatentExpert := model.NewTechnologyPatentExpert()
|
||||
|
||||
where := []*model2.ModelWhere{model2.NewWhere("u.expert_id", mUserExpert.ExpertID)}
|
||||
where := []*model2.ModelWhere{model2.NewWhereFindInSet("p.inventor", expert.Name)}
|
||||
|
||||
if kind <= 0 {
|
||||
where = append(where, model2.NewWhere("p.kind", kind))
|
||||
|
Reference in New Issue
Block a user