标签: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>
标签:test get category sel integer online ram names type
原文地址:http://www.cnblogs.com/panxuejun/p/7500904.html