Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9e80ccad4f
|
@ -145,43 +145,43 @@
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="combine">
|
<sql id="combine">
|
||||||
<if test='${condition}.name != null and (${name} == null or ${name} == "")'>
|
<if test='${condition}.name != null and (${name} == null or ${name} == "")'>
|
||||||
and atc.name
|
and t1.name
|
||||||
<include refid="condition">
|
<include refid="condition">
|
||||||
<property name="object" value="${condition}.name"/>
|
<property name="object" value="${condition}.name"/>
|
||||||
</include>
|
</include>
|
||||||
</if>
|
</if>
|
||||||
<if test="${condition}.updateTime != null">
|
<if test="${condition}.updateTime != null">
|
||||||
and atc.update_time
|
and t1.update_time
|
||||||
<include refid="condition">
|
<include refid="condition">
|
||||||
<property name="object" value="${condition}.updateTime"/>
|
<property name="object" value="${condition}.updateTime"/>
|
||||||
</include>
|
</include>
|
||||||
</if>
|
</if>
|
||||||
<if test="${condition}.createTime != null">
|
<if test="${condition}.createTime != null">
|
||||||
and atc.create_time
|
and t1.create_time
|
||||||
<include refid="condition">
|
<include refid="condition">
|
||||||
<property name="object" value="${condition}.createTime"/>
|
<property name="object" value="${condition}.createTime"/>
|
||||||
</include>
|
</include>
|
||||||
</if>
|
</if>
|
||||||
<if test="${condition}.priority != null">
|
<if test="${condition}.priority != null">
|
||||||
and atc.priority
|
and t1.priority
|
||||||
<include refid="condition">
|
<include refid="condition">
|
||||||
<property name="object" value="${condition}.priority"/>
|
<property name="object" value="${condition}.priority"/>
|
||||||
</include>
|
</include>
|
||||||
</if>
|
</if>
|
||||||
<if test="${condition}.creator != null">
|
<if test="${condition}.creator != null">
|
||||||
and atc.user_id
|
and t1.user_id
|
||||||
<include refid="condition">
|
<include refid="condition">
|
||||||
<property name="object" value="${condition}.creator"/>
|
<property name="object" value="${condition}.creator"/>
|
||||||
</include>
|
</include>
|
||||||
</if>
|
</if>
|
||||||
<if test="${condition}.tags != null">
|
<if test="${condition}.tags != null">
|
||||||
and atc.tags
|
and t1.tags
|
||||||
<include refid="condition">
|
<include refid="condition">
|
||||||
<property name="object" value="${condition}.tags"/>
|
<property name="object" value="${condition}.tags"/>
|
||||||
</include>
|
</include>
|
||||||
</if>
|
</if>
|
||||||
<if test="${condition}.status != null">
|
<if test="${condition}.status != null">
|
||||||
and ader.status
|
and t2.status
|
||||||
<include refid="condition">
|
<include refid="condition">
|
||||||
<property name="object" value="${condition}.status"/>
|
<property name="object" value="${condition}.status"/>
|
||||||
</include>
|
</include>
|
||||||
|
@ -237,14 +237,12 @@
|
||||||
|
|
||||||
<select id="listSimple" resultType="io.metersphere.api.dto.definition.ApiTestCaseDTO">
|
<select id="listSimple" resultType="io.metersphere.api.dto.definition.ApiTestCaseDTO">
|
||||||
select
|
select
|
||||||
atc.id, atc.project_id, atc.name, atc.api_definition_id, atc.priority, atc.description, atc.create_user_id, atc.update_user_id, atc.create_time, atc.update_time, atc.num,
|
t1.id, t1.project_id, t1.name, t1.api_definition_id, t1.priority, t1.description, t1.create_user_id, t1.update_user_id, t1.create_time, t1.update_time, t1.num,
|
||||||
a.module_id, a.path, a.protocol, atc.tags
|
a.module_id, a.path, a.protocol, t1.tags
|
||||||
from
|
from
|
||||||
api_test_case atc
|
api_test_case t1
|
||||||
inner join
|
LEFT JOIN api_definition_exec_result t2 ON t1.last_result_id = t2.id
|
||||||
api_definition a
|
inner join api_definition a on t1.api_definition_id = a.id
|
||||||
on
|
|
||||||
atc.api_definition_id = a.id
|
|
||||||
<if test="request.protocol != null and request.protocol!=''">
|
<if test="request.protocol != null and request.protocol!=''">
|
||||||
and a.protocol = #{request.protocol}
|
and a.protocol = #{request.protocol}
|
||||||
</if>
|
</if>
|
||||||
|
@ -264,25 +262,25 @@
|
||||||
</include>
|
</include>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.projectId != null and request.projectId!=''">
|
<if test="request.projectId != null and request.projectId!=''">
|
||||||
and atc.project_id = #{request.projectId}
|
and t1.project_id = #{request.projectId}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.id != null and request.id!=''">
|
<if test="request.id != null and request.id!=''">
|
||||||
and atc.id = #{request.id}
|
and t1.id = #{request.id}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.ids != null and request.ids.size() > 0">
|
<if test="request.ids != null and request.ids.size() > 0">
|
||||||
<if test="request.projectId != null and request.projectId!=''">
|
<if test="request.projectId != null and request.projectId!=''">
|
||||||
and
|
and
|
||||||
</if>
|
</if>
|
||||||
atc.id in
|
t1.id in
|
||||||
<foreach collection="request.ids" item="caseId" separator="," open="(" close=")">
|
<foreach collection="request.ids" item="caseId" separator="," open="(" close=")">
|
||||||
#{caseId}
|
#{caseId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.name != null and request.name!=''">
|
<if test="request.name != null and request.name!=''">
|
||||||
and (atc.name like CONCAT('%', #{request.name},'%') or atc.tags like CONCAT('%', #{request.name},'%'))
|
and (t1.name like CONCAT('%', #{request.name},'%') or t1.tags like CONCAT('%', #{request.name},'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="request.createTime > 0">
|
<if test="request.createTime > 0">
|
||||||
and atc.create_time >= #{request.createTime}
|
and t1.create_time >= #{request.createTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
||||||
and a.module_id in
|
and a.module_id in
|
||||||
|
@ -295,7 +293,7 @@
|
||||||
<if test="values != null and values.size() > 0">
|
<if test="values != null and values.size() > 0">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="key == 'priority'">
|
<when test="key == 'priority'">
|
||||||
and atc.priority in
|
and t1.priority in
|
||||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||||
#{value}
|
#{value}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
Loading…
Reference in New Issue