feat:完善项目
This commit is contained in:
28
app/api/admin/controller/manage/es.go
Normal file
28
app/api/admin/controller/manage/es.go
Normal file
@ -0,0 +1,28 @@
|
||||
package manage
|
||||
|
||||
import (
|
||||
"SciencesServer/app/basic/config"
|
||||
"SciencesServer/app/service"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type ESParams struct {
|
||||
Identity int
|
||||
Name string
|
||||
Keywords, Industrys, Researchs []string
|
||||
}
|
||||
|
||||
func (this *ESParams) Set() {
|
||||
_identitys := make([]string, 0)
|
||||
|
||||
for _, v := range this.Industrys {
|
||||
_identitys = append(_identitys, config.GetIndustryInfo(v, "-", "-"))
|
||||
}
|
||||
_ = service.NewESManage(
|
||||
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()
|
||||
}
|
Reference in New Issue
Block a user