码迷,mamicode.com
首页 > 其他好文 > 详细

category insert接口

时间:2017-09-10 14:27:29      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:test   get   category   sel   integer   online   ram   names   type   

<mapper namespace="com.project714.dao.CategoryDao">
<resultMap id="Cateogory" type="com.project714.dto.Category">
<id property="categoryID" jdbcType="INTEGER" column="category_id" />

<result property="categoryName" column="category_name" />
<result property="parentCategoryID" column="parent_id" />
<result property="ifOnLine" column="category_state" />
</resultMap>

<update id="updateCategoryName" parameterType="com.project714.dto.Category">
update t_category
<set>
<if test="categoryName != null">
category_name=#{categoryName},
</if>
<if test="ifOnLine != null">
category_state=#{ifOnLine},
</if>
<if test="parentCategoryID != null">
parent_id=#{parentCategoryID},
</if>
</set>
where category_id = #{categoryID}
</update>
<select id="getAllCategories" resultMap="Cateogory">
select category_id,category_name,parent_id,category_state from
t_category
</select>
</mapper>

category insert接口

标签:test   get   category   sel   integer   online   ram   names   type   

原文地址:http://www.cnblogs.com/panxuejun/p/7500904.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!