|
|
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectKhTemplateList" parameterType="KhTemplate" resultMap="KhTemplateResult">
|
|
|
|
<select id="selectKhTemplateList" parameterType="KhTemplate" resultMap="KhTemplateResult">
|
|
|
|
select t.*,ti.khitem_id itemId ,ti.item_name khitemName from kh_template t join kh_tem_item ti on t.id=ti.tem_id
|
|
|
|
select t.*,ti.khitem_id itemId ,ti.item_name khitemName from kh_template t left join kh_tem_item ti on t.id=ti.tem_id
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="temName != null and temName != ''"> and tem_name like concat('%', #{temName}, '%')</if>
|
|
|
|
<if test="temName != null and temName != ''"> and tem_name like concat('%', #{temName}, '%')</if>
|
|
|
|
<!-- <if test="khitemId != null "> and khitem_id = #{khitemId}</if>
|
|
|
|
<!-- <if test="khitemId != null "> and khitem_id = #{khitemId}</if>
|
|
|
|
@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectKhTemplateById" parameterType="Long" resultMap="KhTemplateResult">
|
|
|
|
<select id="selectKhTemplateById" parameterType="Long" resultMap="KhTemplateResult">
|
|
|
|
select t.*,ti.khitem_id itemId ,ti.item_name khitemName from kh_template t join kh_tem_item ti on t.id=ti.tem_id
|
|
|
|
select t.*,ti.khitem_id itemId ,ti.item_name khitemName from kh_template t left join kh_tem_item ti on t.id=ti.tem_id
|
|
|
|
where t.id = #{id}
|
|
|
|
where t.id = #{id}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|