DELETE
FROM
	config
WHERE
	`key` = 'SYNC_READ_STARTTIME';

DELETE
FROM
	config
WHERE
	`key` = 'OFFSET_TIME';

INSERT INTO `config` (
	`key`,
	`value`,
	`name`,
	`active`,
	`create_time`,
	`update_time`,
	`update_by`
)
VALUES
	(
		'SYNC_READ_STARTTIME',
		'2018-12-01 13:34:55',
		'同步读取时间',
		TRUE,
		'2018-12-01 10:20:21',
		'2018-12-01 10:20:23',
		'system'
	);

INSERT INTO `config` (
	`key`,
	`value`,
	`name`,
	`active`,
	`create_time`,
	`update_time`,
	`update_by`
)
VALUES
	(
		'OFFSET_TIME',
		'30',
		'时间偏移量',
		TRUE,
		'2018-12-01 10:20:55',
		'2018-12-01 10:20:58',
		'system'
	);



DELETE
FROM
	`config`
WHERE
	`KEY` LIKE 'ISFEE%';

INSERT INTO `config` (
	`KEY`,
	`VALUE`,
	NAME,
	active,
	create_time,
	update_time,
	update_by
) SELECT DISTINCT
	CONCAT('ISFEE', CODE),
	'1',
  '是否缴费',
	TRUE,
	now(),
	now(),
	'system'
FROM
	sysarea
WHERE
	CODE LIKE '61%'
AND CODE LIKE '%00';
