SET FOREIGN_KEY_CHECKS=0;

ALTER TABLE `systemservice`.`sys_advert` AUTO_INCREMENT = 1;

ALTER TABLE `systemservice`.`sys_area` AUTO_INCREMENT = 1186;

ALTER TABLE `systemservice`.`sys_company` AUTO_INCREMENT = 62;

ALTER TABLE `systemservice`.`sys_company_org` AUTO_INCREMENT = 155;

ALTER TABLE `systemservice`.`sys_company_project_pack` AUTO_INCREMENT = 217;

ALTER TABLE `systemservice`.`sys_contract` AUTO_INCREMENT = 270;

ALTER TABLE `systemservice`.`sys_contract_project_pack` AUTO_INCREMENT = 351;

ALTER TABLE `systemservice`.`sys_customer` DROP INDEX `idx_mobile`;

ALTER TABLE `systemservice`.`sys_dept` AUTO_INCREMENT = 15;

ALTER TABLE `systemservice`.`sys_dict` AUTO_INCREMENT = 69;

ALTER TABLE `systemservice`.`sys_dict_detail` AUTO_INCREMENT = 487;

ALTER TABLE `systemservice`.`sys_file_record` AUTO_INCREMENT = 509;

ALTER TABLE `systemservice`.`sys_file_record` MODIFY COLUMN `company_id` int NULL DEFAULT (0) COMMENT '企业ID' AFTER `expire_time`;

ALTER TABLE `systemservice`.`sys_log` AUTO_INCREMENT = 1;

ALTER TABLE `systemservice`.`sys_log` MODIFY COLUMN `input` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '操作内容' AFTER `create_time`;

ALTER TABLE `systemservice`.`sys_log` DROP COLUMN `remark`;

ALTER TABLE `systemservice`.`sys_log_login` AUTO_INCREMENT = 3581;

ALTER TABLE `systemservice`.`sys_member` AUTO_INCREMENT = 2062428988782174209;

ALTER TABLE `systemservice`.`sys_member_auth` AUTO_INCREMENT = 2084901699445911553;

ALTER TABLE `systemservice`.`sys_member_auth` MODIFY COLUMN `union_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL AFTER `create_time`;

ALTER TABLE `systemservice`.`sys_member_plate` AUTO_INCREMENT = 284;

ALTER TABLE `systemservice`.`sys_member_plate` MODIFY COLUMN `plate_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '车牌号码' AFTER `member_id`;

ALTER TABLE `systemservice`.`sys_member_plate_apply` AUTO_INCREMENT = 2062451363435274241;

ALTER TABLE `systemservice`.`sys_member_plate_apply` MODIFY COLUMN `plate_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '车牌号码' AFTER `apply_mobile`;

ALTER TABLE `systemservice`.`sys_member_plate_apply` MODIFY COLUMN `source` int NOT NULL AFTER `cancel_name`;

ALTER TABLE `systemservice`.`sys_member_plate_apply_doc` AUTO_INCREMENT = 2062451363456245761;

ALTER TABLE `systemservice`.`sys_member_sub_temp` AUTO_INCREMENT = 9;

ALTER TABLE `systemservice`.`sys_menu` AUTO_INCREMENT = 2736;

ALTER TABLE `systemservice`.`sys_notice` AUTO_INCREMENT = 1;

ALTER TABLE `systemservice`.`sys_org` AUTO_INCREMENT = 184;

ALTER TABLE `systemservice`.`sys_pack` AUTO_INCREMENT = 57;

ALTER TABLE `systemservice`.`sys_pack_menu` AUTO_INCREMENT = 1;

ALTER TABLE `systemservice`.`sys_pack_price` AUTO_INCREMENT = 77;

ALTER TABLE `systemservice`.`sys_project` AUTO_INCREMENT = 177;

ALTER TABLE `systemservice`.`sys_role` AUTO_INCREMENT = 109;

ALTER TABLE `systemservice`.`sys_role_menu` AUTO_INCREMENT = 44612;

ALTER TABLE `systemservice`.`sys_template` AUTO_INCREMENT = 25;

ALTER TABLE `systemservice`.`sys_template` MODIFY COLUMN `channel` int NOT NULL COMMENT '推送渠道(数据字典templateChannel，1-爱泊客小程序,2-爱泊客公众号,3-富易行APP)' AFTER `id`;

ALTER TABLE `systemservice`.`sys_template` MODIFY COLUMN `type` int NOT NULL COMMENT '事件类型(sys_template_event表code字段)' AFTER `channel`;

ALTER TABLE `systemservice`.`sys_template` MODIFY COLUMN `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '模板ID(第三方参数，如微信的消息模版ID)' AFTER `type`;

ALTER TABLE `systemservice`.`sys_template` MODIFY COLUMN `biz_type` int NOT NULL COMMENT '业务类型(数据字典templateBizType，1-车辆入场,2-车辆出场,3-车辆缴费,4-车辆认证,5-月卡申请,6-月卡到期)' AFTER `redirect_url`;

ALTER TABLE `systemservice`.`sys_template` MODIFY COLUMN `msg_type` int NOT NULL DEFAULT 0 COMMENT '消息类型(数据字典templateMsgType，1-模板消息,2-一次性订阅,3-长期订阅)' AFTER `biz_type`;

ALTER TABLE `systemservice`.`sys_template_event` AUTO_INCREMENT = 11;

ALTER TABLE `systemservice`.`sys_user` AUTO_INCREMENT = 388;

ALTER TABLE `systemservice`.`sys_user` ADD COLUMN `project_no` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目编号' AFTER `park_tag`;

ALTER TABLE `systemservice`.`sys_user_card_type` AUTO_INCREMENT = 18;

ALTER TABLE `systemservice`.`sys_user_park` AUTO_INCREMENT = 2;

ALTER TABLE `systemservice`.`sys_user_project` AUTO_INCREMENT = 115;

ALTER TABLE `systemservice`.`sys_user_role` AUTO_INCREMENT = 1315;

ALTER TABLE `systemservice`.`tool_ad_flow_count` AUTO_INCREMENT = 136;

ALTER TABLE `systemservice`.`tool_ad_park` AUTO_INCREMENT = 4354;

ALTER TABLE `systemservice`.`tool_ad_park` ADD COLUMN `project_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '项目名称' AFTER `park_name`;

ALTER TABLE `systemservice`.`tool_ad_park` ADD COLUMN `api_type` tinyint NOT NULL COMMENT '广告商 1:知蛛' AFTER `update_time`;

ALTER TABLE `systemservice`.`tool_ad_park` ADD COLUMN `ext_default` tinyint NOT NULL DEFAULT 0 COMMENT '是否使用默认配置 0否 1是' AFTER `api_type`;

ALTER TABLE `systemservice`.`tool_ad_park` ADD COLUMN `region_id` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0' COMMENT '区域Id，优先取车场area，再取city，没有就取province' AFTER `ext_default`;

ALTER TABLE `systemservice`.`tool_ad_park` ADD COLUMN `province_id` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0' COMMENT '省' AFTER `region_id`;

ALTER TABLE `systemservice`.`tool_ad_park` ADD COLUMN `city_id` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0' COMMENT '市' AFTER `province_id`;

ALTER TABLE `systemservice`.`tool_ad_park` ADD COLUMN `area_id` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0' COMMENT '区' AFTER `city_id`;

ALTER TABLE `systemservice`.`tool_ad_park` DROP COLUMN `type`;

ALTER TABLE `systemservice`.`tool_ad_park` DROP COLUMN `park_code`;

ALTER TABLE `systemservice`.`tool_ad_park` DROP COLUMN `agent_id`;

ALTER TABLE `systemservice`.`tool_ad_park` DROP COLUMN `address`;

ALTER TABLE `systemservice`.`tool_ad_park` DROP COLUMN `is_del`;

SET FOREIGN_KEY_CHECKS=1;