修改医生详情接口返回数据
This commit is contained in:
@@ -38,6 +38,13 @@ func (r *UserDoctorService) GetUserDoctor(doctorId int64) (getUserDoctorResponse
|
||||
doctorBankCardDao := dao.DoctorBankCardDao{}
|
||||
doctorBankCard, err := doctorBankCardDao.GetDoctorBankCardByDoctorId(doctorId)
|
||||
|
||||
// 获取医生云证书数据
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
maps := make(map[string]interface{})
|
||||
maps["user_id"] = userDoctor.UserId
|
||||
maps["type"] = 2
|
||||
userCaCert, _ := userCaCertDao.GetUserCaCert(maps)
|
||||
|
||||
// 处理返回值
|
||||
getUserDoctorResponse = dto.GetUserDoctorDto(userDoctor)
|
||||
|
||||
@@ -56,6 +63,9 @@ func (r *UserDoctorService) GetUserDoctor(doctorId int64) (getUserDoctorResponse
|
||||
// 加载医生详情
|
||||
getUserDoctorResponse.LoadUserDoctorInfo(userDoctor.UserDoctorInfo)
|
||||
|
||||
// 加载医生云证书详情
|
||||
getUserDoctorResponse.LoadUserCaCert(userCaCert)
|
||||
|
||||
return getUserDoctorResponse, nil
|
||||
}
|
||||
|
||||
@@ -91,7 +101,7 @@ func (r *UserDoctorService) PutUserDoctor(doctorId int64, req requests.PutUserDo
|
||||
doctorBankCard, _ := doctorBankCardDao.GetDoctorBankCardByDoctorId(doctorId)
|
||||
|
||||
// 获取医生云证书
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
maps := make(map[string]interface{})
|
||||
maps["user_id"] = userDoctor.UserId
|
||||
@@ -661,7 +671,7 @@ func (r *UserDoctorService) PutUserDoctor(doctorId int64, req requests.PutUserDo
|
||||
signImage := utils.RemoveOssDomain(req.SignImage)
|
||||
if signImage != userDoctorInfo.SignImage {
|
||||
// 检测是否存在云证书
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
userCaCerts, err := userCaCertDao.GetUserCaCertListByUserId(userDoctor.UserId)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
@@ -1439,7 +1449,7 @@ func (r *UserDoctorService) PutMulti(doctorId int64, req requests.PutMulti) (boo
|
||||
userCaCertService := UserCaCertService{}
|
||||
|
||||
// 检测是否存在云证书
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
maps := make(map[string]interface{})
|
||||
maps["user_id"] = userDoctor.UserId
|
||||
|
||||
Reference in New Issue
Block a user