refactor(接口测试): 优化导入查询sql (#15309)
--task=1008278 --user=王孝刚 接口测试导入逻辑优化(1.20同步上) https://www.tapd.cn/55049933/s/1187315 Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
parent
bf8c39cee3
commit
3899c4be50
|
@ -1020,20 +1020,24 @@
|
|||
</select>
|
||||
<sql id="Same_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="blobs" item="blob" separator="or">
|
||||
<if test="blobs">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<if test="blob.method">
|
||||
and api_definition.method = #{blob.method}
|
||||
</if>
|
||||
<if test="blob.path">
|
||||
and api_definition.path = #{blob.path}
|
||||
</if>
|
||||
<if test="blob.projectId">
|
||||
and api_definition.project_id = #{blob.projectId}
|
||||
</if>
|
||||
</trim>
|
||||
<foreach collection="blobs" item="blob" separator="or">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<if test="blob.method">
|
||||
and api_definition.method = #{blob.method}
|
||||
</if>
|
||||
<if test="blob.path">
|
||||
and api_definition.path = #{blob.path}
|
||||
</if>
|
||||
<if test="blob.projectId">
|
||||
and api_definition.project_id = #{blob.projectId}
|
||||
</if>
|
||||
</trim>
|
||||
|
||||
</foreach>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
|
@ -786,17 +786,22 @@
|
|||
|
||||
<sql id="Same_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="blobs" item="blob" separator="or">
|
||||
<if test="blobs">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<if test="blob.name">
|
||||
and api_scenario.name = #{blob.name}
|
||||
</if>
|
||||
<if test="blob.projectId">
|
||||
and api_scenario.project_id = #{blob.projectId}
|
||||
</if>
|
||||
</trim>
|
||||
<foreach collection="blobs" item="blob" separator="or">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<if test="blob.name">
|
||||
and api_scenario.name = #{blob.name}
|
||||
</if>
|
||||
<if test="blob.projectId">
|
||||
and api_scenario.project_id = #{blob.projectId}
|
||||
</if>
|
||||
</trim>
|
||||
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
|
|
Loading…
Reference in New Issue