Browse Source

迭代优化

master
陈裕财 5 years ago
parent
commit
6ad82c3255
  1. 9
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationProductLinkMapper.xml
  2. 4
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml

9
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationProductLinkMapper.xml

@ -14,7 +14,14 @@
<!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select * from XM.xm_iteration_product_link res
SELECT
res.*,
i.iteration_name,
pro.product_name
FROM
XM.xm_iteration_product_link res
INNER JOIN xm_iteration i ON res.iteration_id = i.id
INNER JOIN xm_product pro ON res.product_id = pro.id
<where>
<if test="ids != null"> and
iteration_id in

4
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml

@ -121,9 +121,9 @@
)
</if>
<if test="iterationId!=null and iterationId!=''">
and exists( select 1 from xm_iteration_product_link ipl inner join xm_product_project ppl
and exists( select 1 from xm_iteration_product_link ipl inner join xm_product_project_link ppl
on ipl.product_id=ppl.product_id
where ipl.product_id =res.id and ipl.iteration_id=#{iterationId}
where ppl.project_id =res.id and ipl.iteration_id=#{iterationId}
)
</if>
<if test="key != null and key !='' "> and res.name like #{key} </if>

Loading…
Cancel
Save