def METHOD_NAME(self, version_name, version_id, template_name=None):
    """查询show version相应信息
    如果两者都存在则以version id为准
    """
    if version_id:
        info = ShowVersion.objects.filter(id=version_id)
    else:
        info = ShowVersion.objects.filter(name=version_name)
    if template_name:
        tmpl_info = Template.objects.filter(name=template_name)
        if not tmpl_info:
            raise error_codes.CheckFailed.f("没有查询到模板集信息", replace=True)
        tmpl_id = tmpl_info[0].id
        info = info.filter(template_id=tmpl_id)
    if not info:
        raise error_codes.CheckFailed.f("没有查询到展示版本信息", replace=True)
    return info[0]