{
  "param1": "{\"job.name\":\"简化版本-CheckPoint-实时归集人员信息-3.0\",\"checkpoint.mode\":\"file\",\"checkpoint.hdfs.config\":\"core-site-default.xml\",\"checkpoint.disk.location\":\"/tmp/cp-table-collect-employee\"}",
  "param2": "{\n  \"name\": \"实时归集人员信息\",\n  \"jdbcMeta\": {\n    \"url\": \"jdbc:mysql://192.168.0.7:3368/dispatch?characterEncoding=UTF-8&connectionTimeZone=GMT%2B8&allowMultiQueries=true&autoReconnect=true\",\n    \"userName\": \"v5_enterprise2021\",\n    \"password\": \"Prod_v5#202109\",\n    \"sqlMetaDefinitions\": [\n      {\n        \"tableName\": \"rd_employee_summary\",\n        \"sql\": \"create table jdbc_insert_rd_employee_summary(id STRING,name STRING,head_photo STRING,contact STRING, company_name STRING,status INT,checked_status INT,authenticated_status INT,military_status STRING,security_certificate_no STRING,occupation_type INT,hired_date TIMESTAMP(3),leave_time TIMESTAMP(3),insure INT,organization_id STRING,tenant_user_id STRING,tenant_employee_id STRING,last_sync_time TIMESTAMP(3),last_updated_time TIMESTAMP(3),device_number STRING,tenant_im_user_id STRING,idCard_no STRING,cid STRING,PRIMARY KEY (id) NOT ENFORCED) \"\n      }\n    ]\n  },\n  \"kafkaMeta\": {\n    \"autoOffsetRest\": \"earliest\",\n    \"scanStartupMode\": \"earliest-offset\",\n    \"enableAutoCommit\": \"true\",\n    \"bootstrapServer\": \"192.168.0.52:9092\",\n    \"topicDefinitions\": [\n      {\n        \"topic\": \"obpm2.binlog-cdc.topic.data.tenant_organizations\",\n        \"sql\": \"create table kafka_tenant_organizations(id STRING,name STRING,industry_code STRING,institutional_code STRING,place_of_business_address STRING,place_of_register_address STRING,latitude STRING,longitude STRING,PRIMARY KEY (id) NOT ENFORCED) \"\n      },\n      {\n        \"topic\": \"obpm2.binlog-cdc.topic.data.tenant_user_credentials\",\n        \"sql\": \"create table kafka_tenant_user_credentials(id STRING,created_time BIGINT,address STRING,credential_type INT,front_photo STRING,head_photo STRING,name STRING,number STRING,reverse_photo STRING,selected INT,valid_date_from BIGINT,valid_date_to BIGINT,tenant_user_id STRING,mark STRING,district_code STRING,city_code STRING,province_code STRING, PRIMARY KEY (id) NOT ENFORCED)  \"\n      },\n      {\n        \"topic\": \"obpm2.binlog-cdc.topic.data.tenant_users\",\n        \"sql\": \"create table kafka_tenant_users(id STRING,authenticated_status INT,authenticated_result STRING,authenticated_time BIGINT,checked_status INT,third_party_loginNo STRING,created_time BIGINT ,email STRING,habit_setting STRING,head_photo STRING,im_identity STRING,lon_lat_json STRING,name STRING,sex INT,stature STRING,telephone STRING,user_type INT,selected_credential_id STRING,household_type STRING,one_inch_color_white_photo STRING,two_inch_color_blue_photo STRING,education STRING,marital_status STRING,military_status STRING,nation STRING,native_place STRING,politics_status STRING,cid STRING,wechat STRING,wechat_nicky STRING,last_updated_time BIGINT,background_screening_status INT,last_background_screening_time BIGINT,emergency_contact STRING,emergency_phone STRING,license_level STRING,place_of_now_address STRING,place_of_now_city_code STRING,place_of_now_city_name STRING,place_of_now_district_code STRING,place_of_now_district_name STRING,place_of_now_province_code STRING,place_of_now_province_name STRING,third_party_login_no STRING,last_sync_time BIGINT, PRIMARY KEY (id) NOT ENFORCED)  \"\n      },\n      {\n        \"topic\": \"obpm2.binlog-cdc.topic.data.tenant_employees\",\n        \"sql\": \"create table kafka_tenant_employees(id STRING,created_time BIGINT,email STRING,hired_date BIGINT,job_number STRING,last_updated_time BIGINT,leave_note STRING,leave_operator_created_time BIGINT,leave_operator_id STRING,leave_operator_name STRING,leave_time BIGINT,master_slave_type INT,occupation_type INT,`position` STRING,positive_date BIGINT,salary STRING,salary_bank_number STRING,status INT,work_place STRING,organization_id STRING,superior_id STRING,tenant_user_id STRING,unique_offset STRING,insure INT,is_domain_admin INT,identification STRING,interview STRING,person_status INT,plan_positive_date BIGINT,probation STRING,hired_operator_created_time BIGINT,hired_operator_id STRING,hired_operator_name STRING,last_sync_time BIGINT, PRIMARY KEY (id) NOT ENFORCED)   \"\n      }\n    ]\n  },\n  \"executeSql\": [\n    \"insert into jdbc_insert_rd_employee_summary(id,name,head_photo,contact, company_name,status,checked_status,authenticated_status,military_status,security_certificate_no,occupation_type,hired_date,leave_time,insure,organization_id,tenant_user_id,tenant_employee_id,last_sync_time,last_updated_time,device_number,tenant_im_user_id,idCard_no,cid)select distinct ee.id,u.`name`,'flink-0424',u.telephone,o.`name` as orgName,ee.`status`,u.checked_status,u.authenticated_status,u.military_status,(select c2.number from kafka_tenant_user_credentials c2 where c2.tenant_user_id=u.id and c2.credential_type=7 limit 1) as securityCredentialNo,ee.occupation_type,IFNULL(TO_TIMESTAMP(FROM_UNIXTIME(ee.hired_date/1000, 'yyyy-MM-dd HH:mm:ss')),CURRENT_TIMESTAMP) as hired_date,TO_TIMESTAMP(FROM_UNIXTIME(ee.leave_time/1000, 'yyyy-MM-dd HH:mm:ss')) as leave_time,ifnull(ee.insure,0),ee.organization_id,ee.tenant_user_id,ee.id,TO_TIMESTAMP(FROM_UNIXTIME(ee.last_sync_time/1000, 'yyyy-MM-dd HH:mm:ss')) as last_sync_time,TO_TIMESTAMP(FROM_UNIXTIME(ee.last_updated_time/1000, 'yyyy-MM-dd HH:mm:ss')) as last_updated_time,'',ifnull(u.im_identity,'#'), c.number,u.cid from kafka_tenant_users u  left join kafka_tenant_user_credentials c on u.selected_credential_id=c.id  left join kafka_tenant_employees ee on ee.tenant_user_id=u.id join kafka_tenant_organizations o on o.id=ee.organization_id\"\n  ]\n}"
}