feat:完善入驻信息管理
This commit is contained in:
@ -35,13 +35,13 @@ func (c *Research) Launch(params *BasicParams, other *config.IdentityForResearch
|
||||
return err
|
||||
} else if isExist {
|
||||
// 审核中
|
||||
if mManageResearch.Status == model2.ExamineStatusForOngoing {
|
||||
if mManageResearch.Examine.ExamineStatus == model2.ExamineStatusForOngoing {
|
||||
return errors.New("操作错误,当前该研究机构信息审核中,不可入驻")
|
||||
}
|
||||
// 审核通过
|
||||
if mManageResearch.Status == model2.ExamineStatusForAgree {
|
||||
if mManageResearch.Examine.ExamineStatus == model2.ExamineStatusForAgree {
|
||||
// 筛选企业条件
|
||||
if err = params.filter(config.TenantUserIdentityForCompany,
|
||||
if err = params.filter(config.TenantUserIdentityForResearch,
|
||||
model2.NewWhere("research_id", mManageResearch.ID)); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -71,7 +71,7 @@ func (c *Research) Launch(params *BasicParams, other *config.IdentityForResearch
|
||||
return err
|
||||
}
|
||||
if err := model2.UpdatesWhere(mUserResearch.UserResearch, map[string]interface{}{
|
||||
"status": model2.InvalidStatusForYes, "updated_at": time.Now(),
|
||||
"invalid_status": model2.InvalidStatusForYes, "updated_at": time.Now(),
|
||||
}, []*model2.ModelWhere{model2.NewWhere("uid", c.UID)}, tx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user