int saveCategoryName(Category category);
int deleteCategoryById(@Param("categoryID")String categoryID);
<insert id="saveCategoryName" parameterType="com.project714.dto.Category">
insert into t_category(
<if test=‘categoryName != null‘>
category_name,
</if>
<if test=‘parentCategoryID != null‘>
parent_id,
</if>
<if test=‘ifOnLine != null‘>
category_state,
</if>
)values (
<if test=‘categoryName != null‘>
#{categoryName},
</if>
<if test=‘parentCategoryID != null‘>
#{parentCategoryID},
</if>
<if test=‘ifOnLine != null‘>
#{ifOnLine},
</if>
)
</insert>
<delete id="deleteCategoryById" parameterType="java.lang.String">
delete from t_category where category_id=#{categoryID}
</delete>