This commit is contained in:
haomingming 2026-07-20 15:29:35 +08:00
parent 6ca0a5ff52
commit b6f4d04b46

View File

@ -764,6 +764,11 @@ func (r *UserCaCertService) GetHospitalCloudCert() (g *dto.UserCaCertDto, err er
maps["ca_pin"] = userId
maps["type"] = 2
userCaCert, _ := userCaCertDao.GetUserCaCert(maps)
if userCaCert == nil {
// 如果找不到证书,可以返回 nil或者返回一个特定的业务 error (如: errors.New("暂无医院证书"))
return nil, nil
}
g = dto.GetUserCaCertDto(userCaCert)
return g, nil