#!/bin/bash

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF uav_airspace airport >uav_airspace.sql
sed -i '1s/^/use uav_airspace;\n/' uav_airspace.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF uav_notice mail_provider_cfg msg_tpl msg_tpl_lang open_app >uav_notice.sql
sed -i '1s/^/use uav_notice;\n/' uav_notice.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF uav_process uav_proc_cfg >uav_process.sql
sed -i '1s/^/use uav_process;\n/' uav_process.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF admin_user sys_weak_password sys_platform sys_platform_attr sys_resource sys_resource_api sys_resource_attr sys_action_api xxl_job_group xxl_job_info xxl_job_lock sys_resource_group sys_resource_group_template sys_tenant_config sys_group_resource_mapping >admin_user.sql
sed -i '1s/^/use admin_user;\n/' admin_user.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF uav_user sys_weak_password sys_resource sys_resource_api sys_resource_attr sys_action_api sys_group_resource_mapping sys_resource_group sys_resource_group_template >uav_user.sql
sed -i '1s/^/use uav_user;\n/' uav_user.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF uav_oauth oauth_client_details >uav_oauth.sql
sed -i '1s/^/use uav_oauth;\n/' uav_oauth.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF uav_mission calendar num >uav_mission.sql
sed -i '1s/^/use uav_mission;\n/' uav_mission.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF admin_data sys_area_config sys_area_pinyin sys_dictionary sys_dictionary_attr sys_dictionary_type sys_language uav_dev_action_match uav_dev_type_match uav_hangar_model uav_load_cam_model uav_load_spk_model uav_plane_model >admin_data.sql
sed -i '1s/^/use admin_data;\n/' admin_data.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF cmii_material_warehouse mw_scr >cmii_material_warehouse.sql
sed -i '1s/^/use cmii_material_warehouse;\n/' cmii_material_warehouse.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF uav_brain scene_category_config scene_type_config >uav_brain.sql
sed -i '1s/^/use uav_brain;\n/' uav_brain.sql

#/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF nacos_config config_info his_config_info roles users > nacos_config.sql
#sed -i '1s/^/use nacos_config;\n/' nacos_config.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF cmii_live_srs_op live_hls_sync_hq live_hub >cmii_live_srs_op.sql
sed -i '1s/^/use cmii_live_srs_op;\n/' cmii_live_srs_op.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF suav_supervision airport sys_area_config sys_area_pinyin >suav_supervision.sql
sed -i '1s/^/use suav_supervision;\n/' suav_supervision.sql

/root/wdd/mysql/bin/mysqldump --login-path=root13306 -t --set-gtid-purged=OFF uav_gis emergence >uav_gis.sql
sed -i '1s/^/use uav_gis;\n/' uav_gis.sql
