feat:优化项目信息
This commit is contained in:
@ -65,7 +65,7 @@ func (c *Expert) Instance(id uint64) (*ExpertInstanceInfo, error) {
|
||||
if out.PatentTitle != "" {
|
||||
for _, val := range strings.Split(out.PatentTitle, "&&") {
|
||||
objs := strings.Split(val, "$$")
|
||||
mTechnologyPatent.Kind = model2.SysParentKind(utils.StringToInt(objs[0]))
|
||||
mTechnologyPatent.Kind = model2.TechnologyPatentKind(utils.StringToInt(objs[0]))
|
||||
patentTitles = append(patentTitles, fmt.Sprintf("【%s】%s", mTechnologyPatent.KindTitle(), objs[1]))
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ func searchExpert(page, pageSize int, keyword, industry string, params map[strin
|
||||
if v.PatentTitle != "" {
|
||||
for _, val := range strings.Split(v.PatentTitle, "&&") {
|
||||
objs := strings.Split(val, "$$")
|
||||
mTechnologyPatent.Kind = model2.SysParentKind(utils.StringToInt(objs[0]))
|
||||
mTechnologyPatent.Kind = model2.TechnologyPatentKind(utils.StringToInt(objs[0]))
|
||||
patentTitles = append(patentTitles, fmt.Sprintf("【%s】%s", mTechnologyPatent.KindTitle(), objs[1]))
|
||||
}
|
||||
}
|
||||
|
@ -10,11 +10,11 @@ import (
|
||||
type (
|
||||
// PatentInfo 专利信息
|
||||
PatentInfo struct {
|
||||
ID string `json:"id"`
|
||||
Kind model2.SysParentKind `json:"kind"`
|
||||
Title string `json:"title"`
|
||||
ApplyAt string `json:"apply_at"`
|
||||
Description string `json:"description"`
|
||||
ID string `json:"id"`
|
||||
Kind model2.TechnologyPatentKind `json:"kind"`
|
||||
Title string `json:"title"`
|
||||
ApplyAt string `json:"apply_at"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
)
|
||||
|
||||
@ -42,7 +42,7 @@ func searchPatent(page, pageSize int, keyword, industry string, params map[strin
|
||||
}
|
||||
mTechnologyPatent := model.NewTechnologyPatent()
|
||||
|
||||
patents := make([]*model2.SysPatent, 0)
|
||||
patents := make([]*model2.TechnologyPatent, 0)
|
||||
|
||||
if err = model2.ScanFields(mTechnologyPatent.TechnologyPatent, &patents, []string{"id", "kind", "title", "apply_at", "description"},
|
||||
&model2.ModelWhereOrder{Where: model2.NewWhereIn("id", ids)}); err != nil {
|
||||
|
Reference in New Issue
Block a user