Files

29 lines
627 B
Go
Raw Normal View History

2021-11-01 11:19:49 +08:00
package config
import "strings"
type (
// MemoryForIndustry 行业
MemoryForIndustry struct {
2021-12-07 16:10:12 +08:00
Code string `json:"code"`
Name string `json:"name"`
Children []*MemoryForIndustry `json:"children"`
2021-11-01 11:19:49 +08:00
}
)
var (
// MemoryForIndustryInfo 行业信息
2021-12-07 16:10:12 +08:00
MemoryForIndustryInfo map[string]string = make(map[string]string, 0)
2021-11-01 11:19:49 +08:00
)
// GetIndustryInfo 获取行业信息
func GetIndustryInfo(industry, mark string) string {
obj := strings.Split(industry, mark)
out := make([]string, 0)
for _, v := range obj {
2021-12-07 16:10:12 +08:00
out = append(out, MemoryForIndustryInfo[v])
2021-11-01 11:19:49 +08:00
}
return strings.Join(out, "-")
}