INSERT into pa_type(id,parent_id,NAME,num,is_consumables,remarks,is_active) value(null,#{parentId},#{typeName},#{typeNum},#{isConsumable},#{remarks},1) UPDATE pa_type set NAME = #{typeName},NUM = #{typeNum} ,IS_CONSUMABLES =#{isConsumable}, REMARKS =#{remarks} where id =#{id} DELETE from pa_type where id=#{id}