-- 用户中心迁移数据

INSERT INTO sys_area(area_id, area_code, area_full_code, area_order, area_name, area_full_name, area_type, area_province_name, area_city_name, area_town_name,
  	area_town_full_name, area_village_name, area_village_full_name, area_community_name, area_community_full_name,
  	area_tree_level, area_parent_id, area_parent_id_list, area_status, area_stop_desc, area_desc, area_last_time, area_create_party_id
  ) SELECT `area_id`, `area_code`, `area_code_12`, `sequence_code`, `area_name`, `area_full_name`, `area_type`, `area_name_shengshi`, `area_name_dishi`, `area_name_quxian`, `area_full_name_quxian`, `area_name_xiangz`, `area_full_name_xiangz`, `area_name_chun`, `area_full_name_chun`, `tree_level`, `parent_id`, `parent_id_list`, `statu`, `stop_desc`, `description`, `last_time`, `create_party_id` FROM tb_sys_area;


INSERT INTO sw_user.sys_user(user_id, user_code, user_nick_code, user_nick_name, user_kind, user_sex, user_head, user_signature, user_phone, user_email,
 user_pwd, user_score, user_level, user_otp_id, user_err_count, user_lock_time, user_stop_info, user_pwd_time, user_last_time, user_last_ip,
 user_last_info, user_status, user_create_party_id, user_create_time)
SELECT user_id, user_code, nick_code, nick_name, user_kind, user_sex, user_head, user_signature, user_phone, user_email,
 user_pwd, user_score, user_level, otp_id, err_count, lock_time, stop_info, pwd_time, last_time, last_ip,
 last_info, statu, create_party_id, last_time FROM demo.tb_sys_user_base;

INSERT INTO sw_user.sys_user_card(uc_id, uc_card_name, uc_card_type, uc_card_number, uc_card_pic_url, uc_card_from_time,
  uc_card_end_time, uc_card_authority, uc_card_addr, uc_id_status, uc_status, uc_desc, uc_last_time, uc_create_party_id)
SELECT user_id, user_name, card_type, card_number, card_pic_url, card_from,
 card_end, id_authority, id_addr, id_statu, statu, remarks, last_time, create_party_id
FROM demo.tb_sys_user_card;

INSERT INTO sw_user.sys_user_ex (ue_id, ue_cert_id, ue_party_id, ue_dept_id, ue_portal_id,
 ue_portal_type, ue_portal_bi_url, ue_station, ue_tel, ue_otp_id, ue_is_fix, ue_msspid, ue_photo_id, ue_last_time, ue_create_party_id)
SELECT user_id, user_cert_id, party_id, department_id, portal_id,
 portal_type, portal_bi_url, station, tel, otp_id, is_fix, msspid, photo_id, last_time, create_party_id
FROM demo.tb_sys_user_ex;
