feat:完善信息,增加socket
This commit is contained in:
@ -19,6 +19,7 @@ type ExamineHandle func(session *session.Admin) *Examine
|
||||
|
||||
type ExamineManageInfo struct {
|
||||
IModel model2.IModel
|
||||
IUserModel model2.IModel
|
||||
UIDs []uint64 // 用户表UUID
|
||||
Name string
|
||||
Keywords, Industrys, Researchs []string
|
||||
@ -62,8 +63,8 @@ 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,
|
||||
Name: mManageCompany.Name, Industrys: mManageCompany.GetIndustryAttribute(),
|
||||
return &ExamineManageInfo{IModel: mManageCompany.ManageCompany, IUserModel: mUserCompany.UserCompany,
|
||||
UIDs: uids, Name: mManageCompany.Name, Industrys: mManageCompany.GetIndustryAttribute(),
|
||||
Keywords: mManageCompany.GetKeywordAttribute()}, nil
|
||||
}
|
||||
|
||||
@ -200,6 +201,15 @@ func (c *Examine) Launch(id uint64, identity, status int, remark string, params
|
||||
}
|
||||
// 拒绝后,不执行以下数据
|
||||
if _status == model2.ExamineStatusForRefuse {
|
||||
// 清除所有的入驻信息变为失效
|
||||
if len(data.UIDs) > 0 {
|
||||
if err = model2.UpdatesWhere(data.IUserModel, map[string]interface{}{
|
||||
"invalid_status": model2.InvalidStatusForYes, "updated_at": time.Now(),
|
||||
}, []*model2.ModelWhere{model2.NewWhere("uid", data.UIDs),
|
||||
model2.NewWhere("invalid_status", model2.InvalidStatusForNot)}, tx); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
mUserInstance := model.NewUserInstance()
|
||||
@ -227,6 +237,7 @@ func (c *Examine) Launch(id uint64, identity, status int, remark string, params
|
||||
}, tx); err != nil {
|
||||
return err
|
||||
}
|
||||
// TODO:需要同步redis
|
||||
}
|
||||
if len(userIdentitys) > 0 {
|
||||
if err = model2.Creates(model.NewUserIdentity().UserIdentity, userIdentitys, tx); err != nil {
|
||||
|
Reference in New Issue
Block a user