feat:完善入驻信息管理

This commit is contained in:
henry
2021-12-03 10:08:23 +08:00
parent 199e6f0669
commit d9cbdd2486
26 changed files with 208 additions and 126 deletions

View File

@ -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
}