This commit is contained in:
wucongxing 2023-07-18 09:11:13 +08:00
parent 3f8126580d
commit 11c926fbfb

View File

@ -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)