feat:完善项目
This commit is contained in:
@ -18,8 +18,10 @@ type Examine struct {
|
||||
type ExamineHandle func(session *session.Admin) *Examine
|
||||
|
||||
type ExamineManageInfo struct {
|
||||
IModel model2.IModel
|
||||
UIDs []uint64 // 用户表UUID
|
||||
IModel model2.IModel
|
||||
UIDs []uint64 // 用户表UUID
|
||||
Name string
|
||||
Keywords, Industrys, Researchs []string
|
||||
}
|
||||
|
||||
// examineHandle 审核处理
|
||||
@ -60,7 +62,9 @@ func examineCompany(id, tenantID uint64) (*ExamineManageInfo, error) {
|
||||
model2.NewWhere("invalid_status", model2.InvalidStatusForNot)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ExamineManageInfo{IModel: mManageCompany.ManageCompany, UIDs: uids}, nil
|
||||
return &ExamineManageInfo{IModel: mManageCompany.ManageCompany, UIDs: uids,
|
||||
Name: mManageCompany.Name, Industrys: mManageCompany.GetIndustryAttribute(),
|
||||
Keywords: mManageCompany.GetKeywordAttribute()}, nil
|
||||
}
|
||||
|
||||
func examineExpert(id, tenantID uint64) (*ExamineManageInfo, error) {
|
||||
@ -82,7 +86,9 @@ func examineExpert(id, tenantID uint64) (*ExamineManageInfo, error) {
|
||||
model2.NewWhere("invalid_status", model2.InvalidStatusForNot)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ExamineManageInfo{IModel: mManageExpert.ManageExpert, UIDs: uids}, nil
|
||||
return &ExamineManageInfo{IModel: mManageExpert.ManageExpert, UIDs: uids,
|
||||
Name: mManageExpert.Name, Industrys: mManageExpert.GetIndustryAttribute(),
|
||||
Keywords: mManageExpert.GetKeywordAttribute(), Researchs: mManageExpert.GetResearchAttribute()}, nil
|
||||
}
|
||||
|
||||
func examineResearch(id, tenantID uint64) (*ExamineManageInfo, error) {
|
||||
@ -105,7 +111,9 @@ func examineResearch(id, tenantID uint64) (*ExamineManageInfo, error) {
|
||||
model2.NewWhere("invalid_status", model2.InvalidStatusForNot)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ExamineManageInfo{IModel: mManageResearch.ManageResearch, UIDs: uids}, nil
|
||||
return &ExamineManageInfo{IModel: mManageResearch.ManageResearch, UIDs: uids,
|
||||
Name: mManageResearch.Name, Industrys: mManageResearch.GetIndustryAttribute(),
|
||||
Keywords: mManageResearch.GetKeywordAttribute(), Researchs: mManageResearch.GetResearchAttribute()}, nil
|
||||
}
|
||||
|
||||
func examineLaboratory(id, tenantID uint64) (*ExamineManageInfo, error) {
|
||||
@ -128,7 +136,9 @@ func examineLaboratory(id, tenantID uint64) (*ExamineManageInfo, error) {
|
||||
model2.NewWhere("invalid_status", model2.InvalidStatusForNot)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ExamineManageInfo{IModel: mManageLaboratory.ManageLaboratory, UIDs: uids}, nil
|
||||
return &ExamineManageInfo{IModel: mManageLaboratory.ManageLaboratory, UIDs: uids,
|
||||
Name: mManageLaboratory.Name, Industrys: mManageLaboratory.GetIndustryAttribute(),
|
||||
Keywords: mManageLaboratory.GetKeywordAttribute(), Researchs: mManageLaboratory.GetResearchAttribute()}, nil
|
||||
}
|
||||
|
||||
func examineAgent(id, tenantID uint64) (*ExamineManageInfo, error) {
|
||||
@ -151,7 +161,9 @@ func examineAgent(id, tenantID uint64) (*ExamineManageInfo, error) {
|
||||
model2.NewWhere("invalid_status", model2.InvalidStatusForNot)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ExamineManageInfo{IModel: mManageAgent.ManageAgent, UIDs: uids}, nil
|
||||
return &ExamineManageInfo{IModel: mManageAgent.ManageAgent, UIDs: uids,
|
||||
Name: mManageAgent.Name, Industrys: mManageAgent.GetIndustryAttribute(),
|
||||
Keywords: mManageAgent.GetKeywordAttribute()}, nil
|
||||
}
|
||||
|
||||
// Launch 发起审核
|
||||
@ -210,6 +222,11 @@ func (c *Examine) Launch(id uint64, identity, status int) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
// 存放es中
|
||||
(&ESParams{
|
||||
Identity: identity, Name: data.Name, Keywords: data.Keywords,
|
||||
Industrys: data.Industrys, Researchs: data.Researchs,
|
||||
}).Set()
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user