feat:完善项目信息
This commit is contained in:
@ -17,7 +17,7 @@ type (
|
|||||||
api.TenantIDStringForm
|
api.TenantIDStringForm
|
||||||
api.ImageForm
|
api.ImageForm
|
||||||
Name string `json:"name" form:"name" binding:"required"`
|
Name string `json:"name" form:"name" binding:"required"`
|
||||||
Code string `json:"code" form:"code" binding:"required"`
|
Code string `json:"code" form:"code"`
|
||||||
Mobile string `json:"mobile" form:"mobile" binding:"required"`
|
Mobile string `json:"mobile" form:"mobile" binding:"required"`
|
||||||
config.Area
|
config.Area
|
||||||
Industrys []string `json:"industrys" form:"industrys"`
|
Industrys []string `json:"industrys" form:"industrys"`
|
||||||
|
|||||||
@ -91,7 +91,7 @@ func (c *Instance) Index(tenantID uint64, title, contact, contactMobile string,
|
|||||||
_industry := make([]string, 0)
|
_industry := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range v.GetIndustryAttribute() {
|
for _, v := range v.GetIndustryAttribute() {
|
||||||
_industry = append(_industry, config.GetIndustryInfo(v, "-", "/"))
|
_industry = append(_industry, config.GetIndustryInfo(v, "-", "/").Value)
|
||||||
}
|
}
|
||||||
list = append(list, &InstanceInfo{
|
list = append(list, &InstanceInfo{
|
||||||
ID: v.GetEncodeID(),
|
ID: v.GetEncodeID(),
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import (
|
|||||||
"SciencesServer/app/basic/controller"
|
"SciencesServer/app/basic/controller"
|
||||||
model2 "SciencesServer/app/common/model"
|
model2 "SciencesServer/app/common/model"
|
||||||
"SciencesServer/app/session"
|
"SciencesServer/app/session"
|
||||||
|
config2 "SciencesServer/config"
|
||||||
"errors"
|
"errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -26,12 +27,13 @@ type (
|
|||||||
}
|
}
|
||||||
// CompanyDetail 公司企业详细信息
|
// CompanyDetail 公司企业详细信息
|
||||||
CompanyDetail struct {
|
CompanyDetail struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
|
TenantID string `json:"tenant_id"`
|
||||||
*model2.ManageCompany
|
*model2.ManageCompany
|
||||||
Industrys []string `json:"industrys"`
|
Industrys []*config.Industry `json:"industrys"`
|
||||||
Keywords []string `json:"keywords"`
|
Keywords []string `json:"keywords"`
|
||||||
Directions []string `json:"directions"`
|
Directions []string `json:"directions"`
|
||||||
Area string `json:"area"`
|
Area string `json:"area"`
|
||||||
}
|
}
|
||||||
// CompanyParams 公司企业参数信息
|
// CompanyParams 公司企业参数信息
|
||||||
CompanyParams struct {
|
CompanyParams struct {
|
||||||
@ -72,7 +74,7 @@ func (c *Company) Instance(tenantID uint64, name string, status int, page, pageS
|
|||||||
_industrys := make([]string, 0)
|
_industrys := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range mManageCompany.GetIndustryAttribute() {
|
for _, v := range mManageCompany.GetIndustryAttribute() {
|
||||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/"))
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/").Value)
|
||||||
}
|
}
|
||||||
list = append(list, &CompanyInstance{
|
list = append(list, &CompanyInstance{
|
||||||
ID: v.GetEncodeID(), ManageCompanyInfo: v, Industrys: _industrys,
|
ID: v.GetEncodeID(), ManageCompanyInfo: v, Industrys: _industrys,
|
||||||
@ -157,10 +159,19 @@ func (c *Company) Detail(id uint64) (*CompanyDetail, error) {
|
|||||||
} else if out.ManageCompany == nil {
|
} else if out.ManageCompany == nil {
|
||||||
return nil, errors.New("操作错误,公司企业信息不存在或已被删除")
|
return nil, errors.New("操作错误,公司企业信息不存在或已被删除")
|
||||||
}
|
}
|
||||||
|
_industrys := make([]*config.Industry, 0)
|
||||||
|
|
||||||
|
for _, v := range out.GetIndustryAttribute() {
|
||||||
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", ">"))
|
||||||
|
}
|
||||||
|
out.Image.Image = out.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||||
|
out.License = (&model2.Image{Image: out.License}).Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||||
|
|
||||||
return &CompanyDetail{
|
return &CompanyDetail{
|
||||||
ID: out.GetEncodeID(),
|
ID: out.GetEncodeID(),
|
||||||
|
TenantID: out.GetEncodeTenantID(),
|
||||||
ManageCompany: out.ManageCompany,
|
ManageCompany: out.ManageCompany,
|
||||||
Industrys: out.GetIndustryAttribute(),
|
Industrys: _industrys,
|
||||||
Keywords: out.GetKeywordAttribute(),
|
Keywords: out.GetKeywordAttribute(),
|
||||||
Area: out.FormatBasic(),
|
Area: out.FormatBasic(),
|
||||||
}, nil
|
}, nil
|
||||||
|
|||||||
@ -16,7 +16,7 @@ func (this *ESParams) Set() {
|
|||||||
_identitys := make([]string, 0)
|
_identitys := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range this.Industrys {
|
for _, v := range this.Industrys {
|
||||||
_identitys = append(_identitys, config.GetIndustryInfo(v, "-", "-"))
|
_identitys = append(_identitys, config.GetIndustryInfo(v, "-", "-").Value)
|
||||||
}
|
}
|
||||||
_ = service.NewESManage(
|
_ = service.NewESManage(
|
||||||
service.WithManageIdentity(this.Identity),
|
service.WithManageIdentity(this.Identity),
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import (
|
|||||||
"SciencesServer/app/basic/controller"
|
"SciencesServer/app/basic/controller"
|
||||||
model2 "SciencesServer/app/common/model"
|
model2 "SciencesServer/app/common/model"
|
||||||
"SciencesServer/app/session"
|
"SciencesServer/app/session"
|
||||||
|
config2 "SciencesServer/config"
|
||||||
"SciencesServer/utils"
|
"SciencesServer/utils"
|
||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
@ -32,12 +33,13 @@ type (
|
|||||||
}
|
}
|
||||||
// ExpertDetail 专家详细信息
|
// ExpertDetail 专家详细信息
|
||||||
ExpertDetail struct {
|
ExpertDetail struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
|
TenantID string `json:"tenant_id"`
|
||||||
*model2.ManageExpert
|
*model2.ManageExpert
|
||||||
Industrys []string `json:"industrys"`
|
Industrys []*config.Industry `json:"industrys"`
|
||||||
Keywords []string `json:"keywords"`
|
Keywords []string `json:"keywords"`
|
||||||
Researchs []string `json:"researchs"`
|
Researchs []string `json:"researchs"`
|
||||||
Area string `json:"area"`
|
Area string `json:"area"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -72,7 +74,7 @@ func (c *Expert) Instance(tenantID uint64, name string, examineStatus int, page,
|
|||||||
_industrys := make([]string, 0)
|
_industrys := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range mManageExpert.GetIndustryAttribute() {
|
for _, v := range mManageExpert.GetIndustryAttribute() {
|
||||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/"))
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/").Value)
|
||||||
}
|
}
|
||||||
// 研究机构,实验室
|
// 研究机构,实验室
|
||||||
list = append(list, &ExpertInstance{ID: v.GetEncodeID(), Name: v.Name, Industrys: _industrys,
|
list = append(list, &ExpertInstance{ID: v.GetEncodeID(), Name: v.Name, Industrys: _industrys,
|
||||||
@ -97,13 +99,20 @@ func (c *Expert) Detail(id uint64) (*ExpertDetail, error) {
|
|||||||
} else if out.ManageExpert == nil {
|
} else if out.ManageExpert == nil {
|
||||||
return nil, errors.New("操作错误,专家信息不存在或已被删除")
|
return nil, errors.New("操作错误,专家信息不存在或已被删除")
|
||||||
}
|
}
|
||||||
|
_industrys := make([]*config.Industry, 0)
|
||||||
|
|
||||||
|
for _, v := range out.GetIndustryAttribute() {
|
||||||
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", ">"))
|
||||||
|
}
|
||||||
|
out.Image.Image = out.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||||
|
|
||||||
return &ExpertDetail{
|
return &ExpertDetail{
|
||||||
ID: out.GetEncodeID(),
|
ID: out.GetEncodeID(),
|
||||||
|
TenantID: out.GetEncodeTenantID(),
|
||||||
ManageExpert: out.ManageExpert,
|
ManageExpert: out.ManageExpert,
|
||||||
Industrys: out.GetIndustryAttribute(),
|
Industrys: _industrys,
|
||||||
Keywords: out.GetKeywordAttribute(),
|
Keywords: out.GetKeywordAttribute(),
|
||||||
Researchs: out.GetResearchAttribute(),
|
Researchs: out.GetResearchAttribute(),
|
||||||
Area: out.FormatBasic(),
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import (
|
|||||||
"SciencesServer/app/basic/controller"
|
"SciencesServer/app/basic/controller"
|
||||||
model2 "SciencesServer/app/common/model"
|
model2 "SciencesServer/app/common/model"
|
||||||
"SciencesServer/app/session"
|
"SciencesServer/app/session"
|
||||||
|
config2 "SciencesServer/config"
|
||||||
"errors"
|
"errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -33,10 +34,10 @@ type (
|
|||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
TenantID string `json:"tenant_id"`
|
TenantID string `json:"tenant_id"`
|
||||||
*model2.ManageLaboratory
|
*model2.ManageLaboratory
|
||||||
Industrys []string `json:"industrys"`
|
Industrys []*config.Industry `json:"industrys"`
|
||||||
Keywords []string `json:"keywords"`
|
Keywords []string `json:"keywords"`
|
||||||
Researchs []string `json:"researchs"`
|
Researchs []string `json:"researchs"`
|
||||||
Area string `json:"area"`
|
Area string `json:"area"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -186,14 +187,20 @@ func (c *Laboratory) Detail(id uint64) (*LaboratoryDetail, error) {
|
|||||||
} else if out.ManageLaboratory == nil {
|
} else if out.ManageLaboratory == nil {
|
||||||
return nil, errors.New("操作错误,实验室信息不存在或已被删除")
|
return nil, errors.New("操作错误,实验室信息不存在或已被删除")
|
||||||
}
|
}
|
||||||
|
_industrys := make([]*config.Industry, 0)
|
||||||
|
|
||||||
|
for _, v := range out.GetIndustryAttribute() {
|
||||||
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", ">"))
|
||||||
|
}
|
||||||
|
out.Image.Image = out.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||||
|
|
||||||
return &LaboratoryDetail{
|
return &LaboratoryDetail{
|
||||||
ID: out.GetEncodeID(),
|
ID: out.GetEncodeID(),
|
||||||
TenantID: out.GetEncodeTenantID(),
|
TenantID: out.GetEncodeTenantID(),
|
||||||
ManageLaboratory: out.ManageLaboratory,
|
ManageLaboratory: out.ManageLaboratory,
|
||||||
Industrys: out.GetIndustryAttribute(),
|
Industrys: _industrys,
|
||||||
Keywords: out.GetKeywordAttribute(),
|
Keywords: out.GetKeywordAttribute(),
|
||||||
Researchs: out.GetResearchAttribute(),
|
Researchs: out.GetResearchAttribute(),
|
||||||
Area: out.FormatBasic(),
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import (
|
|||||||
"SciencesServer/app/basic/controller"
|
"SciencesServer/app/basic/controller"
|
||||||
model2 "SciencesServer/app/common/model"
|
model2 "SciencesServer/app/common/model"
|
||||||
"SciencesServer/app/session"
|
"SciencesServer/app/session"
|
||||||
|
config2 "SciencesServer/config"
|
||||||
"errors"
|
"errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -34,7 +35,9 @@ type (
|
|||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
TenantID string `json:"tenant_id"`
|
TenantID string `json:"tenant_id"`
|
||||||
*model2.ManageResearch
|
*model2.ManageResearch
|
||||||
Area string `json:"area"`
|
Industrys []*config.Industry `json:"industrys"`
|
||||||
|
Keywords []string `json:"keywords"`
|
||||||
|
Researchs []string `json:"researchs"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -172,9 +175,18 @@ func (c *Research) Detail(id uint64) (*ResearchDetail, error) {
|
|||||||
} else if out.ManageResearch == nil {
|
} else if out.ManageResearch == nil {
|
||||||
return nil, errors.New("操作错误,科研机构信息不存在或已被删除")
|
return nil, errors.New("操作错误,科研机构信息不存在或已被删除")
|
||||||
}
|
}
|
||||||
|
_industrys := make([]*config.Industry, 0)
|
||||||
|
|
||||||
|
for _, v := range out.GetIndustryAttribute() {
|
||||||
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", ">"))
|
||||||
|
}
|
||||||
|
out.Image.Image = out.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||||
|
out.License = (&model2.Image{Image: out.License}).Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||||
|
|
||||||
return &ResearchDetail{
|
return &ResearchDetail{
|
||||||
ID: out.GetEncodeID(), TenantID: out.GetEncodeTenantID(),
|
ID: out.GetEncodeID(), TenantID: out.GetEncodeTenantID(),
|
||||||
ManageResearch: out.ManageResearch, Area: out.FormatBasic(),
|
ManageResearch: out.ManageResearch, Industrys: _industrys,
|
||||||
|
Keywords: out.GetKeywordAttribute(), Researchs: out.GetResearchAttribute(),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ func (c *Patent) ipcTree(src []*model2.SysPatentClassify, parentID uint64) []*Pa
|
|||||||
industrysTitle := make([]string, 0)
|
industrysTitle := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range industrys {
|
for _, v := range industrys {
|
||||||
industrysTitle = append(industrysTitle, config.GetIndustryInfo(v, "-", "/"))
|
industrysTitle = append(industrysTitle, config.GetIndustryInfo(v, "-", "/").Value)
|
||||||
}
|
}
|
||||||
out = append(out, &PatentIPCInfo{
|
out = append(out, &PatentIPCInfo{
|
||||||
ID: v.GetEncodeID(),
|
ID: v.GetEncodeID(),
|
||||||
|
|||||||
@ -36,7 +36,7 @@ type (
|
|||||||
// Company 公司企业信息
|
// Company 公司企业信息
|
||||||
func (m *ManageCompany) Company(id uint64) (*ManageCompanyDetail, error) {
|
func (m *ManageCompany) Company(id uint64) (*ManageCompanyDetail, error) {
|
||||||
db := orm.GetDB().Table(m.TableName()+" AS c").
|
db := orm.GetDB().Table(m.TableName()+" AS c").
|
||||||
Select("c.*", "t.province", "t.city").
|
Select("c.*").
|
||||||
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON c.tenant_id = t.id", model.NewSysTenant().TableName())).
|
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON c.tenant_id = t.id", model.NewSysTenant().TableName())).
|
||||||
Where("c.id = ?", id)
|
Where("c.id = ?", id)
|
||||||
|
|
||||||
|
|||||||
@ -24,14 +24,15 @@ type (
|
|||||||
// ManageExpertDetail 专家信息
|
// ManageExpertDetail 专家信息
|
||||||
ManageExpertDetail struct {
|
ManageExpertDetail struct {
|
||||||
*model.ManageExpert
|
*model.ManageExpert
|
||||||
model.Area
|
TenantProvince string `json:"-"`
|
||||||
|
TenantCity string `json:"-"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// Expert 专家信息
|
// Expert 专家信息
|
||||||
func (m *ManageExpert) Expert(id uint64) (*ManageExpertDetail, error) {
|
func (m *ManageExpert) Expert(id uint64) (*ManageExpertDetail, error) {
|
||||||
db := orm.GetDB().Table(m.TableName()+" AS e").
|
db := orm.GetDB().Table(m.TableName()+" AS e").
|
||||||
Select("e.*", "t.province", "t.city").
|
Select("e.*").
|
||||||
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON e.tenant_id = t.id", model.NewSysTenant().TableName())).
|
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON e.tenant_id = t.id", model.NewSysTenant().TableName())).
|
||||||
Where("e.id = ?", id)
|
Where("e.id = ?", id)
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ type (
|
|||||||
// Laboratory 实验室信息
|
// Laboratory 实验室信息
|
||||||
func (m *ManageLaboratory) Laboratory(id uint64) (*ManageLaboratoryDetail, error) {
|
func (m *ManageLaboratory) Laboratory(id uint64) (*ManageLaboratoryDetail, error) {
|
||||||
db := orm.GetDB().Table(m.TableName()+" AS l").
|
db := orm.GetDB().Table(m.TableName()+" AS l").
|
||||||
Select("l.*", "t.province", "t.city").
|
Select("l.*").
|
||||||
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON l.tenant_id = t.id", model.NewSysTenant().TableName())).
|
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON l.tenant_id = t.id", model.NewSysTenant().TableName())).
|
||||||
Where("l.id = ?", id)
|
Where("l.id = ?", id)
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ type (
|
|||||||
// Research 科研机构信息
|
// Research 科研机构信息
|
||||||
func (m *ManageResearch) Research(id uint64) (*ManageResearchDetail, error) {
|
func (m *ManageResearch) Research(id uint64) (*ManageResearchDetail, error) {
|
||||||
db := orm.GetDB().Table(m.TableName()+" AS r").
|
db := orm.GetDB().Table(m.TableName()+" AS r").
|
||||||
Select("r.*", "t.province", "t.city").
|
Select("r.*").
|
||||||
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON r.tenant_id = t.id", model.NewSysTenant().TableName())).
|
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON r.tenant_id = t.id", model.NewSysTenant().TableName())).
|
||||||
Where("r.id = ?", id)
|
Where("r.id = ?", id)
|
||||||
|
|
||||||
|
|||||||
@ -107,7 +107,7 @@ func (c *Activity) Detail(id uint64) (*ActivityDetail, error) {
|
|||||||
industrys := make([]string, 0)
|
industrys := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range out.GetIndustryAttribute() {
|
for _, v := range out.GetIndustryAttribute() {
|
||||||
industrys = append(industrys, config2.GetIndustryInfo(v, "-", "-"))
|
industrys = append(industrys, config2.GetIndustryInfo(v, "-", "-").Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
return &ActivityDetail{
|
return &ActivityDetail{
|
||||||
|
|||||||
@ -54,7 +54,7 @@ func achievementSearch(page, pageSize int, keyword, industry string, params map[
|
|||||||
_industrys := make([]string, 0)
|
_industrys := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range v.GetIndustryAttribute() {
|
for _, v := range v.GetIndustryAttribute() {
|
||||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/"))
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/").Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
v.Image.Image = v.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
v.Image.Image = v.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||||
|
|||||||
@ -60,7 +60,7 @@ func searchCompany(page, pageSize int, keyword, industry string, params map[stri
|
|||||||
_industrys := make([]string, 0)
|
_industrys := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range v.GetIndustryAttribute() {
|
for _, v := range v.GetIndustryAttribute() {
|
||||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/"))
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/").Value)
|
||||||
}
|
}
|
||||||
list = append(list, &CompanyInfo{
|
list = append(list, &CompanyInfo{
|
||||||
ID: v.GetEncodeID(), Kind: v.Kind, Name: v.Name,
|
ID: v.GetEncodeID(), Kind: v.Kind, Name: v.Name,
|
||||||
|
|||||||
@ -56,7 +56,7 @@ func searchExpert(page, pageSize int, keyword, industry string, params map[strin
|
|||||||
_industrys := make([]string, 0)
|
_industrys := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range v.GetIndustryAttribute() {
|
for _, v := range v.GetIndustryAttribute() {
|
||||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/"))
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/").Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
v.Image.Image = v.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
v.Image.Image = v.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||||
|
|||||||
@ -56,7 +56,7 @@ func searchLaboratory(page, pageSize int, keyword, industry string, params map[s
|
|||||||
_industrys := make([]string, 0)
|
_industrys := make([]string, 0)
|
||||||
|
|
||||||
for _, v := range v.GetIndustryAttribute() {
|
for _, v := range v.GetIndustryAttribute() {
|
||||||
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/"))
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/").Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
v.Image.Image = v.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
v.Image.Image = v.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
||||||
|
|||||||
@ -18,8 +18,14 @@ var (
|
|||||||
MemoryForIndustryInfo map[string]string = make(map[string]string, 0)
|
MemoryForIndustryInfo map[string]string = make(map[string]string, 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Industry 行业信息
|
||||||
|
type Industry struct {
|
||||||
|
Key string `json:"key"`
|
||||||
|
Value string `json:"value"`
|
||||||
|
}
|
||||||
|
|
||||||
// GetIndustryInfo 获取行业信息
|
// GetIndustryInfo 获取行业信息
|
||||||
func GetIndustryInfo(industry, mark, sep string) string {
|
func GetIndustryInfo(industry, mark, sep string) *Industry {
|
||||||
obj := strings.Split(industry, mark)
|
obj := strings.Split(industry, mark)
|
||||||
out := make([]string, 0)
|
out := make([]string, 0)
|
||||||
|
|
||||||
@ -31,5 +37,9 @@ func GetIndustryInfo(industry, mark, sep string) string {
|
|||||||
}
|
}
|
||||||
out = append(out, data)
|
out = append(out, data)
|
||||||
}
|
}
|
||||||
return strings.Join(out, sep)
|
//return strings.Join(out, sep)
|
||||||
|
return &Industry{
|
||||||
|
Key: industry,
|
||||||
|
Value: strings.Join(out, sep),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user