DELETE FROM AR_CONFIG WHERE CONFIG_NAME='openBD' LIMIT 1;
DELETE FROM AR_CONFIG WHERE CONFIG_NAME='decPercent' LIMIT 1;
INSERT INTO `AR_CONFIG`(`CONFIG_NAME`, `TITLE`, `UNIT`, `INPUT_TYPE`, `OPTIONS`, `VALUE`, `TYPE`, `SORT`, `CREATED_AT`, `UPDATED_AT`) VALUES ('openFW', '是否开启服务奖', NULL, 8, NULL, '1', 'bonus', 39, 1521085263, 1604970154);
INSERT INTO `AR_CONFIG`(`CONFIG_NAME`, `TITLE`, `UNIT`, `INPUT_TYPE`, `OPTIONS`, `VALUE`, `TYPE`, `SORT`, `CREATED_AT`, `UPDATED_AT`) VALUES ('decRoleBonusFrom', '服务奖来源', '', 3, '[{\"label\":\"首次报单\",\"value\":\"ZC\"},{\"label\":\"复消购物\",\"value\":\"FX_CASH\"},{\"label\":\"积分购物\",\"value\":\"FX_POINT\"}]', 'ZC,FX_CASH', 'bonus', 40, 1521085263, 1605590484);
INSERT INTO `AR_CONFIG`(`CONFIG_NAME`, `TITLE`, `UNIT`, `INPUT_TYPE`, `OPTIONS`, `VALUE`, `TYPE`, `SORT`, `CREATED_AT`, `UPDATED_AT`) VALUES ('fwCoefficientFromZc', '服务奖首购报单系数', '', 1, NULL, '1', 'bonus', 41, 1521085263, 1609127216);
INSERT INTO `AR_CONFIG`(`CONFIG_NAME`, `TITLE`, `UNIT`, `INPUT_TYPE`, `OPTIONS`, `VALUE`, `TYPE`, `SORT`, `CREATED_AT`, `UPDATED_AT`) VALUES ('fwCoefficientFromFxCash', '服务奖现金复消系数', '', 1, NULL, '0.625', 'bonus', 42, 1521085263, 1609127216);
INSERT INTO `AR_CONFIG`(`CONFIG_NAME`, `TITLE`, `UNIT`, `INPUT_TYPE`, `OPTIONS`, `VALUE`, `TYPE`, `SORT`, `CREATED_AT`, `UPDATED_AT`) VALUES ('fwCoefficientFromFxPoint', '服务奖积分复消系数', '', 1, NULL, '0.625', 'bonus', 43, 1521085263, 1609127216);


-- ALTER TABLE `AR_CALC_BONUS`
-- ADD COLUMN `ORI_BONUS_FW` decimal(16, 3) NOT NULL DEFAULT 0.000 AFTER `ORI_BONUS_QY_FX`;

ALTER TABLE `AR_PERF_PERIOD`
ADD COLUMN `PV_PCS_FX_CASH` decimal(16, 3) NOT NULL DEFAULT 0.000 COMMENT '现金复消' AFTER `PV_PCS_FX`;
ALTER TABLE `AR_PERF_PERIOD`
ADD COLUMN `PV_PCS_FX_POINT` decimal(16, 3) NOT NULL DEFAULT 0.000 COMMENT '积分复消' AFTER `PV_PCS_FX_CASH`;

-- ALTER TABLE `AR_USER_BONUS`
-- ADD COLUMN `ORI_FW_TOTAL` decimal(16, 2) NOT NULL DEFAULT 0.00 AFTER `ORI_QY_TOTAL`;