From df15488c79bdfe103c8159f1141b9ca52b5e8602 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Wed, 6 Dec 2023 15:58:40 +0800 Subject: [PATCH] 1 --- api/service/userDoctor.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/api/service/userDoctor.go b/api/service/userDoctor.go index 100d140..fefaca6 100644 --- a/api/service/userDoctor.go +++ b/api/service/userDoctor.go @@ -1171,14 +1171,16 @@ func (r *UserDoctorService) PutUserDoctorPending(doctorId int64, req requests.Pu return false, errors.New("审核失败") } - // 获取医生云证书数据 - userCaCertDao := dao.UserCaCertDao{} - maps := make(map[string]interface{}) - maps["user_id"] = userDoctor.UserId - maps["type"] = 2 - _, err = userCaCertDao.GetUserCaCert(maps) - if err != nil { - return false, errors.New("请先申请云证书") + if req.IdenAuthStatus == 1 { + // 获取医生云证书数据 + userCaCertDao := dao.UserCaCertDao{} + maps := make(map[string]interface{}) + maps["user_id"] = userDoctor.UserId + maps["type"] = 2 + _, err = userCaCertDao.GetUserCaCert(maps) + if err != nil { + return false, errors.New("请先申请云证书") + } } userDoctorData := make(map[string]interface{}) // 医生数据 @@ -1217,7 +1219,7 @@ func (r *UserDoctorService) PutUserDoctorPending(doctorId int64, req requests.Pu userDoctorData["iden_auth_time"] = time.Now().Format("2006-01-02 15:04:05") // 审核通过删除所有不通过原因数据 - maps = make(map[string]interface{}) + maps := make(map[string]interface{}) maps["doctor_id"] = doctorId err = doctorIdenFailDao.DeleteDoctorIdenFail(tx, maps) if err != nil {