insert into scrap_reason ( type_id, create_time, update_time, create_by, update_by, remark, reason, del_flag ) values ( #{typeId}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy}, #{remark}, #{reason}, 0 ) update scrap_reason set type_id = #{typeId}, update_by = #{updateBy}, update_time = #{updateTime}, reason = #{reason} where id = #{id} and del_flag = 0 update scrap_reason set del_flag = 1 where id = #{id} and del_flag = 0