feat:完善信息
This commit is contained in:
@ -3,10 +3,12 @@ package manage
|
||||
import (
|
||||
"SciencesServer/app/basic/config"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/serve/logger"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type ESParams struct {
|
||||
ID uint64
|
||||
Identity int
|
||||
Name string
|
||||
Keywords, Industrys, Researchs []string
|
||||
@ -18,11 +20,18 @@ func (this *ESParams) Set() {
|
||||
for _, v := range this.Industrys {
|
||||
_identitys = append(_identitys, config.GetIndustryInfo(v, "-", "-").Value)
|
||||
}
|
||||
_ = service.NewESManage(
|
||||
//fmt.Println(utils.AnyToJSON(this))
|
||||
//fmt.Println(this.Identity)
|
||||
err := service.NewESManage(
|
||||
service.WithManageID(this.ID),
|
||||
service.WithManageIdentity(this.Identity),
|
||||
service.WithManageTitle(this.Name),
|
||||
service.WithManageIndustry(strings.Join(_identitys, ";")),
|
||||
service.WithManageKeyword(strings.Join(this.Keywords, ";")),
|
||||
service.WithManageResearch(strings.Join(this.Researchs, ";")),
|
||||
).Create()
|
||||
|
||||
if err != nil {
|
||||
logger.ErrorF("ES 身份信息【%d】存储错误【%s】", this.Identity, err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user