DELETE FROM ma_dept_config WHERE dept_id = #{deptId} AND type_id = #{typeId} INSERT INTO ma_dept_config ( dept_id, type_id, config_type, config_value, config_rate, config_description, remark ) VALUES ( #{deptId}, #{typeId}, #{item.configurationType}, #{item.basicConfig}, #{item.configurationRate}, #{item.configurationDescription}, #{remark} ) ON DUPLICATE KEY UPDATE config_value = VALUES(config_value), config_rate = VALUES(config_rate), config_description = VALUES(config_description), remark = VALUES(remark), update_time = CURRENT_TIMESTAMP