From 11c926fbfb0a3ea44755486adaf8cb0c88457147 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Tue, 18 Jul 2023 09:11:13 +0800 Subject: [PATCH] 1 --- api/service/userDoctor.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/service/userDoctor.go b/api/service/userDoctor.go index d47989b..6d9ef7b 100644 --- a/api/service/userDoctor.go +++ b/api/service/userDoctor.go @@ -849,12 +849,12 @@ func (r *UserDoctorService) GetDoctorIdenFailReasonByDoctorId(doctorId int64) (* doctorIdenFailDao := dao.DoctorIdenFailDao{} doctorIdenFail, err := doctorIdenFailDao.GetDoctorIdenFailListByDoctorId(doctorId) if err != nil { - return nil, errors.New("审核失败原因数据错误") + return nil, errors.New(err.Error()) } var idenAuthFailReason userDoctorResponse.IdenAuthFailReason - if doctorIdenFail != nil { + if len(doctorIdenFail) > 0 { for _, v := range doctorIdenFail { switch v.FieldName { case "avatar": @@ -1069,7 +1069,7 @@ func (r *UserDoctorService) PutUserDoctorPending(doctorId int64, req requests.Pu if req.BeGoodAtReason != "" { doctorIdenFail := &model.DoctorIdenFail{ DoctorId: doctorId, - FieldName: "be_good_at_reason", + FieldName: "be_good_at", FailReason: req.BeGoodAtReason, } doctorIdenFail, err = doctorIdenFailDao.AddDoctorIdenFail(tx, doctorIdenFail) @@ -1082,7 +1082,7 @@ func (r *UserDoctorService) PutUserDoctorPending(doctorId int64, req requests.Pu if req.LicenseCertReason != "" { doctorIdenFail := &model.DoctorIdenFail{ DoctorId: doctorId, - FieldName: "license_cert_reason", + FieldName: "license_cert", FailReason: req.LicenseCertReason, } doctorIdenFail, err = doctorIdenFailDao.AddDoctorIdenFail(tx, doctorIdenFail) @@ -1095,7 +1095,7 @@ func (r *UserDoctorService) PutUserDoctorPending(doctorId int64, req requests.Pu if req.QualificationCertReason != "" { doctorIdenFail := &model.DoctorIdenFail{ DoctorId: doctorId, - FieldName: "qualification_cert_reason", + FieldName: "qualification_cert", FailReason: req.QualificationCertReason, } doctorIdenFail, err = doctorIdenFailDao.AddDoctorIdenFail(tx, doctorIdenFail) @@ -1108,7 +1108,7 @@ func (r *UserDoctorService) PutUserDoctorPending(doctorId int64, req requests.Pu if req.WorkCertReason != "" { doctorIdenFail := &model.DoctorIdenFail{ DoctorId: doctorId, - FieldName: "work_cert_reason", + FieldName: "work_cert", FailReason: req.WorkCertReason, } doctorIdenFail, err = doctorIdenFailDao.AddDoctorIdenFail(tx, doctorIdenFail)