feat:完善入驻信息管理
This commit is contained in:
@ -36,13 +36,13 @@ func (c *Expert) Launch(params *BasicParams, other *config.IdentityForExpert) er
|
||||
return err
|
||||
} else if isExist {
|
||||
// 审核中
|
||||
if mManageExpert.Status == model2.ExamineStatusForOngoing {
|
||||
if mManageExpert.Examine.ExamineStatus == model2.ExamineStatusForOngoing {
|
||||
return errors.New("操作错误,当前该专家信息审核中,不可入驻")
|
||||
}
|
||||
// 审核通过
|
||||
if mManageExpert.Status == model2.ExamineStatusForAgree {
|
||||
if mManageExpert.Examine.ExamineStatus == model2.ExamineStatusForAgree {
|
||||
// 筛选企业条件
|
||||
if err = params.filter(config.TenantUserIdentityForCompany,
|
||||
if err = params.filter(config.TenantUserIdentityForExpert,
|
||||
model2.NewWhere("expert_id", mManageExpert.ID)); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -80,7 +80,7 @@ func (c *Expert) Launch(params *BasicParams, other *config.IdentityForExpert) er
|
||||
return err
|
||||
}
|
||||
if err := model2.UpdatesWhere(mUserExpert.UserExpert, 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