|
|
|
@ -10,8 +10,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<!-- <result property="khitemId" column="khitem_id" />
|
|
|
|
<!-- <result property="khitemId" column="khitem_id" />
|
|
|
|
<result property="itemName" column="item_name" />-->
|
|
|
|
<result property="itemName" column="item_name" />-->
|
|
|
|
<collection property="itemList" ofType="KhItems">
|
|
|
|
<collection property="itemList" ofType="KhItems">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="id" column="itemId" />
|
|
|
|
<result property="itemName" column="item_name" />
|
|
|
|
<result property="itemName" column="khitemName" />
|
|
|
|
</collection >
|
|
|
|
</collection >
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
@ -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.* 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 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,8 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectKhTemplateById" parameterType="Long" resultMap="KhTemplateResult">
|
|
|
|
<select id="selectKhTemplateById" parameterType="Long" resultMap="KhTemplateResult">
|
|
|
|
<include refid="selectKhTemplateVo"/>
|
|
|
|
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
|
|
|
|
where id = #{id}
|
|
|
|
where t.id = #{id}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertKhTemplate" parameterType="KhTemplate" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
<insert id="insertKhTemplate" parameterType="KhTemplate" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|