新增创建医生创建im账号

This commit is contained in:
2023-07-13 11:46:31 +08:00
parent 82353bbd35
commit 7c56b936a4
2 changed files with 42 additions and 0 deletions
+5
View File
@@ -784,6 +784,11 @@ func (r *UserDoctorService) AddUserDoctor(userId string, a requests.AddUserDocto
}
// 创建im账户
res, err = tencentIm.CreateAccount(strconv.FormatInt(userDoctor.UserId, 10), a.CardName, a.Avatar)
if err != nil || res != true {
tx.Rollback()
return false, errors.New(err.Error())
}
tx.Commit()
return true, nil