refactor: 优化接口用例查询

This commit is contained in:
CaptainB 2022-01-23 16:15:03 +08:00 committed by 刘瑞斌
parent f9bc70854a
commit 195f4dd9a5
1 changed files with 2 additions and 5 deletions

View File

@ -772,11 +772,8 @@
<if test="request.versionId != null">
and ${versionTable}.version_id = #{request.versionId}
</if>
<if test="request.refId != null">
and ${versionTable}.ref_id = #{request.refId}
</if>
<if test="request.versionId == null and request.refId == null and request.id == null">
AND ${versionTable}.latest = 1
<if test="request.versionId == null and request.id == null">
AND a.latest = 1
</if>
</sql>
</mapper>