Browse Source

团队重构

master
陈裕财 3 years ago
parent
commit
f1cd2bd101
  1. 33
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml

33
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml

@ -31,15 +31,42 @@
<select id="getXmTestPlanCaseExecStatusDist" parameterType="HashMap" resultType="HashMap">
select count(*) as total_cnt,res.exec_status from xm_test_plan_case res where res.plan_id=#{planId}
select count(*) as total_cnt,res.exec_status from xm_test_plan_case res left join xm_test_plan p on res.plan_id=p.id
<where>
<if test="planId!=null and planId!=''">
and res.plan_id=#{planId}
</if>
<if test="casedbId!=null and casedbId!=''">
and p.casedb_id=#{casedbId}
</if>
<if test="projectId!=null and projectId!=''">
and p.porject_id=#{projectId}
</if>
<if test="productId!=null and productId!=''">
and p.product_id=#{productId}
</if>
</where>
group by res.exec_status
</select>
<select id="getXmTestPlanCaseUserDist" parameterType="HashMap" resultType="HashMap">
select count(*) as total_cnt,sum(case when res.exec_status>='1' then 1 else 0 end) as had_exec,sum(case when res.exec_status='0' then 1 else 0 end) as not_exec
,res.exec_userid,max(res.exec_username) as exec_username
from xm_test_plan_case res where res.plan_id=#{planId}
from xm_test_plan_case res left join xm_test_plan p on res.plan_id=p.id
<where>
<if test="planId!=null and planId!=''">
and res.plan_id=#{planId}
</if>
<if test="casedbId!=null and casedbId!=''">
and p.casedb_id=#{casedbId}
</if>
<if test="projectId!=null and projectId!=''">
and p.porject_id=#{projectId}
</if>
<if test="productId!=null and productId!=''">
and p.product_id=#{productId}
</if>
</where>
group by res.exec_userid
</select>

Loading…
Cancel
Save