Files
2022-01-15 16:48:49 +08:00

29 lines
738 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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()
}