Compare commits

..

18 Commits

Author SHA1 Message Date
HuangHai
f665e38bc0 'commit' 2026-02-27 14:57:13 +08:00
HuangHai
3a0e2c3ec8 'commit' 2026-02-06 08:25:47 +08:00
HuangHai
1f4d29d5a1 'commit' 2026-02-06 08:21:47 +08:00
HuangHai
b943cb6b64 'commit' 2026-02-06 08:05:08 +08:00
HuangHai
4825ace45e 'commit' 2026-02-06 07:51:57 +08:00
HuangHai
86ec658473 'commit' 2026-02-06 07:44:59 +08:00
HuangHai
e08b7af675 'commit' 2026-02-06 07:42:45 +08:00
HuangHai
3a6c19e850 'commit' 2026-02-06 07:27:23 +08:00
HuangHai
ff00bf17fa 'commit' 2026-02-05 16:55:32 +08:00
HuangHai
1ad4605462 'commit' 2026-02-05 15:58:37 +08:00
HuangHai
d11497f334 'commit' 2026-02-05 15:55:25 +08:00
HuangHai
4712967fbe 'commit' 2026-02-05 15:55:17 +08:00
HuangHai
4592b0da6f 'commit' 2026-02-05 15:25:57 +08:00
HuangHai
06fe23ff6e 'commit' 2026-02-05 13:32:12 +08:00
HuangHai
1196e1313d 'commit' 2026-02-05 13:29:10 +08:00
HuangHai
20cf7cece8 'commit' 2026-02-05 13:29:04 +08:00
HuangHai
7978bd5b62 Merge branch 'main' of http://www.yelite.cn:27825/huanghai/aiData 2026-02-05 13:25:00 +08:00
HuangHai
8e0309bb7b 'commit' 2026-02-05 13:24:59 +08:00
62 changed files with 2852 additions and 4497 deletions

6
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-python.python",
"ms-python.vscode-pylance"
]
}

13
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run wxChat",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/Start.py",
"console": "integratedTerminal",
"justMyCode": true
}
]
}

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"python.defaultInterpreterPath": "D:\\anaconda3\\envs\\py310\\python.exe"
}

View File

@@ -1,127 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"prid",
"order_id",
"outtradeno",
"pay_time",
"pay_money",
"refund_time",
"refund_money",
"refund_state",
"order_time",
"pay_xml",
"refund_xml",
"check_xml",
"pay_state",
"pay_type",
"phone",
"check_time",
"user_id",
"create_time",
"update_time",
"donate_money",
"memo",
"refund_memo",
"refund_outtradno",
"refund_image",
"refund_operer",
"rechage_operer",
"refund_reason",
"vip",
"meal_id",
"refund_apply_time",
"pay_method"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_account_recharge"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}",
"where": ""
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"prid",
"order_id",
"outtradeno",
"pay_time",
"pay_money",
"refund_time",
"refund_money",
"refund_state",
"order_time",
"pay_xml",
"refund_xml",
"check_xml",
"pay_state",
"pay_type",
"phone",
"check_time",
"user_id",
"create_time",
"update_time",
"donate_money",
"memo",
"refund_memo",
"refund_outtradno",
"refund_image",
"refund_operer",
"rechage_operer",
"refund_reason",
"vip",
"meal_id",
"refund_apply_time",
"pay_method"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_account_recharge"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_account_recharge"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,105 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"cash",
"phone",
"txt_desc",
"sign_msg",
"reason",
"sign",
"type",
"order_id",
"treatment",
"user_id",
"pay_status",
"pay_method",
"update_time",
"create_time",
"pre_balance",
"bef_balance",
"memo",
"donate_money",
"ua_balance",
"to_user_id"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_account_water"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}",
"where": ""
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"cash",
"phone",
"txt_desc",
"sign_msg",
"reason",
"sign",
"type",
"order_id",
"treatment",
"user_id",
"pay_status",
"pay_method",
"update_time",
"create_time",
"pre_balance",
"bef_balance",
"memo",
"donate_money",
"ua_balance",
"to_user_id"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_account_water"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_account_water"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,99 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"car_plate_no",
"car_sn",
"car_brand_name",
"car_model_name",
"car_vin",
"car_engine",
"car_type",
"car_owner_company_id",
"car_business",
"car_bus_path",
"is_auto_charge",
"user_id",
"user_card_no",
"is_disable",
"create_time",
"update_time",
"operator_id"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_car"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}",
"where": ""
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"car_plate_no",
"car_sn",
"car_brand_name",
"car_model_name",
"car_vin",
"car_engine",
"car_type",
"car_owner_company_id",
"car_business",
"car_bus_path",
"is_auto_charge",
"user_id",
"user_card_no",
"is_disable",
"create_time",
"update_time",
"operator_id"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_car"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_car"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,133 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"company_no",
"company_type",
"company_name",
"company_state",
"company_logo",
"company_admin_phone",
"company_admin_name",
"balance_remind",
"balance_remind_phone",
"agent_id",
"station_set_type",
"specified_range",
"specified_operator_ids",
"is_company_discount",
"is_overlay_coupons",
"station_ids",
"no_discount_stationids",
"remark",
"invoice_eligible",
"refuse_invoice_tip",
"is_share_master",
"settlement_method",
"charge_discount_type",
"charge_discount",
"settle_status",
"charge_unit_service",
"charge_unit_electric",
"is_custom_price",
"company_order_permission",
"open_station_ids",
"create_time",
"update_time",
"minimum_recharge_amount",
"inner_person"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_company"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}",
"where": ""
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"company_no",
"company_type",
"company_name",
"company_state",
"company_logo",
"company_admin_phone",
"company_admin_name",
"balance_remind",
"balance_remind_phone",
"agent_id",
"station_set_type",
"specified_range",
"specified_operator_ids",
"is_company_discount",
"is_overlay_coupons",
"station_ids",
"no_discount_stationids",
"remark",
"invoice_eligible",
"refuse_invoice_tip",
"is_share_master",
"settlement_method",
"charge_discount_type",
"charge_discount",
"settle_status",
"charge_unit_service",
"charge_unit_electric",
"is_custom_price",
"company_order_permission",
"open_station_ids",
"create_time",
"update_time",
"minimum_recharge_amount",
"inner_person"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_company"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_company"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,77 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"info_value",
"type_id",
"create_time",
"update_time",
"remark",
"renzheng_flag"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_company_info_value"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}",
"where": ""
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"info_value",
"type_id",
"create_time",
"update_time",
"remark",
"renzheng_flag"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_company_info_value"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_company_info_value"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,113 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"equipment_id",
"connector_sn",
"connector_short_sn",
"connector_no",
"connector_name",
"connector_type",
"voltage_upper_limits",
"voltage_lower_limits",
"current",
"power",
"parkno",
"appointment_id",
"appointment_user_id",
"open_lock_user_id",
"detection_type",
"is_ground_lock",
"is_ground_lock_msg",
"is_geomagnetic",
"is_geomagnetic_msg",
"is_appointment",
"is_appointment_msg",
"auto_open_lock_time",
"create_time",
"update_time"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_connector"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}",
"where": ""
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"equipment_id",
"connector_sn",
"connector_short_sn",
"connector_no",
"connector_name",
"connector_type",
"voltage_upper_limits",
"voltage_lower_limits",
"current",
"power",
"parkno",
"appointment_id",
"appointment_user_id",
"open_lock_user_id",
"detection_type",
"is_ground_lock",
"is_ground_lock_msg",
"is_geomagnetic",
"is_geomagnetic_msg",
"is_appointment",
"is_appointment_msg",
"auto_open_lock_time",
"create_time",
"update_time"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_connector"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_connector"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,123 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"station_id",
"agreement_id",
"equipment_name",
"equipment_sn",
"equipment_short_sn",
"equipment_no",
"manufacturer_id",
"manufacturer_sn",
"manufacturer_name",
"equipment_model",
"production_date",
"equipment_type",
"equipment_type_msg",
"equipment_lng",
"equipment_lat",
"connector_count",
"power",
"national_standard",
"national_standard_msg",
"status",
"equipment_business_type",
"equipment_business_type_msg",
"is_use_card",
"is_use_card_msg",
"charge_host_esn",
"create_time",
"update_time",
"aux_power",
"app_show"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_equipment"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}",
"where": ""
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"station_id",
"agreement_id",
"equipment_name",
"equipment_sn",
"equipment_short_sn",
"equipment_no",
"manufacturer_id",
"manufacturer_sn",
"manufacturer_name",
"equipment_model",
"production_date",
"equipment_type",
"equipment_type_msg",
"equipment_lng",
"equipment_lat",
"connector_count",
"power",
"national_standard",
"national_standard_msg",
"status",
"equipment_business_type",
"equipment_business_type_msg",
"is_use_card",
"is_use_card_msg",
"charge_host_esn",
"create_time",
"update_time",
"aux_power",
"app_show"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_equipment"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_equipment"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,285 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"user_id",
"company_id",
"station_id",
"equipment_id",
"connector_id",
"user_card_no",
"state",
"operate_state",
"order_no",
"platform_order_no",
"platform_sale_type",
"platform_driver_id",
"platform_phone",
"charging_amt",
"order_type",
"order_time",
"charge_begin_time",
"charge_end_time",
"charge_begin_degree",
"charge_end_degree",
"charge_degree",
"charge_ah",
"charge_times_degree",
"charge_begin_soc",
"charge_end_soc",
"charge_cur_soc",
"charge_duration",
"charge_settle_type",
"charge_unit_price",
"charge_unit_cost",
"charge_unit_service_fee",
"receivable_electric_fee",
"receivable_service_fee",
"receivable_total_fee",
"charge_elecfee_amount",
"charge_elecfee_cost_amount",
"charge_service_amount",
"actual_pay_amount",
"pay_order_no",
"pay_amount",
"pay_method",
"pay_status",
"pay_time",
"user_coupon_id",
"coupon_name",
"coupon_type",
"coupon_amount",
"elecfee_coupon_amount",
"servicefee_coupon_amount",
"invoice_id",
"invoice_fee",
"ticket_status",
"activity_electric_fee",
"activity_service_fee",
"charge_plate_no",
"charge_vin",
"charge_strategy",
"charge_strategy_param",
"operator_id",
"operator_income",
"plat_service_fee",
"charge_discount_type",
"settle_electric_fee",
"settle_service_fee",
"settle_fee",
"settle_method",
"settle_coupon_amount",
"settle_coupon_electric_fee",
"settle_coupon_service_fee",
"settle_status",
"cancel_type",
"cancel_code",
"cancel_msg",
"cancel_time",
"finish_type",
"finish_code",
"finish_msg",
"finish_time",
"boot_mode",
"settlement_type",
"is_parking_coupon",
"control_source",
"exception_flag",
"exception_msg",
"report_time",
"com_service_fee",
"com_electric_fee",
"com_total_fee",
"com_charge_discount_type",
"com_charge_discount",
"has_shallow_report",
"has_deep_report",
"is_exception",
"shallow_report_is_received",
"create_time",
"update_time",
"charge_market_id",
"coupon_total_amount",
"coupon_service_total_amount",
"coupon_elecfee_total_amount",
"activity_name",
"activity_total_fee",
"company_activity_id",
"company_activity_name",
"company_activity_total_fee",
"company_activity_service_fee",
"company_activity_electric_fee",
"subsidy_degree",
"subsidy_fee",
"special_channel_order_source"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_equipment_charge_order"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}",
"where": ""
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"user_id",
"company_id",
"station_id",
"equipment_id",
"connector_id",
"user_card_no",
"state",
"operate_state",
"order_no",
"platform_order_no",
"platform_sale_type",
"platform_driver_id",
"platform_phone",
"charging_amt",
"order_type",
"order_time",
"charge_begin_time",
"charge_end_time",
"charge_begin_degree",
"charge_end_degree",
"charge_degree",
"charge_ah",
"charge_times_degree",
"charge_begin_soc",
"charge_end_soc",
"charge_cur_soc",
"charge_duration",
"charge_settle_type",
"charge_unit_price",
"charge_unit_cost",
"charge_unit_service_fee",
"receivable_electric_fee",
"receivable_service_fee",
"receivable_total_fee",
"charge_elecfee_amount",
"charge_elecfee_cost_amount",
"charge_service_amount",
"actual_pay_amount",
"pay_order_no",
"pay_amount",
"pay_method",
"pay_status",
"pay_time",
"user_coupon_id",
"coupon_name",
"coupon_type",
"coupon_amount",
"elecfee_coupon_amount",
"servicefee_coupon_amount",
"invoice_id",
"invoice_fee",
"ticket_status",
"activity_electric_fee",
"activity_service_fee",
"charge_plate_no",
"charge_vin",
"charge_strategy",
"charge_strategy_param",
"operator_id",
"operator_income",
"plat_service_fee",
"charge_discount_type",
"settle_electric_fee",
"settle_service_fee",
"settle_fee",
"settle_method",
"settle_coupon_amount",
"settle_coupon_electric_fee",
"settle_coupon_service_fee",
"settle_status",
"cancel_type",
"cancel_code",
"cancel_msg",
"cancel_time",
"finish_type",
"finish_code",
"finish_msg",
"finish_time",
"boot_mode",
"settlement_type",
"is_parking_coupon",
"control_source",
"exception_flag",
"exception_msg",
"report_time",
"com_service_fee",
"com_electric_fee",
"com_total_fee",
"com_charge_discount_type",
"com_charge_discount",
"has_shallow_report",
"has_deep_report",
"is_exception",
"shallow_report_is_received",
"create_time",
"update_time",
"charge_market_id",
"coupon_total_amount",
"coupon_service_total_amount",
"coupon_elecfee_total_amount",
"activity_name",
"activity_total_fee",
"company_activity_id",
"company_activity_name",
"company_activity_total_fee",
"company_activity_service_fee",
"company_activity_electric_fee",
"subsidy_degree",
"subsidy_fee",
"special_channel_order_source"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_equipment_charge_order"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_equipment_charge_order"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,109 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"order_no",
"charge_degree",
"service_fee",
"electric_fee",
"cost_fee",
"service_fee_unit_price",
"electric_fee_unit_price",
"cost_fee_unit_price",
"activity_service_fee",
"activity_electric_fee",
"charge_startr_time",
"charge_end_time",
"charge_meal_electric_fee",
"charge_meal_service_fee",
"charge_meal_total_fee",
"electric_card_use_dgree",
"check_electric_unit_price",
"check_service_unit_price",
"time_flag",
"create_time",
"update_time",
"detail_more"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_equipment_charge_order_detail"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}",
"where": ""
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"order_no",
"charge_degree",
"service_fee",
"electric_fee",
"cost_fee",
"service_fee_unit_price",
"electric_fee_unit_price",
"cost_fee_unit_price",
"activity_service_fee",
"activity_electric_fee",
"charge_startr_time",
"charge_end_time",
"charge_meal_electric_fee",
"charge_meal_service_fee",
"charge_meal_total_fee",
"electric_card_use_dgree",
"check_electric_unit_price",
"check_service_unit_price",
"time_flag",
"create_time",
"update_time",
"detail_more"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_equipment_charge_order_detail"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_equipment_charge_order_detail"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,120 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"order_no",
"telephone",
"user_id",
"message1",
"message2",
"create_time",
"station_id",
"equipment_id",
"connector_id",
"flag",
"close_time",
"finish_time",
"minutesDifference",
"reduce_money",
"beforeBalance",
"afterBalance",
"fee_station",
"manual_count",
"last_manual_time",
"last_manual_message",
"person_id",
"refund_status",
"refund_time",
"refund_person_id",
"refund_person_name",
"refund_amount",
"refund_type",
"unplug_time"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_ext_hurry_quit"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"order_no",
"telephone",
"user_id",
"message1",
"message2",
"create_time",
"station_id",
"equipment_id",
"connector_id",
"flag",
"close_time",
"finish_time",
"minutesDifference",
"reduce_money",
"beforeBalance",
"afterBalance",
"fee_station",
"manual_count",
"last_manual_time",
"last_manual_message",
"person_id",
"refund_status",
"refund_time",
"refund_person_id",
"refund_person_name",
"refund_amount",
"refund_type",
"unplug_time"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_ext_hurry_quit"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_ext_hurry_quit"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,226 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"station_sn",
"operator_id",
"equioment_owner_id",
"station_name",
"country_code",
"region_id",
"region_code",
"regional_name",
"regional_code",
"address",
"station_tel",
"service_tel",
"station_type",
"station_type_msg",
"station_business_type",
"station_business_type_msg",
"station_status",
"station_status_msg",
"park_nums",
"station_lng",
"station_lat",
"site_guide",
"construction",
"construction_msg",
"pictures",
"match_cars",
"park_info",
"business_start_time",
"business_end_time",
"electricity_fee",
"service_fee",
"is_park_fee",
"park_fee",
"payment",
"payment_msg",
"support_order",
"support_order_msg",
"service_item",
"service_item_image_url",
"service_item_msg",
"station_location_type",
"station_location_type_msg",
"station_charge_type",
"station_charge_type_msg",
"station_power",
"station_voltage",
"station_current",
"is_open",
"is_open_msg",
"is_display",
"is_display_msg",
"sharing_code",
"sharing_applet_picture",
"theme_picture",
"is_barrier_flag",
"is_barrier_flag_msg",
"charge_settle_type",
"charge_settle_type_msg",
"fast_connector_nums",
"slow_connector_nums",
"transformer_capacity",
"installed_capacity",
"remark",
"record_unique_no",
"equipment_owner_name",
"supply_type",
"resident_no",
"watt_hour_meter_no",
"forward_power",
"operation_date",
"charge_replace_type",
"is_hlht",
"is_subsidy",
"create_time",
"update_time",
"area_code_countryside",
"business_expand_type",
"capacity",
"video_monitor",
"electricity_type",
"receive_shop"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_station"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"station_sn",
"operator_id",
"equioment_owner_id",
"station_name",
"country_code",
"region_id",
"region_code",
"regional_name",
"regional_code",
"address",
"station_tel",
"service_tel",
"station_type",
"station_type_msg",
"station_business_type",
"station_business_type_msg",
"station_status",
"station_status_msg",
"park_nums",
"station_lng",
"station_lat",
"site_guide",
"construction",
"construction_msg",
"pictures",
"match_cars",
"park_info",
"business_start_time",
"business_end_time",
"electricity_fee",
"service_fee",
"is_park_fee",
"park_fee",
"payment",
"payment_msg",
"support_order",
"support_order_msg",
"service_item",
"service_item_image_url",
"service_item_msg",
"station_location_type",
"station_location_type_msg",
"station_charge_type",
"station_charge_type_msg",
"station_power",
"station_voltage",
"station_current",
"is_open",
"is_open_msg",
"is_display",
"is_display_msg",
"sharing_code",
"sharing_applet_picture",
"theme_picture",
"is_barrier_flag",
"is_barrier_flag_msg",
"charge_settle_type",
"charge_settle_type_msg",
"fast_connector_nums",
"slow_connector_nums",
"transformer_capacity",
"installed_capacity",
"remark",
"record_unique_no",
"equipment_owner_name",
"supply_type",
"resident_no",
"watt_hour_meter_no",
"forward_power",
"operation_date",
"charge_replace_type",
"is_hlht",
"is_subsidy",
"create_time",
"update_time",
"area_code_countryside",
"business_expand_type",
"capacity",
"video_monitor",
"electricity_type",
"receive_shop"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_station"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_station"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,72 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"create_time",
"update_time",
"time_fq",
"teme_ve"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_time_day"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"create_time",
"update_time",
"time_fq",
"teme_ve"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_time_day"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_time_day"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,152 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"user_name",
"nicker_name",
"sex",
"phone",
"qk_openid",
"open_id",
"ali_user_id",
"birthday",
"avatar",
"app_type",
"password",
"upper_user",
"master_flag",
"user_type",
"multi_charge",
"relation_phone",
"user_owner_id",
"union_id",
"state",
"reg_channel",
"reg_time",
"city_label_code",
"city_label",
"reg_source",
"create_time",
"update_time",
"operator",
"invite_code",
"identity_id",
"operator_id",
"address",
"vip_level",
"province_code",
"province",
"work_company",
"is_bind_wxinfo",
"company_min_charge_balance",
"enable_online_recharge",
"integral",
"shared_user",
"enable_online_refund",
"recommenderId",
"lx_wx_user_id",
"phone_area"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_user"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"user_name",
"nicker_name",
"sex",
"phone",
"qk_openid",
"open_id",
"ali_user_id",
"birthday",
"avatar",
"app_type",
"password",
"upper_user",
"master_flag",
"user_type",
"multi_charge",
"relation_phone",
"user_owner_id",
"union_id",
"state",
"reg_channel",
"reg_time",
"city_label_code",
"city_label",
"reg_source",
"create_time",
"update_time",
"operator",
"invite_code",
"identity_id",
"operator_id",
"address",
"vip_level",
"province_code",
"province",
"work_company",
"is_bind_wxinfo",
"company_min_charge_balance",
"enable_online_recharge",
"integral",
"shared_user",
"enable_online_refund",
"recommenderId",
"lx_wx_user_id",
"phone_area"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_user"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_user"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,96 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"user_id",
"ua_balance",
"ua_deposit",
"ua_balance_time",
"ua_password",
"ua_state",
"ua_real_balance",
"ua_real_degree",
"create_time",
"update_time",
"donate_money",
"donate_able_money",
"ua_able_balance",
"refund_money",
"ua_consume_money",
"ua_clear_zero_money"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_user_account"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"user_id",
"ua_balance",
"ua_deposit",
"ua_balance_time",
"ua_password",
"ua_state",
"ua_real_balance",
"ua_real_degree",
"create_time",
"update_time",
"donate_money",
"donate_able_money",
"ua_able_balance",
"refund_money",
"ua_consume_money",
"ua_clear_zero_money"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_user_account"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_user_account"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,76 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"equipment_id",
"user_id",
"fault_config_id",
"remark",
"create_time",
"update_time"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"table": [
"t_user_upload_fault"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"equipment_id",
"user_id",
"fault_config_id",
"remark",
"create_time",
"update_time"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [
"TRUNCATE TABLE t_user_upload_fault"
],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_user_upload_fault"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,124 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"prid",
"order_id",
"outtradeno",
"pay_time",
"pay_money",
"refund_time",
"refund_money",
"refund_state",
"order_time",
"pay_xml",
"refund_xml",
"check_xml",
"pay_state",
"pay_type",
"phone",
"check_time",
"user_id",
"create_time",
"update_time",
"donate_money",
"memo",
"refund_memo",
"refund_outtradno",
"refund_image",
"refund_operer",
"rechage_operer",
"refund_reason",
"vip",
"meal_id",
"refund_apply_time",
"pay_method"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `prid`, `order_id`, `outtradeno`, `pay_time`, `pay_money`, `refund_time`, `refund_money`, `refund_state`, `order_time`, `pay_xml`, `refund_xml`, `check_xml`, `pay_state`, `pay_type`, `phone`, `check_time`, `user_id`, `create_time`, `update_time`, `donate_money`, `memo`, `refund_memo`, `refund_outtradno`, `refund_image`, `refund_operer`, `rechage_operer`, `refund_reason`, `vip`, `meal_id`, `refund_apply_time`, `pay_method` FROM `t_account_recharge` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"prid",
"order_id",
"outtradeno",
"pay_time",
"pay_money",
"refund_time",
"refund_money",
"refund_state",
"order_time",
"pay_xml",
"refund_xml",
"check_xml",
"pay_state",
"pay_type",
"phone",
"check_time",
"user_id",
"create_time",
"update_time",
"donate_money",
"memo",
"refund_memo",
"refund_outtradno",
"refund_image",
"refund_operer",
"rechage_operer",
"refund_reason",
"vip",
"meal_id",
"refund_apply_time",
"pay_method"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_account_recharge"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,102 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"cash",
"phone",
"txt_desc",
"sign_msg",
"reason",
"sign",
"type",
"order_id",
"treatment",
"user_id",
"pay_status",
"pay_method",
"update_time",
"create_time",
"pre_balance",
"bef_balance",
"memo",
"donate_money",
"ua_balance",
"to_user_id"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `cash`, `phone`, `txt_desc`, `sign_msg`, `reason`, `sign`, `type`, `order_id`, `treatment`, `user_id`, `pay_status`, `pay_method`, `update_time`, `create_time`, `pre_balance`, `bef_balance`, `memo`, `donate_money`, `ua_balance`, `to_user_id` FROM `t_account_water` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"cash",
"phone",
"txt_desc",
"sign_msg",
"reason",
"sign",
"type",
"order_id",
"treatment",
"user_id",
"pay_status",
"pay_method",
"update_time",
"create_time",
"pre_balance",
"bef_balance",
"memo",
"donate_money",
"ua_balance",
"to_user_id"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_account_water"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,96 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"car_plate_no",
"car_sn",
"car_brand_name",
"car_model_name",
"car_vin",
"car_engine",
"car_type",
"car_owner_company_id",
"car_business",
"car_bus_path",
"is_auto_charge",
"user_id",
"user_card_no",
"is_disable",
"create_time",
"update_time",
"operator_id"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `car_plate_no`, `car_sn`, `car_brand_name`, `car_model_name`, `car_vin`, `car_engine`, `car_type`, `car_owner_company_id`, `car_business`, `car_bus_path`, `is_auto_charge`, `user_id`, `user_card_no`, `is_disable`, `create_time`, `update_time`, `operator_id` FROM `t_car` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"car_plate_no",
"car_sn",
"car_brand_name",
"car_model_name",
"car_vin",
"car_engine",
"car_type",
"car_owner_company_id",
"car_business",
"car_bus_path",
"is_auto_charge",
"user_id",
"user_card_no",
"is_disable",
"create_time",
"update_time",
"operator_id"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_car"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,130 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"company_no",
"company_type",
"company_name",
"company_state",
"company_logo",
"company_admin_phone",
"company_admin_name",
"balance_remind",
"balance_remind_phone",
"agent_id",
"station_set_type",
"specified_range",
"specified_operator_ids",
"is_company_discount",
"is_overlay_coupons",
"station_ids",
"no_discount_stationids",
"remark",
"invoice_eligible",
"refuse_invoice_tip",
"is_share_master",
"settlement_method",
"charge_discount_type",
"charge_discount",
"settle_status",
"charge_unit_service",
"charge_unit_electric",
"is_custom_price",
"company_order_permission",
"open_station_ids",
"create_time",
"update_time",
"minimum_recharge_amount",
"inner_person"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `company_no`, `company_type`, `company_name`, `company_state`, `company_logo`, `company_admin_phone`, `company_admin_name`, `balance_remind`, `balance_remind_phone`, `agent_id`, `station_set_type`, `specified_range`, `specified_operator_ids`, `is_company_discount`, `is_overlay_coupons`, `station_ids`, `no_discount_stationids`, `remark`, `invoice_eligible`, `refuse_invoice_tip`, `is_share_master`, `settlement_method`, `charge_discount_type`, `charge_discount`, `settle_status`, `charge_unit_service`, `charge_unit_electric`, `is_custom_price`, `company_order_permission`, `open_station_ids`, `create_time`, `update_time`, `minimum_recharge_amount`, `inner_person` FROM `t_company` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"company_no",
"company_type",
"company_name",
"company_state",
"company_logo",
"company_admin_phone",
"company_admin_name",
"balance_remind",
"balance_remind_phone",
"agent_id",
"station_set_type",
"specified_range",
"specified_operator_ids",
"is_company_discount",
"is_overlay_coupons",
"station_ids",
"no_discount_stationids",
"remark",
"invoice_eligible",
"refuse_invoice_tip",
"is_share_master",
"settlement_method",
"charge_discount_type",
"charge_discount",
"settle_status",
"charge_unit_service",
"charge_unit_electric",
"is_custom_price",
"company_order_permission",
"open_station_ids",
"create_time",
"update_time",
"minimum_recharge_amount",
"inner_person"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_company"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,74 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"info_value",
"type_id",
"create_time",
"update_time",
"remark",
"renzheng_flag"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `info_value`, `type_id`, `create_time`, `update_time`, `remark`, `renzheng_flag` FROM `t_company_info_value` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"info_value",
"type_id",
"create_time",
"update_time",
"remark",
"renzheng_flag"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_company_info_value"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,110 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"equipment_id",
"connector_sn",
"connector_short_sn",
"connector_no",
"connector_name",
"connector_type",
"voltage_upper_limits",
"voltage_lower_limits",
"current",
"power",
"parkno",
"appointment_id",
"appointment_user_id",
"open_lock_user_id",
"detection_type",
"is_ground_lock",
"is_ground_lock_msg",
"is_geomagnetic",
"is_geomagnetic_msg",
"is_appointment",
"is_appointment_msg",
"auto_open_lock_time",
"create_time",
"update_time"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `equipment_id`, `connector_sn`, `connector_short_sn`, `connector_no`, `connector_name`, `connector_type`, `voltage_upper_limits`, `voltage_lower_limits`, `current`, `power`, `parkno`, `appointment_id`, `appointment_user_id`, `open_lock_user_id`, `detection_type`, `is_ground_lock`, `is_ground_lock_msg`, `is_geomagnetic`, `is_geomagnetic_msg`, `is_appointment`, `is_appointment_msg`, `auto_open_lock_time`, `create_time`, `update_time` FROM `t_connector` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"equipment_id",
"connector_sn",
"connector_short_sn",
"connector_no",
"connector_name",
"connector_type",
"voltage_upper_limits",
"voltage_lower_limits",
"current",
"power",
"parkno",
"appointment_id",
"appointment_user_id",
"open_lock_user_id",
"detection_type",
"is_ground_lock",
"is_ground_lock_msg",
"is_geomagnetic",
"is_geomagnetic_msg",
"is_appointment",
"is_appointment_msg",
"auto_open_lock_time",
"create_time",
"update_time"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_connector"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,120 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"station_id",
"agreement_id",
"equipment_name",
"equipment_sn",
"equipment_short_sn",
"equipment_no",
"manufacturer_id",
"manufacturer_sn",
"manufacturer_name",
"equipment_model",
"production_date",
"equipment_type",
"equipment_type_msg",
"equipment_lng",
"equipment_lat",
"connector_count",
"power",
"national_standard",
"national_standard_msg",
"status",
"equipment_business_type",
"equipment_business_type_msg",
"is_use_card",
"is_use_card_msg",
"charge_host_esn",
"create_time",
"update_time",
"aux_power",
"app_show"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `station_id`, `agreement_id`, `equipment_name`, `equipment_sn`, `equipment_short_sn`, `equipment_no`, `manufacturer_id`, `manufacturer_sn`, `manufacturer_name`, `equipment_model`, `production_date`, `equipment_type`, `equipment_type_msg`, `equipment_lng`, `equipment_lat`, `connector_count`, `power`, `national_standard`, `national_standard_msg`, `status`, `equipment_business_type`, `equipment_business_type_msg`, `is_use_card`, `is_use_card_msg`, `charge_host_esn`, `create_time`, `update_time`, `aux_power`, `app_show` FROM `t_equipment` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"station_id",
"agreement_id",
"equipment_name",
"equipment_sn",
"equipment_short_sn",
"equipment_no",
"manufacturer_id",
"manufacturer_sn",
"manufacturer_name",
"equipment_model",
"production_date",
"equipment_type",
"equipment_type_msg",
"equipment_lng",
"equipment_lat",
"connector_count",
"power",
"national_standard",
"national_standard_msg",
"status",
"equipment_business_type",
"equipment_business_type_msg",
"is_use_card",
"is_use_card_msg",
"charge_host_esn",
"create_time",
"update_time",
"aux_power",
"app_show"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_equipment"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,282 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"user_id",
"company_id",
"station_id",
"equipment_id",
"connector_id",
"user_card_no",
"state",
"operate_state",
"order_no",
"platform_order_no",
"platform_sale_type",
"platform_driver_id",
"platform_phone",
"charging_amt",
"order_type",
"order_time",
"charge_begin_time",
"charge_end_time",
"charge_begin_degree",
"charge_end_degree",
"charge_degree",
"charge_ah",
"charge_times_degree",
"charge_begin_soc",
"charge_end_soc",
"charge_cur_soc",
"charge_duration",
"charge_settle_type",
"charge_unit_price",
"charge_unit_cost",
"charge_unit_service_fee",
"receivable_electric_fee",
"receivable_service_fee",
"receivable_total_fee",
"charge_elecfee_amount",
"charge_elecfee_cost_amount",
"charge_service_amount",
"actual_pay_amount",
"pay_order_no",
"pay_amount",
"pay_method",
"pay_status",
"pay_time",
"user_coupon_id",
"coupon_name",
"coupon_type",
"coupon_amount",
"elecfee_coupon_amount",
"servicefee_coupon_amount",
"invoice_id",
"invoice_fee",
"ticket_status",
"activity_electric_fee",
"activity_service_fee",
"charge_plate_no",
"charge_vin",
"charge_strategy",
"charge_strategy_param",
"operator_id",
"operator_income",
"plat_service_fee",
"charge_discount_type",
"settle_electric_fee",
"settle_service_fee",
"settle_fee",
"settle_method",
"settle_coupon_amount",
"settle_coupon_electric_fee",
"settle_coupon_service_fee",
"settle_status",
"cancel_type",
"cancel_code",
"cancel_msg",
"cancel_time",
"finish_type",
"finish_code",
"finish_msg",
"finish_time",
"boot_mode",
"settlement_type",
"is_parking_coupon",
"control_source",
"exception_flag",
"exception_msg",
"report_time",
"com_service_fee",
"com_electric_fee",
"com_total_fee",
"com_charge_discount_type",
"com_charge_discount",
"has_shallow_report",
"has_deep_report",
"is_exception",
"shallow_report_is_received",
"create_time",
"update_time",
"charge_market_id",
"coupon_total_amount",
"coupon_service_total_amount",
"coupon_elecfee_total_amount",
"activity_name",
"activity_total_fee",
"company_activity_id",
"company_activity_name",
"company_activity_total_fee",
"company_activity_service_fee",
"company_activity_electric_fee",
"subsidy_degree",
"subsidy_fee",
"special_channel_order_source"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `user_id`, `company_id`, `station_id`, `equipment_id`, `connector_id`, `user_card_no`, `state`, `operate_state`, `order_no`, `platform_order_no`, `platform_sale_type`, `platform_driver_id`, `platform_phone`, `charging_amt`, `order_type`, `order_time`, `charge_begin_time`, `charge_end_time`, `charge_begin_degree`, `charge_end_degree`, `charge_degree`, `charge_ah`, `charge_times_degree`, `charge_begin_soc`, `charge_end_soc`, `charge_cur_soc`, `charge_duration`, `charge_settle_type`, `charge_unit_price`, `charge_unit_cost`, `charge_unit_service_fee`, `receivable_electric_fee`, `receivable_service_fee`, `receivable_total_fee`, `charge_elecfee_amount`, `charge_elecfee_cost_amount`, `charge_service_amount`, `actual_pay_amount`, `pay_order_no`, `pay_amount`, `pay_method`, `pay_status`, `pay_time`, `user_coupon_id`, `coupon_name`, `coupon_type`, `coupon_amount`, `elecfee_coupon_amount`, `servicefee_coupon_amount`, `invoice_id`, `invoice_fee`, `ticket_status`, `activity_electric_fee`, `activity_service_fee`, `charge_plate_no`, `charge_vin`, `charge_strategy`, `charge_strategy_param`, `operator_id`, `operator_income`, `plat_service_fee`, `charge_discount_type`, `settle_electric_fee`, `settle_service_fee`, `settle_fee`, `settle_method`, `settle_coupon_amount`, `settle_coupon_electric_fee`, `settle_coupon_service_fee`, `settle_status`, `cancel_type`, `cancel_code`, `cancel_msg`, `cancel_time`, `finish_type`, `finish_code`, `finish_msg`, `finish_time`, `boot_mode`, `settlement_type`, `is_parking_coupon`, `control_source`, `exception_flag`, `exception_msg`, `report_time`, `com_service_fee`, `com_electric_fee`, `com_total_fee`, `com_charge_discount_type`, `com_charge_discount`, `has_shallow_report`, `has_deep_report`, `is_exception`, `shallow_report_is_received`, `create_time`, `update_time`, `charge_market_id`, `coupon_total_amount`, `coupon_service_total_amount`, `coupon_elecfee_total_amount`, `activity_name`, `activity_total_fee`, `company_activity_id`, `company_activity_name`, `company_activity_total_fee`, `company_activity_service_fee`, `company_activity_electric_fee`, `subsidy_degree`, `subsidy_fee`, `special_channel_order_source` FROM `t_equipment_charge_order` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"user_id",
"company_id",
"station_id",
"equipment_id",
"connector_id",
"user_card_no",
"state",
"operate_state",
"order_no",
"platform_order_no",
"platform_sale_type",
"platform_driver_id",
"platform_phone",
"charging_amt",
"order_type",
"order_time",
"charge_begin_time",
"charge_end_time",
"charge_begin_degree",
"charge_end_degree",
"charge_degree",
"charge_ah",
"charge_times_degree",
"charge_begin_soc",
"charge_end_soc",
"charge_cur_soc",
"charge_duration",
"charge_settle_type",
"charge_unit_price",
"charge_unit_cost",
"charge_unit_service_fee",
"receivable_electric_fee",
"receivable_service_fee",
"receivable_total_fee",
"charge_elecfee_amount",
"charge_elecfee_cost_amount",
"charge_service_amount",
"actual_pay_amount",
"pay_order_no",
"pay_amount",
"pay_method",
"pay_status",
"pay_time",
"user_coupon_id",
"coupon_name",
"coupon_type",
"coupon_amount",
"elecfee_coupon_amount",
"servicefee_coupon_amount",
"invoice_id",
"invoice_fee",
"ticket_status",
"activity_electric_fee",
"activity_service_fee",
"charge_plate_no",
"charge_vin",
"charge_strategy",
"charge_strategy_param",
"operator_id",
"operator_income",
"plat_service_fee",
"charge_discount_type",
"settle_electric_fee",
"settle_service_fee",
"settle_fee",
"settle_method",
"settle_coupon_amount",
"settle_coupon_electric_fee",
"settle_coupon_service_fee",
"settle_status",
"cancel_type",
"cancel_code",
"cancel_msg",
"cancel_time",
"finish_type",
"finish_code",
"finish_msg",
"finish_time",
"boot_mode",
"settlement_type",
"is_parking_coupon",
"control_source",
"exception_flag",
"exception_msg",
"report_time",
"com_service_fee",
"com_electric_fee",
"com_total_fee",
"com_charge_discount_type",
"com_charge_discount",
"has_shallow_report",
"has_deep_report",
"is_exception",
"shallow_report_is_received",
"create_time",
"update_time",
"charge_market_id",
"coupon_total_amount",
"coupon_service_total_amount",
"coupon_elecfee_total_amount",
"activity_name",
"activity_total_fee",
"company_activity_id",
"company_activity_name",
"company_activity_total_fee",
"company_activity_service_fee",
"company_activity_electric_fee",
"subsidy_degree",
"subsidy_fee",
"special_channel_order_source"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_equipment_charge_order"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,106 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"order_no",
"charge_degree",
"service_fee",
"electric_fee",
"cost_fee",
"service_fee_unit_price",
"electric_fee_unit_price",
"cost_fee_unit_price",
"activity_service_fee",
"activity_electric_fee",
"charge_startr_time",
"charge_end_time",
"charge_meal_electric_fee",
"charge_meal_service_fee",
"charge_meal_total_fee",
"electric_card_use_dgree",
"check_electric_unit_price",
"check_service_unit_price",
"time_flag",
"create_time",
"update_time",
"detail_more"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `order_no`, `charge_degree`, `service_fee`, `electric_fee`, `cost_fee`, `service_fee_unit_price`, `electric_fee_unit_price`, `cost_fee_unit_price`, `activity_service_fee`, `activity_electric_fee`, `charge_startr_time`, `charge_end_time`, `charge_meal_electric_fee`, `charge_meal_service_fee`, `charge_meal_total_fee`, `electric_card_use_dgree`, `check_electric_unit_price`, `check_service_unit_price`, `time_flag`, `create_time`, `update_time`, `detail_more` FROM `t_equipment_charge_order_detail` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"order_no",
"charge_degree",
"service_fee",
"electric_fee",
"cost_fee",
"service_fee_unit_price",
"electric_fee_unit_price",
"cost_fee_unit_price",
"activity_service_fee",
"activity_electric_fee",
"charge_startr_time",
"charge_end_time",
"charge_meal_electric_fee",
"charge_meal_service_fee",
"charge_meal_total_fee",
"electric_card_use_dgree",
"check_electric_unit_price",
"check_service_unit_price",
"time_flag",
"create_time",
"update_time",
"detail_more"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_equipment_charge_order_detail"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,118 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"order_no",
"telephone",
"user_id",
"message1",
"message2",
"create_time",
"station_id",
"equipment_id",
"connector_id",
"flag",
"close_time",
"finish_time",
"minutesDifference",
"reduce_money",
"beforeBalance",
"afterBalance",
"fee_station",
"manual_count",
"last_manual_time",
"last_manual_message",
"person_id",
"refund_status",
"refund_time",
"refund_person_id",
"refund_person_name",
"refund_amount",
"refund_type",
"unplug_time"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `order_no`, `telephone`, `user_id`, `message1`, `message2`, `create_time`, `station_id`, `equipment_id`, `connector_id`, `flag`, `close_time`, `finish_time`, `minutesDifference`, `reduce_money`, `beforeBalance`, `afterBalance`, `fee_station`, `manual_count`, `last_manual_time`, `last_manual_message`, `person_id`, `refund_status`, `refund_time`, `refund_person_id`, `refund_person_name`, `refund_amount`, `refund_type`, `unplug_time` FROM `t_ext_hurry_quit` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"order_no",
"telephone",
"user_id",
"message1",
"message2",
"create_time",
"station_id",
"equipment_id",
"connector_id",
"flag",
"close_time",
"finish_time",
"minutesDifference",
"reduce_money",
"beforeBalance",
"afterBalance",
"fee_station",
"manual_count",
"last_manual_time",
"last_manual_message",
"person_id",
"refund_status",
"refund_time",
"refund_person_id",
"refund_person_name",
"refund_amount",
"refund_type",
"unplug_time"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_ext_hurry_quit"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,224 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"station_sn",
"operator_id",
"equioment_owner_id",
"station_name",
"country_code",
"region_id",
"region_code",
"regional_name",
"regional_code",
"address",
"station_tel",
"service_tel",
"station_type",
"station_type_msg",
"station_business_type",
"station_business_type_msg",
"station_status",
"station_status_msg",
"park_nums",
"station_lng",
"station_lat",
"site_guide",
"construction",
"construction_msg",
"pictures",
"match_cars",
"park_info",
"business_start_time",
"business_end_time",
"electricity_fee",
"service_fee",
"is_park_fee",
"park_fee",
"payment",
"payment_msg",
"support_order",
"support_order_msg",
"service_item",
"service_item_image_url",
"service_item_msg",
"station_location_type",
"station_location_type_msg",
"station_charge_type",
"station_charge_type_msg",
"station_power",
"station_voltage",
"station_current",
"is_open",
"is_open_msg",
"is_display",
"is_display_msg",
"sharing_code",
"sharing_applet_picture",
"theme_picture",
"is_barrier_flag",
"is_barrier_flag_msg",
"charge_settle_type",
"charge_settle_type_msg",
"fast_connector_nums",
"slow_connector_nums",
"transformer_capacity",
"installed_capacity",
"remark",
"record_unique_no",
"equipment_owner_name",
"supply_type",
"resident_no",
"watt_hour_meter_no",
"forward_power",
"operation_date",
"charge_replace_type",
"is_hlht",
"is_subsidy",
"create_time",
"update_time",
"area_code_countryside",
"business_expand_type",
"capacity",
"video_monitor",
"electricity_type",
"receive_shop"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `station_sn`, `operator_id`, `equioment_owner_id`, `station_name`, `country_code`, `region_id`, `region_code`, `regional_name`, `regional_code`, `address`, `station_tel`, `service_tel`, `station_type`, `station_type_msg`, `station_business_type`, `station_business_type_msg`, `station_status`, `station_status_msg`, `park_nums`, `station_lng`, `station_lat`, `site_guide`, `construction`, `construction_msg`, `pictures`, `match_cars`, `park_info`, `business_start_time`, `business_end_time`, `electricity_fee`, `service_fee`, `is_park_fee`, `park_fee`, `payment`, `payment_msg`, `support_order`, `support_order_msg`, `service_item`, `service_item_image_url`, `service_item_msg`, `station_location_type`, `station_location_type_msg`, `station_charge_type`, `station_charge_type_msg`, `station_power`, `station_voltage`, `station_current`, `is_open`, `is_open_msg`, `is_display`, `is_display_msg`, `sharing_code`, `sharing_applet_picture`, `theme_picture`, `is_barrier_flag`, `is_barrier_flag_msg`, `charge_settle_type`, `charge_settle_type_msg`, `fast_connector_nums`, `slow_connector_nums`, `transformer_capacity`, `installed_capacity`, `remark`, `record_unique_no`, `equipment_owner_name`, `supply_type`, `resident_no`, `watt_hour_meter_no`, `forward_power`, `operation_date`, `charge_replace_type`, `is_hlht`, `is_subsidy`, `create_time`, `update_time`, `area_code_countryside`, `business_expand_type`, `capacity`, `video_monitor`, `electricity_type`, `receive_shop` FROM `t_station` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"station_sn",
"operator_id",
"equioment_owner_id",
"station_name",
"country_code",
"region_id",
"region_code",
"regional_name",
"regional_code",
"address",
"station_tel",
"service_tel",
"station_type",
"station_type_msg",
"station_business_type",
"station_business_type_msg",
"station_status",
"station_status_msg",
"park_nums",
"station_lng",
"station_lat",
"site_guide",
"construction",
"construction_msg",
"pictures",
"match_cars",
"park_info",
"business_start_time",
"business_end_time",
"electricity_fee",
"service_fee",
"is_park_fee",
"park_fee",
"payment",
"payment_msg",
"support_order",
"support_order_msg",
"service_item",
"service_item_image_url",
"service_item_msg",
"station_location_type",
"station_location_type_msg",
"station_charge_type",
"station_charge_type_msg",
"station_power",
"station_voltage",
"station_current",
"is_open",
"is_open_msg",
"is_display",
"is_display_msg",
"sharing_code",
"sharing_applet_picture",
"theme_picture",
"is_barrier_flag",
"is_barrier_flag_msg",
"charge_settle_type",
"charge_settle_type_msg",
"fast_connector_nums",
"slow_connector_nums",
"transformer_capacity",
"installed_capacity",
"remark",
"record_unique_no",
"equipment_owner_name",
"supply_type",
"resident_no",
"watt_hour_meter_no",
"forward_power",
"operation_date",
"charge_replace_type",
"is_hlht",
"is_subsidy",
"create_time",
"update_time",
"area_code_countryside",
"business_expand_type",
"capacity",
"video_monitor",
"electricity_type",
"receive_shop"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_station"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,70 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"create_time",
"update_time",
"time_fq",
"teme_ve"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `create_time`, `update_time`, `time_fq`, `teme_ve` FROM `t_time_day` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"create_time",
"update_time",
"time_fq",
"teme_ve"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_time_day"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,150 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"user_name",
"nicker_name",
"sex",
"phone",
"qk_openid",
"open_id",
"ali_user_id",
"birthday",
"avatar",
"app_type",
"password",
"upper_user",
"master_flag",
"user_type",
"multi_charge",
"relation_phone",
"user_owner_id",
"union_id",
"state",
"reg_channel",
"reg_time",
"city_label_code",
"city_label",
"reg_source",
"create_time",
"update_time",
"operator",
"invite_code",
"identity_id",
"operator_id",
"address",
"vip_level",
"province_code",
"province",
"work_company",
"is_bind_wxinfo",
"company_min_charge_balance",
"enable_online_recharge",
"integral",
"shared_user",
"enable_online_refund",
"recommenderId",
"lx_wx_user_id",
"phone_area"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `user_name`, `nicker_name`, `sex`, `phone`, `qk_openid`, `open_id`, `ali_user_id`, `birthday`, `avatar`, `app_type`, `password`, `upper_user`, `master_flag`, `user_type`, `multi_charge`, `relation_phone`, `user_owner_id`, `union_id`, `state`, `reg_channel`, `reg_time`, `city_label_code`, `city_label`, `reg_source`, `create_time`, `update_time`, `operator`, `invite_code`, `identity_id`, `operator_id`, `address`, `vip_level`, `province_code`, `province`, `work_company`, `is_bind_wxinfo`, `company_min_charge_balance`, `enable_online_recharge`, `integral`, `shared_user`, `enable_online_refund`, `recommenderId`, `lx_wx_user_id`, `phone_area` FROM `t_user` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"user_name",
"nicker_name",
"sex",
"phone",
"qk_openid",
"open_id",
"ali_user_id",
"birthday",
"avatar",
"app_type",
"password",
"upper_user",
"master_flag",
"user_type",
"multi_charge",
"relation_phone",
"user_owner_id",
"union_id",
"state",
"reg_channel",
"reg_time",
"city_label_code",
"city_label",
"reg_source",
"create_time",
"update_time",
"operator",
"invite_code",
"identity_id",
"operator_id",
"address",
"vip_level",
"province_code",
"province",
"work_company",
"is_bind_wxinfo",
"company_min_charge_balance",
"enable_online_recharge",
"integral",
"shared_user",
"enable_online_refund",
"recommenderId",
"lx_wx_user_id",
"phone_area"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_user"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,94 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"user_id",
"ua_balance",
"ua_deposit",
"ua_balance_time",
"ua_password",
"ua_state",
"ua_real_balance",
"ua_real_degree",
"create_time",
"update_time",
"donate_money",
"donate_able_money",
"ua_able_balance",
"refund_money",
"ua_consume_money",
"ua_clear_zero_money"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `user_id`, `ua_balance`, `ua_deposit`, `ua_balance_time`, `ua_password`, `ua_state`, `ua_real_balance`, `ua_real_degree`, `create_time`, `update_time`, `donate_money`, `donate_able_money`, `ua_able_balance`, `refund_money`, `ua_consume_money`, `ua_clear_zero_money` FROM `t_user_account` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"user_id",
"ua_balance",
"ua_deposit",
"ua_balance_time",
"ua_password",
"ua_state",
"ua_real_balance",
"ua_real_degree",
"create_time",
"update_time",
"donate_money",
"donate_able_money",
"ua_able_balance",
"refund_money",
"ua_consume_money",
"ua_clear_zero_money"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_user_account"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,74 +0,0 @@
{
"job": {
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"column": [
"id",
"equipment_id",
"user_id",
"fault_config_id",
"remark",
"create_time",
"update_time"
],
"connection": [
{
"jdbcUrl": [
"${src_jdbc}"
],
"querySql": [
"SELECT `id`, `equipment_id`, `user_id`, `fault_config_id`, `remark`, `create_time`, `update_time` FROM `t_user_upload_fault` ORDER BY id DESC LIMIT 10000"
]
}
],
"username": "${src_user}",
"password": "${src_pwd}"
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"loadUrl": [
"${dest_load_url}"
],
"column": [
"id",
"equipment_id",
"user_id",
"fault_config_id",
"remark",
"create_time",
"update_time"
],
"username": "${dest_user}",
"password": "${dest_pwd}",
"postSql": [],
"preSql": [],
"flushInterval": 30000,
"connection": [
{
"jdbcUrl": "${dest_jdbc}",
"selectedDatabase": "yltcharge",
"table": [
"t_user_upload_fault"
]
}
],
"loadProps": {
"format": "json",
"strip_outer_array": true
}
}
}
}
],
"setting": {
"speed": {
"channel": "1"
}
}
}
}

View File

@@ -1,193 +0,0 @@
#!/bin/bash
# 环境变量补丁 (针对 Crontab 环境下可能找不到 java 的问题)
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
[ -f /etc/profile ] && . /etc/profile
[ -f ~/.bash_profile ] && . ~/.bash_profile
[ -f ~/.profile ] && . ~/.profile
# 配置路径
DATAX_HOME="/usr/local/datax"
# 获取当前脚本所在目录
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# JSON配置文件目录指向 json_full
CONF_DIR="$SCRIPT_DIR/json_full"
BIN_DIR="$DATAX_HOME/bin"
DATAX_PY="$BIN_DIR/datax.py"
# 明确指定要执行的15个文件(全量同步)
JOBS=(
"t_equipment_charge_order.json"
"t_equipment_charge_order_detail.json"
"t_account_recharge.json"
"t_account_water.json"
"t_car.json"
"t_company.json"
"t_company_info_value.json"
"t_connector.json"
"t_equipment.json"
"t_station.json"
"t_ext_hurry_quit.json"
"t_time_day.json"
"t_user.json"
"t_user_account.json"
"t_user_upload_fault.json"
)
# 定义全局参数
PARAMS="-Dsrc_user=ylt -Dsrc_pwd=Ycharge666 -Dsrc_jdbc=jdbc:mysql://rm-bp1ux6tuk49er80t9xo.mysql.rds.aliyuncs.com:3306/yltcharge -Ddest_user=root -Ddest_pwd=DsideaL147258369 -Ddest_load_url=10.10.14.204:8030 -Ddest_jdbc=jdbc:mysql://10.10.14.204:9030/yltcharge"
# 在脚本最开始记录开始时间
SCRIPT_START_TIME=$(date '+%Y-%m-%d %H:%M:%S')
SCRIPT_START_TIMESTAMP=$(date +%s)
echo "DataX全量同步脚本 (Full Sync)"
echo "=========================="
echo "DataX路径: $DATAX_PY"
echo "配置文件目录: $CONF_DIR"
echo "任务数量: ${#JOBS[@]}"
echo "脚本开始时间: $SCRIPT_START_TIME"
echo "=========================="
# 切换到配置文件目录
cd "$CONF_DIR" || {
echo "错误: 无法进入配置文件目录 $CONF_DIR"
exit 1
}
echo "当前目录: $(pwd)"
echo
# 执行计数器
SUCCESS_COUNT=0
FAIL_COUNT=0
TOTAL=${#JOBS[@]}
CURRENT=0
# 数组存储每个任务的执行详情
declare -a TASK_RESULTS=()
declare -a TASK_DURATIONS=()
declare -a TASK_STATUSES=()
for JOB in "${JOBS[@]}"; do
CURRENT=$((CURRENT + 1))
echo "任务 [$CURRENT/$TOTAL] $JOB"
echo "任务开始时间: $(date '+%H:%M:%S')"
echo "----------------------------------------"
# 检查文件是否存在
if [ ! -f "$JOB" ]; then
echo "✗ 错误: 文件不存在 - $JOB"
FAIL_COUNT=$((FAIL_COUNT + 1))
TASK_RESULTS+=("$JOB")
TASK_STATUSES+=("文件不存在")
TASK_DURATIONS+=("0")
echo "----------------------------------------"
continue
fi
# 记录开始时间(用于计算耗时)
START_TIME=$(date +%s)
# 执行任务 (添加 -p 参数传递变量)
/usr/bin/python "$DATAX_PY" -p "$PARAMS" "$JOB"
EXIT_CODE=$?
# 计算耗时
END_TIME=$(date +%s)
DURATION=$((END_TIME - START_TIME))
# 保存任务详情
TASK_RESULTS+=("$JOB")
TASK_DURATIONS+=("$DURATION")
# 处理执行结果
if [ $EXIT_CODE -eq 0 ]; then
echo "✓ 成功: $JOB (耗时: ${DURATION}秒)"
SUCCESS_COUNT=$((SUCCESS_COUNT + 1))
TASK_STATUSES+=("成功")
else
echo "✗ 失败: $JOB (耗时: ${DURATION}秒)"
echo "错误代码: $EXIT_CODE"
FAIL_COUNT=$((FAIL_COUNT + 1))
TASK_STATUSES+=("失败")
# 询问是否继续执行后续任务
# 全量同步失败可能需要人工干预,但这里保持自动询问或直接继续
# 为方便自动化,这里改为仅提示,不阻塞 (或者保持原样)
# 保持原样:
# echo "----------------------------------------"
# read -p "任务失败,是否继续执行下一个任务?(y/n): " -n 1 -r
# echo
# if [[ ! $REPLY =~ ^[Yy]$ ]]; then
# echo "用户选择停止执行"
# break
# fi
fi
echo "任务结束时间: $(date '+%H:%M:%S')"
echo "----------------------------------------"
echo
# 可选:任务间等待时间(秒)
# sleep 1
done
# 记录脚本结束时间
SCRIPT_END_TIME=$(date '+%Y-%m-%d %H:%M:%S')
SCRIPT_END_TIMESTAMP=$(date +%s)
TOTAL_DURATION=$((SCRIPT_END_TIMESTAMP - SCRIPT_START_TIMESTAMP))
echo "=========================="
echo "执行结果汇总 (Full Sync)"
echo "=========================="
echo "脚本开始时间: $SCRIPT_START_TIME"
echo "脚本结束时间: $SCRIPT_END_TIME"
echo "脚本总耗时: ${TOTAL_DURATION}秒"
echo "=========================="
echo "任务执行详情:"
echo "----------------------------------------"
# 输出每个任务的执行结果
for i in "${!TASK_RESULTS[@]}"; do
STATUS_ICON="✓"
if [ "${TASK_STATUSES[$i]}" = "失败" ] || [ "${TASK_STATUSES[$i]}" = "文件不存在" ]; then
STATUS_ICON="✗"
fi
printf "%-40s %-2s %-10s %-8s秒\n" \
"${TASK_RESULTS[$i]}" \
"$STATUS_ICON" \
"${TASK_STATUSES[$i]}" \
"${TASK_DURATIONS[$i]}"
done
echo "----------------------------------------"
echo "汇总统计:"
echo "总任务数: $TOTAL"
echo "成功: $SUCCESS_COUNT"
echo "失败: $FAIL_COUNT"
if [ $TOTAL -gt 0 ]; then
SUCCESS_RATE=$((SUCCESS_COUNT * 100 / TOTAL))
echo "成功率: ${SUCCESS_RATE}%"
fi
# 计算平均耗时
if [ ${#TASK_DURATIONS[@]} -gt 0 ]; then
TOTAL_TASK_TIME=0
VALID_TASKS=0
for duration in "${TASK_DURATIONS[@]}"; do
if [ "$duration" -gt 0 ]; then
TOTAL_TASK_TIME=$((TOTAL_TASK_TIME + duration))
VALID_TASKS=$((VALID_TASKS + 1))
fi
done
if [ $VALID_TASKS -gt 0 ]; then
AVG_DURATION=$((TOTAL_TASK_TIME / VALID_TASKS))
echo "平均任务耗时: ${AVG_DURATION}秒"
fi
fi
echo "=========================="

View File

@@ -1,184 +0,0 @@
#!/bin/bash
# 环境变量补丁 (针对 Crontab 环境下可能找不到 java 的问题)
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
[ -f /etc/profile ] && . /etc/profile
[ -f ~/.bash_profile ] && . ~/.bash_profile
[ -f ~/.profile ] && . ~/.profile
# 配置路径
DATAX_HOME="/usr/local/datax"
# 获取当前脚本所在目录
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# JSON配置文件目录指向 json_inc
CONF_DIR="$SCRIPT_DIR/json_inc"
BIN_DIR="$DATAX_HOME/bin"
DATAX_PY="$BIN_DIR/datax.py"
# 明确指定要执行的15个文件(增量同步)
JOBS=(
"t_equipment_charge_order.json"
"t_equipment_charge_order_detail.json"
"t_account_recharge.json"
"t_account_water.json"
"t_car.json"
"t_company.json"
"t_company_info_value.json"
"t_connector.json"
"t_equipment.json"
"t_station.json"
"t_ext_hurry_quit.json"
"t_time_day.json"
"t_user.json"
"t_user_account.json"
"t_user_upload_fault.json"
)
# 定义全局参数
PARAMS="-Dsrc_user=ylt -Dsrc_pwd=Ycharge666 -Dsrc_jdbc=jdbc:mysql://rm-bp1ux6tuk49er80t9xo.mysql.rds.aliyuncs.com:3306/yltcharge -Ddest_user=root -Ddest_pwd=DsideaL147258369 -Ddest_load_url=10.10.14.204:8030 -Ddest_jdbc=jdbc:mysql://10.10.14.204:9030/yltcharge"
# 在脚本最开始记录开始时间
SCRIPT_START_TIME=$(date '+%Y-%m-%d %H:%M:%S')
SCRIPT_START_TIMESTAMP=$(date +%s)
echo "DataX增量同步脚本 (Incremental Sync)"
echo "=========================="
echo "DataX路径: $DATAX_PY"
echo "配置文件目录: $CONF_DIR"
echo "任务数量: ${#JOBS[@]}"
echo "脚本开始时间: $SCRIPT_START_TIME"
echo "注意: 增量模式下不执行 Truncate,请确保目标表为 Unique Key 模型以实现 Upsert 效果"
echo "策略: 每次同步最近10000条数据(按ID倒序),利用Doris主键机制自动覆盖更新"
echo "=========================="
# 切换到配置文件目录
cd "$CONF_DIR" || {
echo "错误: 无法进入配置文件目录 $CONF_DIR"
exit 1
}
echo "当前目录: $(pwd)"
echo
# 执行计数器
SUCCESS_COUNT=0
FAIL_COUNT=0
TOTAL=${#JOBS[@]}
CURRENT=0
# 数组存储每个任务的执行详情
declare -a TASK_RESULTS=()
declare -a TASK_DURATIONS=()
declare -a TASK_STATUSES=()
for JOB in "${JOBS[@]}"; do
CURRENT=$((CURRENT + 1))
echo "任务 [$CURRENT/$TOTAL] $JOB"
echo "任务开始时间: $(date '+%H:%M:%S')"
echo "----------------------------------------"
# 检查文件是否存在
if [ ! -f "$JOB" ]; then
echo "✗ 错误: 文件不存在 - $JOB"
FAIL_COUNT=$((FAIL_COUNT + 1))
TASK_RESULTS+=("$JOB")
TASK_STATUSES+=("文件不存在")
TASK_DURATIONS+=("0")
echo "----------------------------------------"
continue
fi
# 记录开始时间(用于计算耗时)
START_TIME=$(date +%s)
# 执行任务 (添加 -p 参数传递变量)
/usr/bin/python "$DATAX_PY" -p "$PARAMS" "$JOB"
EXIT_CODE=$?
# 计算耗时
END_TIME=$(date +%s)
DURATION=$((END_TIME - START_TIME))
# 保存任务详情
TASK_RESULTS+=("$JOB")
TASK_DURATIONS+=("$DURATION")
# 处理执行结果
if [ $EXIT_CODE -eq 0 ]; then
echo "✓ 成功: $JOB (耗时: ${DURATION}秒)"
SUCCESS_COUNT=$((SUCCESS_COUNT + 1))
TASK_STATUSES+=("成功")
else
echo "✗ 失败: $JOB (耗时: ${DURATION}秒)"
echo "错误代码: $EXIT_CODE"
FAIL_COUNT=$((FAIL_COUNT + 1))
TASK_STATUSES+=("失败")
# 增量任务通常无人值守,失败不暂停
fi
echo "任务结束时间: $(date '+%H:%M:%S')"
echo "----------------------------------------"
echo
# 可选:任务间等待时间(秒)
# sleep 1
done
# 记录脚本结束时间
SCRIPT_END_TIME=$(date '+%Y-%m-%d %H:%M:%S')
SCRIPT_END_TIMESTAMP=$(date +%s)
TOTAL_DURATION=$((SCRIPT_END_TIMESTAMP - SCRIPT_START_TIMESTAMP))
echo "=========================="
echo "执行结果汇总 (Incremental Sync)"
echo "=========================="
echo "脚本开始时间: $SCRIPT_START_TIME"
echo "脚本结束时间: $SCRIPT_END_TIME"
echo "脚本总耗时: ${TOTAL_DURATION}秒"
echo "=========================="
echo "任务执行详情:"
echo "----------------------------------------"
# 输出每个任务的执行结果
for i in "${!TASK_RESULTS[@]}"; do
STATUS_ICON="✓"
if [ "${TASK_STATUSES[$i]}" = "失败" ] || [ "${TASK_STATUSES[$i]}" = "文件不存在" ]; then
STATUS_ICON="✗"
fi
printf "%-40s %-2s %-10s %-8s秒\n" \
"${TASK_RESULTS[$i]}" \
"$STATUS_ICON" \
"${TASK_STATUSES[$i]}" \
"${TASK_DURATIONS[$i]}"
done
echo "----------------------------------------"
echo "汇总统计:"
echo "总任务数: $TOTAL"
echo "成功: $SUCCESS_COUNT"
echo "失败: $FAIL_COUNT"
if [ $TOTAL -gt 0 ]; then
SUCCESS_RATE=$((SUCCESS_COUNT * 100 / TOTAL))
echo "成功率: ${SUCCESS_RATE}%"
fi
# 计算平均耗时
if [ ${#TASK_DURATIONS[@]} -gt 0 ]; then
TOTAL_TASK_TIME=0
VALID_TASKS=0
for duration in "${TASK_DURATIONS[@]}"; do
if [ "$duration" -gt 0 ]; then
TOTAL_TASK_TIME=$((TOTAL_TASK_TIME + duration))
VALID_TASKS=$((VALID_TASKS + 1))
fi
done
if [ $VALID_TASKS -gt 0 ]; then
AVG_DURATION=$((TOTAL_TASK_TIME / VALID_TASKS))
echo "平均任务耗时: ${AVG_DURATION}秒"
fi
fi
echo "=========================="

View File

@@ -1,86 +0,0 @@
#!/bin/bash
# ==========================================
# DataX 增量同步定时任务配置脚本
# 适用系统: Rocky Linux 9 / CentOS / RHEL
# 功能: 添加每10分钟执行一次的 crontab 任务
# ==========================================
# 1. 基础配置
# 假设您将整个文件夹上传到了 /usr/local/datax
WORK_DIR="/usr/local/datax"
SCRIPT_NAME="run_jobs_inc.sh"
SCRIPT_PATH="$WORK_DIR/$SCRIPT_NAME"
# 日志存放位置,建议单独放在 logs 目录
LOG_FILE="$WORK_DIR/logs/datax_inc_cron.log"
# 2. 检查环境
echo "正在检查环境..."
# 检查工作目录
if [ ! -d "$WORK_DIR" ]; then
echo "错误: 工作目录 $WORK_DIR 不存在"
echo "请先将 DataX 配置相关文件上传至服务器的 $WORK_DIR"
exit 1
fi
# 检查脚本是否存在
if [ ! -f "$SCRIPT_PATH" ]; then
echo "错误: 执行脚本 $SCRIPT_PATH 不存在"
echo "请确保 $SCRIPT_NAME 位于 $WORK_DIR 目录下"
exit 1
fi
# 创建日志目录
if [ ! -d "$(dirname "$LOG_FILE")" ]; then
mkdir -p "$(dirname "$LOG_FILE")"
echo "创建日志目录: $(dirname "$LOG_FILE")"
fi
# 3. 赋予执行权限
echo "正在赋予脚本执行权限..."
chmod +x "$SCRIPT_PATH"
# 4. 配置 Crontab
# 任务定义: 每10分钟执行一次 (*/10)
# >> $LOG_FILE 2>&1 : 将标准输出和错误输出都追加写入日志文件
CRON_CMD="*/10 * * * * /bin/bash $SCRIPT_PATH >> $LOG_FILE 2>&1"
# 检查任务是否已存在 (避免重复添加)
# 使用 grep 查找包含脚本路径的行
EXISTING_JOB=$(crontab -l 2>/dev/null | grep "$SCRIPT_PATH")
if [ -n "$EXISTING_JOB" ]; then
echo "警告: 检测到该脚本的定时任务已存在:"
echo " $EXISTING_JOB"
echo "----------------------------------------"
read -p "是否先删除旧任务再重新添加? (y/n): " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "已取消操作,未修改 Crontab。"
exit 0
fi
# 移除旧任务 (通过 grep -v 反向过滤掉包含脚本路径的行)
# 注意: 这会保留其他不相关的定时任务
crontab -l 2>/dev/null | grep -v "$SCRIPT_PATH" | crontab -
echo "旧任务已移除"
fi
# 添加新任务
# (crontab -l; echo "new job") | crontab - 这种写法可以保留原有任务并追加新任务
(crontab -l 2>/dev/null; echo "$CRON_CMD") | crontab -
# 5. 验证与提示
echo "----------------------------------------"
echo "✅ 定时任务设置成功!"
echo "----------------------------------------"
echo "当前用户的 Crontab 列表:"
crontab -l
echo "----------------------------------------"
echo "执行策略: 每10分钟执行一次"
echo "日志文件: $LOG_FILE"
echo "----------------------------------------"
echo "提示: 请确保 crond 服务正在运行"
echo "检查命令: systemctl status crond"
echo "启动命令: systemctl start crond"

View File

@@ -1,60 +0,0 @@
#!/bin/bash
# ==========================================
# DataX 增量同步定时任务停止脚本
# 适用系统: Rocky Linux 9 / CentOS / RHEL
# 功能: 移除 run_jobs_inc.sh 的 crontab 任务
# 场景: 全量同步前防止增量任务干扰
# ==========================================
# 1. 基础配置 (需与 start_cron.sh 保持一致以确保匹配正确)
WORK_DIR="/usr/local/datax"
SCRIPT_NAME="run_jobs_inc.sh"
SCRIPT_PATH="$WORK_DIR/$SCRIPT_NAME"
# 2. 检查任务是否存在
echo "正在检查定时任务..."
# 使用 grep 查找包含脚本路径的行
EXISTING_JOB=$(crontab -l 2>/dev/null | grep "$SCRIPT_PATH")
if [ -z "$EXISTING_JOB" ]; then
echo "----------------------------------------"
echo "提示: 未发现该脚本的定时任务,无需停止。"
echo "目标脚本: $SCRIPT_PATH"
echo "----------------------------------------"
exit 0
fi
echo "发现正在运行的定时任务:"
echo " $EXISTING_JOB"
echo "----------------------------------------"
# 3. 移除任务
echo "正在移除任务..."
# 备份当前的 crontab
BACKUP_FILE="/tmp/crontab_backup_$(date +%Y%m%d_%H%M%S).txt"
crontab -l > "$BACKUP_FILE" 2>/dev/null
echo "已备份当前 Crontab 到: $BACKUP_FILE"
# 核心逻辑: 移除包含脚本路径的行
# grep -v "$SCRIPT_PATH" : 排除包含脚本路径的行
# crontab - : 将过滤后的内容重新写入 crontab
crontab -l 2>/dev/null | grep -v "$SCRIPT_PATH" | crontab -
# 4. 验证结果
REMAINING_JOB=$(crontab -l 2>/dev/null | grep "$SCRIPT_PATH")
if [ -z "$REMAINING_JOB" ]; then
echo "----------------------------------------"
echo "✅ 增量同步定时任务已成功停止 (移除)!"
echo "----------------------------------------"
echo "当前用户的 Crontab 列表:"
crontab -l
echo "----------------------------------------"
echo "现在您可以安全地执行全量同步操作了。"
else
echo "❌ 停止失败,任务仍然存在。请尝试手动编辑: crontab -e"
exit 1
fi

View File

@@ -1,102 +0,0 @@
# DataX 同步部署与使用说明
#### 一、下载与安装 DataX
1. **下载 DataX 包**
官方下载地址:https://datax-opensource.oss-cn-hangzhou.aliyuncs.com/202309/datax.tar.gz
2. **部署到服务器**
将压缩包上传并解压到 `/usr/local/` 目录:
```shell
cd /usr/local
tar zxvf datax.tar.gz
# 解压后应当存在 /usr/local/datax 目录
```
#### 二、配置部署
本方案包含**全量同步**和**增量同步**两套策略,请按以下步骤部署配置文件和脚本。
1. **上传文件**
请将本地 `d:\dsWork\aiData\Doc\6、DataX配置\` 目录下的以下内容上传至服务器 `/usr/local/datax/` 根目录下:
* 文件夹 `json_full/` (存放全量JSON配置)
* 文件夹 `json_inc/` (存放增量JSON配置)
* 脚本 `run_jobs_full.sh`
* 脚本 `run_jobs_inc.sh`
* 脚本 `setup_cron.sh`
**上传后的服务器目录结构应如下所示:**
```text
/usr/local/datax/
├── bin/
├── conf/
├── json_full/ <-- 新增:全量配置目录
├── json_inc/ <-- 新增:增量配置目录
├── run_jobs_full.sh <-- 新增:全量执行脚本
├── run_jobs_inc.sh <-- 新增:增量执行脚本
└── setup_cron.sh <-- 新增:定时任务安装脚本
```
2. **赋予执行权限**
```shell
cd /usr/local/datax
chmod +x *.sh
```
3. **修改数据库密码 (如有需要)**
脚本中已配置好默认的数据库连接信息。如需修改,请编辑 `run_jobs_full.sh` 和 `run_jobs_inc.sh` 中的 `PARAMS` 变量:
```bash
PARAMS="-Dsrc_user=... -Dsrc_pwd=... -Ddest_user=... -Ddest_pwd=..."
```
#### 三、运行策略说明
**1. 全量同步 (Full Sync)**
* **适用场景**:系统初始化,或数据出现严重偏差需要彻底重跑时。
* **同步逻辑**:
1. 执行 `TRUNCATE` 清空 Doris 目标表。
2. 从 MySQL 读取全量数据写入 Doris。
* **手动执行命令**:
```shell
cd /usr/local/datax
./run_jobs_full.sh
```
**2. 增量同步 (Incremental Sync)**
* **适用场景**:日常持续数据同步(高频)。
* **同步逻辑**:
1. **不删除**任何历史数据(无空窗期)。
2. 读取 MySQL 中 ID 最大的 **10000条** 记录(覆盖新增和最近更新的数据)。
3. 推送到 Doris,利用 Doris 的 **Unique Key** 主键模型自动完成“存在即更新,不存在即插入” (Upsert)。
* **手动执行命令**:
```shell
cd /usr/local/datax
./run_jobs_inc.sh
```
#### 四、自动化定时任务配置
我们提供了一键配置脚本,用于在 Rocky Linux 9 / CentOS 等系统中设置自动调度。
1. **执行安装脚本**
```shell
cd /usr/local/datax
./setup_cron.sh
```
*该脚本会自动添加 Crontab 任务,配置为每 10 分钟执行一次增量同步。*
2. **验证与日志**
* **查看任务**:`crontab -l`
* **查看日志**:自动同步的日志会保存在 `/usr/local/datax/logs/datax_inc_cron.log`
```shell
tail -f /usr/local/datax/logs/datax_inc_cron.log
```
#### 五、重要注意事项
1. **Doris 表模型要求**
目标 Doris 表必须使用 **Unique Key** 模型(建表时指定 `UNIQUE KEY(id)`),否则增量同步会导致大量重复数据。
2. **Python 环境**
DataX 依赖 Python 环境(推荐 Python 2.7 或 3.x)。脚本默认调用 `/usr/bin/python`,如果您的 Python 路径不同,请修改脚本头部的 `DATAX_PY` 变量。

176
DouYin/Test/T1_GetCookie.py Normal file
View File

@@ -0,0 +1,176 @@
"""
Douyin Cookie Fetcher (T1)
用途: 模拟打开浏览器,用户扫码登录后自动获取 Cookie 并保存到 config_douyin.yml
"""
import sys
import os
import json
import yaml
import asyncio
import io
from pathlib import Path
# 强制设置控制台输出编码为 UTF-8,解决 Windows 环境下的乱码问题
if sys.platform.startswith('win'):
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
# =================================================================
# 1. 环境配置与路径初始化
# =================================================================
current_file_path = os.path.abspath(__file__)
current_dir = os.path.dirname(current_file_path)
config_path = os.path.join(current_dir, "config_douyin.yml")
# =================================================================
# 2. Cookie 过滤与更新逻辑
# =================================================================
# 我们关注的核心 Cookie 键名
# 进一步扩大范围以包含所有可能的校验 Cookie
REQUIRED_KEYS = {
"msToken", "ttwid", "odin_tt", "passport_csrf_token", "sid_guard",
"sessionid", "sid_tt", "uid_tt", "uid_tt_ss", "sid_ucp_v1",
"ssid_ucp_v1", "n_sdk_version", "s_v_web_id", "webid",
"__ac_nonce", "__ac_signature", "fp", "device_web_cpu_core",
"device_web_memory_size", "architecture", "hevc_supported"
}
def update_config_yaml(new_cookies):
"""将获取到的 Cookie 更新到 config_douyin.yml"""
config_data = {}
# 1. 读取现有配置
if os.path.exists(config_path):
try:
with open(config_path, 'r', encoding='utf-8') as f:
config_data = yaml.safe_load(f) or {}
except Exception as e:
print(f"[ Warning ]: Failed to read existing config: {e}")
# 2. 更新 cookies 字段
if "cookies" not in config_data:
config_data["cookies"] = {}
# 过滤出我们需要的键
filtered_cookies = {k: v for k, v in new_cookies.items() if k in REQUIRED_KEYS}
config_data["cookies"].update(filtered_cookies)
# 同时更新全局 cookie 字符串 - 包含所有捕获到的 cookie 以确保完整性
cookie_str = "; ".join(f"{k}={v}" for k, v in new_cookies.items())
config_data["cookie"] = cookie_str
# 3. 写回文件
try:
with open(config_path, 'w', encoding='utf-8') as f:
yaml.dump(config_data, f, allow_unicode=True, default_flow_style=False, sort_keys=False)
print(f"\n[ Success ]: Cookie updated to: {config_path}")
print(f"[ Info ]: Captured {len(new_cookies)} total cookies, {len(filtered_cookies)} essential keys saved.")
except Exception as e:
print(f"[ Error ]: Failed to write config: {e}")
# =================================================================
# 3. Playwright 自动化逻辑
# =================================================================
async def main():
try:
from playwright.async_api import async_playwright
except ImportError:
print("[ Error ]: Playwright not installed. Run: pip install playwright && playwright install chromium")
return
print("\n" + "="*60)
print(" Douyin Login & Cookie Fetcher")
print("="*60)
print("[ Instructions ]:")
print("1. Browser will open and navigate to Douyin.")
print("2. Please login via QR code scanning.")
print("3. After login, return here and press [ENTER] to save cookies.")
print("="*60 + "\n")
async with async_playwright() as p:
# 启动浏览器
browser = await p.chromium.launch(headless=False)
context = await browser.new_context(
viewport={'width': 1280, 'height': 800},
user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36'
)
page = await context.new_page()
# 跳转到抖音
# 优化: 使用 'domcontentloaded' 提高在弱网环境下的加载成功率,并增加超时到 90s
print("[ Navigating ]: https://www.douyin.com/ ...")
try:
await page.goto("https://www.douyin.com/", wait_until="domcontentloaded", timeout=90000)
except Exception as e:
print(f"[ Warning ]: Initial navigation timed out or failed: {e}")
print("[ Info ]: Will continue anyway, please check if the page is visible.")
# =================================================================
# 自动检测登录 + 手动回车双重保险
# =================================================================
print("\n" + "-"*40)
print("[ Waiting ]: Please complete the QR login in the browser.")
print("[ Auto-Detect ]: The script will automatically proceed if login is detected.")
print("[ Manual ]: If auto-detect fails, type 'go' and press [ENTER] here.")
print("-"*40 + "\n")
# 尝试自动检测登录成功的元素(比如头像或“发布视频”按钮)
login_detected = False
for _ in range(120): # 最多等待 120 秒
try:
# 检查是否存在登录后的特有元素
# .dy-avatar 是头像,.upload-video-text 是发布视频按钮
if await page.query_selector('.dy-avatar') or await page.query_selector('text=发布视频'):
print("[ Success ]: Login detected automatically!")
login_detected = True
break
except:
pass
await asyncio.sleep(1)
if not login_detected:
# 如果自动检测没成功,再尝试手动输入
print("[ Timeout ]: Auto-detection timed out. Please ensure you are logged in.")
print("[ Action ]: Type anything and press [ENTER] to force capture cookies:")
await asyncio.to_thread(sys.stdin.readline)
# 获取所有 Cookie
all_cookies = await context.cookies()
cookie_dict = {c['name']: c['value'] for c in all_cookies}
# 尝试捕获动态参数 msToken (如果存在于页面中)
try:
# 1. 尝试从 localStorage 获取
ms_token = await page.evaluate("() => window.localStorage.getItem('msToken') || ''")
# 2. 如果没获取到,尝试从所有 Cookie 中找最新的 msToken
if not ms_token:
ms_token = cookie_dict.get('msToken', '')
# 3. 尝试从页面全局变量中寻找
if not ms_token:
ms_token = await page.evaluate("() => window._ROUTER_DATA?.msToken || ''")
if ms_token:
cookie_dict['msToken'] = ms_token
print(f"[ Info ]: Captured msToken: {ms_token[:20]}...")
else:
print("[ Warning ]: msToken not found in common locations.")
except Exception as e:
print(f"[ Debug ]: Error capturing msToken: {e}")
# 关闭浏览器
await context.close()
await browser.close()
# 更新配置文件
if cookie_dict:
update_config_yaml(cookie_dict)
else:
print("[ Failed ]: No cookies captured. Did you login successfully?")
if __name__ == "__main__":
asyncio.run(main())

203
DouYin/Test/T2_BigV.py Normal file
View File

@@ -0,0 +1,203 @@
"""
Douyin User Profile & Video Crawler (T2)
访问注释中的页面,获取页面中的内容信息(用户信息及最近作品)
URL: https://www.douyin.com/user/MS4wLjABAAAA2P7MeZl0VUsDmCzKbZeLlVGVTDRAuXmvr_zcC6XNqd-6R4n9ssCguSgA-gnBfjUO
"""
import sys
import os
import re
import json
import yaml
import time
import io
from datetime import datetime
# 强制设置控制台输出编码为 UTF-8,解决 Windows 环境下的乱码问题
if sys.platform.startswith('win'):
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
# =================================================================
# 1. 环境配置与路径初始化
# =================================================================
current_file_path = os.path.abspath(__file__)
current_dir = os.path.dirname(current_file_path)
douyin_root = os.path.dirname(current_dir)
# 将 DouYin 根目录添加到 sys.path
if douyin_root not in sys.path:
sys.path.append(douyin_root)
# 尝试导入核心爬虫模块
try:
from apiproxy.douyin.douyin import Douyin
from apiproxy.douyin import douyin_headers
except ImportError as e:
print(f"[ Error ]: Failed to import core modules. Error: {e}")
sys.exit(1)
# =================================================================
# 2. 工具函数定义
# =================================================================
def extract_url_from_file(file_path):
"""从文件头部的注释中提取抖音用户 URL"""
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
urls = re.findall(r'https?://(?:www\.)?douyin\.com/user/[a-zA-Z0-9\-_]+', content)
return urls[0] if urls else None
except Exception as e:
print(f"[ Error ]: Failed to read script file: {e}")
return None
def load_config():
"""从 Test 目录或项目根目录加载 config_douyin.yml 配置"""
# 优先检查当前 Test 目录
test_config_path = os.path.join(current_dir, "config_douyin.yml")
# 其次检查 DouYin 根目录
root_config_path = os.path.join(douyin_root, "config_douyin.yml")
config_path = test_config_path if os.path.exists(test_config_path) else root_config_path
if os.path.exists(config_path):
try:
with open(config_path, 'r', encoding='utf-8') as f:
print(f"[ Info ]: Loading config from: {os.path.abspath(config_path)}")
return yaml.safe_load(f)
except Exception as e:
print(f"[ Warning ]: Failed to parse config: {e}")
else:
print(f"[ Warning ]: config_douyin.yml not found.")
return {}
def setup_cookies(config):
"""设置 Douyin 请求所需的 Cookie"""
# 优先使用完整的全局 cookie 字符串
cookie_str = config.get("cookie", "")
cookies_dict = config.get("cookies", {})
if cookie_str:
# 如果有 raw cookie,确保 msToken 也被包含进去(如果 dict 中有的话)
if cookies_dict.get("msToken") and "msToken=" not in cookie_str:
cookie_str = f"msToken={cookies_dict['msToken']}; " + cookie_str
douyin_headers["Cookie"] = cookie_str
print(f"[ Info ]: Using raw cookie string (Length: {len(cookie_str)})")
elif cookies_dict:
cookie_str = "; ".join(f"{k}={v}" for k, v in cookies_dict.items())
douyin_headers["Cookie"] = cookie_str
print(f"[ Info ]: Using combined cookies from dict (Count: {len(cookies_dict)})")
if not douyin_headers.get("Cookie"):
print("[ Warning ]: No valid Cookie detected. Most API calls will fail.")
print(" Please run T1_GetCookie.py first.")
# =================================================================
# 3. 核心爬取逻辑
# =================================================================
def crawl_user_profile(url):
"""获取用户信息及其最近的作品列表"""
dy = Douyin()
# 增加接口重试的超时时间
dy.timeout = 30
print(f"[ Start ]: Target URL: {url}")
# 步骤 1: 解析 URL 获取 sec_uid
print("[ Step 1/2 ]: Fetching blogger profile...")
try:
# 使用 getKey 获取 sec_uid
key_type, sec_uid = dy.getKey(url)
if key_type != "user" or not sec_uid:
print(f"[ Failed ]: Invalid URL or failed to parse sec_uid. Type: {key_type}")
return
print(f" (sec_uid: {sec_uid[:15]}...)")
# 获取详细信息
# 现在核心类 Douyin 已更新,会自动从 Cookie 中提取并拼接 msToken
print(f"[ Step 1/2 ]: Fetching blogger profile...")
user_detail = dy.getUserDetailInfo(sec_uid)
if not user_detail or user_detail.get("status_code") != 0:
print(f"[ Failed ]: Failed to fetch profile. Status: {user_detail.get('status_code') if user_detail else 'None'}")
if user_detail:
print(f" Msg: {user_detail.get('status_msg', 'Unknown error')}")
print(" Hint: Please check if Cookie is expired or network is restricted.")
return
except Exception as e:
print(f"[ Error ]: An unexpected error occurred: {e}")
return
user_data = user_detail.get("user", {})
nickname = user_data.get('nickname', 'Unknown')
# 打印博主信息
print("\n" + "="*60)
print(f"Blogger: {nickname}")
print("-" * 60)
print(f"ID: {user_data.get('unique_id') or user_data.get('short_id', 'Unknown')}")
print(f"Bio: {user_data.get('signature', 'N/A')}")
print(f"Followers:{user_data.get('m_follower_count') or user_data.get('follower_count', 0)}")
print(f"Likes: {user_data.get('total_favorited', 0)}")
print(f"Following:{user_data.get('following_count', 0)}")
print("="*60 + "\n")
# 步骤 3: 获取最近的作品列表
print(f"[ Step 2/2 ]: Fetching recent works...")
aweme_list = dy.getUserInfo(sec_uid, count=10)
result_data = {
"user_info": user_data,
"recent_videos": aweme_list or [],
"crawl_time": datetime.now().strftime('%Y-%m-%d %H:%M:%S')
}
if aweme_list:
print(f"Successfully fetched {len(aweme_list)} videos:\n")
for i, aweme in enumerate(aweme_list, 1):
ctime = aweme.get('create_time')
if isinstance(ctime, (int, float)):
ctime_str = datetime.fromtimestamp(ctime).strftime('%Y-%m-%d %H:%M')
else:
ctime_str = str(ctime)
desc = aweme.get('desc', 'No Title')
desc = (desc[:47] + "...") if len(desc) > 50 else desc
stats = aweme.get('statistics', {})
print(f"{i:02d}. [{ctime_str}] {desc}")
print(f" ❤️ {stats.get('digg_count', 0):<8} 💬 {stats.get('comment_count', 0):<8} ⭐ {stats.get('collect_count', 0)}")
print(f" 🔗 https://www.douyin.com/video/{aweme.get('aweme_id')}\n")
else:
print("[ Info ]: No public videos found. Account might be private or API limited.")
# 步骤 4: 保存数据
output_file = os.path.join(current_dir, f"user_data_{sec_uid[:8]}.json")
try:
with open(output_file, 'w', encoding='utf-8') as f:
json.dump(result_data, f, ensure_ascii=False, indent=4)
print(f"[ Success ]: Data saved to: {os.path.basename(output_file)}")
except Exception as e:
print(f"[ Warning ]: Failed to save data: {e}")
# =================================================================
# 4. 主入口
# =================================================================
if __name__ == "__main__":
# 提取 URL
target_url = extract_url_from_file(current_file_path)
if target_url:
# 配置环境
config = load_config()
setup_cookies(config)
# 执行爬取
crawl_user_profile(target_url)
else:
print("[ Error ]: No valid Douyin URL found in file comments.")

View File

@@ -0,0 +1,16 @@
cookie: __ac_nonce=069a13bcc00cacbb09800; __ac_signature=_02B4Z6wo00f01EiD5NQAAIDB-WNazgGqWRxIo8BAAHuJ33;
ttwid=1%7CxZrCypV7044-lvm6_oK7nlsTEtEn-H_yJXdZRYjRQg0%7C1772174285%7C38825b7026cf7c8724e4070f81748a477168eb58988b8e09b67142bc6441a676;
enter_pc_once=1; UIFID_TEMP=630dc87f7218843564944b22829d362b9fabe9a9e3376a5c74988083749b66dffd3737bb90e0acf82e6707c6ee24f7522fbefdc12d5a2fed2eae91b09db43c67688ba5ad520d1d6f6b294f7ef3c3442efbc0a4ff34b6c60edb3ff06d5e120b4a2376474bd59208bc08755ec54934cb80;
x-web-secsdk-uid=9d7866f1-5873-4d35-8b7d-7d0117b45b3f; s_v_web_id=verify_mm4ital2_ERFXSBBL_FxRH_4tEN_A3jj_V3VIL6WSh4u6;
=douyin.com; device_web_cpu_core=20; device_web_memory_size=8; architecture=amd64;
hevc_supported=true; IsDouyinActive=true; home_can_add_dy_2_desktop=%220%22; dy_swidth=1280;
dy_sheight=800; stream_recommend_feed_params=%22%7B%5C%22cookie_enabled%5C%22%3Atrue%2C%5C%22screen_width%5C%22%3A1280%2C%5C%22screen_height%5C%22%3A800%2C%5C%22browser_online%5C%22%3Atrue%2C%5C%22cpu_core_num%5C%22%3A20%2C%5C%22device_memory%5C%22%3A8%2C%5C%22downlink%5C%22%3A10%2C%5C%22effective_type%5C%22%3A%5C%224g%5C%22%2C%5C%22round_trip_time%5C%22%3A0%7D%22
cookies:
msToken: my7nuKyrpTVEWOX-n62wR8I5EcvoMKBmvsBMnODLOtG3sn6AsR7q_jEM5jmEenyuwmHpsL25b84VhGcR4nUgv0PepA2zrSUOGHCmZVzpauYpRgbR9svMKjt2-AgNRz
ttwid: 1%7CxZrCypV7044-lvm6_oK7nlsTEtEn-H_yJXdZRYjRQg0%7C1772174285%7C38825b7026cf7c8724e4070f81748a477168eb58988b8e09b67142bc6441a676
s_v_web_id: verify_mm4ital2_ERFXSBBL_FxRH_4tEN_A3jj_V3VIL6WSh4u6
odin_tt: 6f33402fa0952cdea7eaa5226bfe0a2a45ee10bbb138835da6a5383e9eef092f7ad0a1790c0271a090f72c8112875fef3665d50460b79ec302ba56c2b91f52b3bcab4b209cce3f4b7378f995b01a5cce
path: ./Downloaded/
thread: 5
number:
post: 10

File diff suppressed because it is too large Load Diff

View File

@@ -2,4 +2,4 @@
# -*- coding: utf-8 -*-
ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36'

View File

@@ -9,10 +9,10 @@ douyin_headers = {
'referer': 'https://www.douyin.com/',
'accept': 'application/json, text/plain, */*',
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
'accept-encoding': 'gzip, deflate, br',
'accept-encoding': 'gzip, deflate',
'sec-ch-ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"macOS"',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin'

View File

@@ -165,7 +165,7 @@ class Douyin(object):
# 单作品接口返回 'aweme_detail'
# 主页作品接口返回 'aweme_list'->['aweme_detail']
# 更新API参数以适应最新接口要求
detail_params = f'aweme_id={aweme_id}&device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=MacIntel&browser_name=Chrome&browser_version=122.0.0.0&browser_online=true&engine_name=Blink&engine_version=122.0.0.0&os_name=Mac&os_version=10.15.7&cpu_core_num=8&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=50&update_version_code=170400'
detail_params = f'aweme_id={aweme_id}&device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=122.0.0.0&browser_online=true&engine_name=Blink&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=8&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=50&update_version_code=170400'
jx_url = self.urls.POST_DETAIL + utils.getXbogus(detail_params)
response = requests.get(url=jx_url, headers=douyin_headers, timeout=10)
@@ -280,7 +280,15 @@ class Douyin(object):
while True:
try:
# 构建请求URL - 添加更多必需参数
base_params = f'sec_user_id={sec_uid}&count={count}&max_cursor={max_cursor}&device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=MacIntel&browser_name=Chrome&browser_version=122.0.0.0&browser_online=true&engine_name=Blink&engine_version=122.0.0.0&os_name=Mac&os_version=10.15.7&cpu_core_num=8&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=50'
base_params = f'sec_user_id={sec_uid}&count={count}&max_cursor={max_cursor}&device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=122.0.0.0&browser_online=true&engine_name=Blink&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=8&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=50'
# 尝试从 cookie 中提取 msToken
cookie_str = douyin_headers.get('Cookie', '')
if 'msToken=' in cookie_str:
import re
ms_token_match = re.search(r'msToken=([^;]+)', cookie_str)
if ms_token_match:
base_params += f"&msToken={ms_token_match.group(1)}"
if mode == "post":
url = self.urls.USER_POST + utils.getXbogus(base_params)
@@ -415,7 +423,7 @@ class Douyin(object):
while True:
# 接口不稳定, 有时服务器不返回数据, 需要重新获取
try:
live_params = f'aid=6383&device_platform=web&web_rid={web_rid}&channel=channel_pc_web&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=MacIntel&browser_name=Chrome&browser_version=122.0.0.0&browser_online=true&engine_name=Blink&engine_version=122.0.0.0&os_name=Mac&os_version=10.15.7&cpu_core_num=8&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=50'
live_params = f'aid=6383&device_platform=web&web_rid={web_rid}&channel=channel_pc_web&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=122.0.0.0&browser_online=true&engine_name=Blink&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=8&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=50'
live_api = self.urls.LIVE + utils.getXbogus(live_params)
response = requests.get(live_api, headers=douyin_headers)
@@ -870,19 +878,39 @@ class Douyin(object):
while True:
# 接口不稳定, 有时服务器不返回数据, 需要重新获取
try:
user_detail_params = f'sec_user_id={sec_uid}&device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=MacIntel&browser_name=Chrome&browser_version=122.0.0.0&browser_online=true&engine_name=Blink&engine_version=122.0.0.0&os_name=Mac&os_version=10.15.7&cpu_core_num=8&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=50'
user_detail_params = f'sec_user_id={sec_uid}&device_platform=webapp&aid=6383&channel=channel_pc_web&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=122.0.0.0&browser_online=true&engine_name=Blink&engine_version=122.0.0.0&os_name=Windows&os_version=10&cpu_core_num=8&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=50'
# 尝试从 cookie 中提取 msToken
cookie_str = douyin_headers.get('Cookie', '')
if 'msToken=' in cookie_str:
import re
ms_token_match = re.search(r'msToken=([^;]+)', cookie_str)
if ms_token_match:
user_detail_params += f"&msToken={ms_token_match.group(1)}"
url = self.urls.USER_DETAIL + utils.getXbogus(user_detail_params)
res = requests.get(url=url, headers=douyin_headers)
datadict = json.loads(res.text)
if datadict is not None and datadict["status_code"] == 0:
return datadict
res = requests.get(url=url, headers=douyin_headers, timeout=10)
if not res.text.strip():
logger.warning(f"getUserDetailInfo: Empty response (Status: {res.status_code})")
else:
try:
datadict = json.loads(res.text)
if datadict is not None and datadict.get("status_code") == 0:
return datadict
else:
logger.warning(f"getUserDetailInfo: API error (Status: {datadict.get('status_code')}, Msg: {datadict.get('status_msg')})")
except json.JSONDecodeError:
logger.error(f"getUserDetailInfo: JSON decode error (Status: {res.status_code})")
except Exception as e:
end = time.time() # 结束时间
if end - start > self.timeout:
print("[ 提示 ]:重复请求该接口" + str(self.timeout) + "s, 仍然未获取到数据")
return datadict
logger.error(f"getUserDetailInfo: Exception: {e}")
end = time.time() # 结束时间
if end - start > self.timeout:
print("[ 提示 ]:重复请求该接口" + str(self.timeout) + "s, 仍然未获取到数据")
return datadict
time.sleep(1) # 增加小延迟避免请求过快
if __name__ == "__main__":

57
LingYa/Banana.py Normal file
View File

@@ -0,0 +1,57 @@
import asyncio
import json
import os
import sys
# Add project root to path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from Util.BananaClient import BananaClient
import logging
# Configure logging to show info level
logging.basicConfig(level=logging.INFO)
# 强制刷新 stdout
def print_flush(*args, **kwargs):
print(*args, **kwargs)
sys.stdout.flush()
async def main():
print_flush("=== Testing LingYa Image Gen via Util.BananaClient ===")
# 使用 LingYa 提供商初始化客户端
# 配置信息会自动从 Config/ExternalCfg.py 读取
client = BananaClient(provider="LingYa")
prompt = "A futuristic city with flying bananas"
try:
# 使用项目配置中的默认模型 (nano-banana)
print_flush(f"\nGenerating image with prompt: '{prompt}'...")
print_flush(f"Model: {client.model}")
# 调用集成后的 generate_image 方法
# Util.BananaClient 统一了接口调用
result = await client.generate_image(
prompt,
n=1,
size="1024x1024"
)
print_flush("\n[Generation Result]:")
print_flush(json.dumps(result, indent=2, ensure_ascii=False))
# 获取并打印 URL
urls = await client.get_image_urls(result)
if urls:
for url in urls:
print_flush(f"\nImage URL: {url}")
else:
print_flush("\nNo image URLs found in response.")
except Exception as e:
print_flush(f"Test failed: {e}")
if __name__ == "__main__":
asyncio.run(main())

49
LingYa/ChatLlm.py Normal file
View File

@@ -0,0 +1,49 @@
import sys
import os
import asyncio
import logging
import traceback
# Add project root to path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
# Configure logging
logging.basicConfig(level=logging.INFO)
from Util.GeminiClient import GeminiClient
async def main():
print("=== Testing LingYa LLM via Util.GeminiClient ===")
try:
# 使用 LingYa 提供商初始化客户端
client = GeminiClient(provider="LingYa")
messages = [
{"role": "developer", "content": "你是一个幽默的助手。"},
{"role": "user", "content": "用一句话形容程序员的生活。"}
]
# 使用 gpt-5.2 进行测试,流式响应更稳定
# 项目默认配置可能是 gemini-3-pro-preview
# model = Config.LINGYA_API_GEMINI_MODEL
model = "gpt-5.2"
print(f"Requesting with model: {model}")
print(f"\n[Response]:")
async for content in client.send_chat_completion_stream(messages, model=model):
print(content, end="", flush=True)
print("\n")
except BaseException as e:
print(f"Test failed: {e}")
traceback.print_exc()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("\nInterrupted by user")
except BaseException as e:
print(f"\nMain failed: {e}")
traceback.print_exc()

61
LingYa/Claude.py Normal file
View File

@@ -0,0 +1,61 @@
API_KEY = "sk-bSjxX2X1FAptXPcBjItcMcbRvcGFZTtRRcUf52BGQr1dscZM"
import asyncio
import json
from typing import AsyncIterator, List, Dict, Any, Optional
import httpx
API_URL = "https://api.lingyaai.cn/v1/messages"
ANTHROPIC_VERSION = "2023-06-01"
async def stream_messages(
messages: List[Dict[str, Any]],
model: str = "claude-sonnet-4-5-20250929",
max_tokens: Optional[int] = None,
) -> AsyncIterator[str]:
headers = {
"anthropic-version": ANTHROPIC_VERSION,
"content-type": "application/json",
"x-api-key": API_KEY,
}
payload: Dict[str, Any] = {
"model": model,
"messages": messages,
"stream": True,
}
if max_tokens is not None:
payload["max_tokens"] = max_tokens
async with httpx.AsyncClient(trust_env=False, timeout=None) as client:
# print(f"Connecting to {API_URL}...")
async with client.stream("POST", API_URL, json=payload, headers=headers) as resp:
# print(f"Response status: {resp.status_code}")
resp.raise_for_status()
async for line in resp.aiter_lines():
if not line:
continue
if line.startswith("data: "):
line = line[6:]
try:
obj = json.loads(line)
except Exception:
continue
t = obj.get("type")
if t == "content_block_delta":
delta = obj.get("delta", {})
text = delta.get("text")
if text:
yield text
elif t == "message_stop":
break
async def stream_text(prompt: str, **kwargs) -> None:
msgs = [{"role": "user", "content": prompt}]
async for chunk in stream_messages(msgs, **kwargs):
print(chunk, end="", flush=True)
if __name__ == "__main__":
asyncio.run(stream_text("讲个故事"))

BIN
LingYa/Images/AIAdvisor.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 KiB

BIN
LingYa/Images/Community.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

0
LingYa/__init__.py Normal file
View File

Binary file not shown.

138
LingYa/testBanana.py Normal file
View File

@@ -0,0 +1,138 @@
import requests
import json
import time
import os
import sys
# API配置
url = 'https://api.lingyaai.cn/v1/images/generations'
api_key = 'sk-bSjxX2X1FAptXPcBjItcMcbRvcGFZTtRRcUf52BGQr1dscZM'
# 图片保存目录
save_dir = r'd:\dsWork\dsProject\dsLightRag\LingYa\Images'
if not os.path.exists(save_dir):
os.makedirs(save_dir)
# 请求头
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
style_prompt = (
"Mobile APP UI Design, Full Screen Flat UI Screenshot. "
"View: Direct front view, strictly NO hands, NO holding device. "
"Target Audience: Parents of K12 students. Theme: 'Growth & Nature'. "
"Language: Simplified Chinese (简体中文). "
"Style: Fresh, Creative, Nature-inspired, Clean, Spacious. NOT traditional/boring. "
"Color Palette: Light Green (Primary), Soft White, Earthy accents. Fresh and airy look. "
"Decorations: Green leaves, small growing trees, cute kittens, cartoon style elements. "
"Layout: Creative non-grid layouts, rounded organic shapes, less text density, high visual hierarchy. "
"Quality: 4k resolution, figma style, vector illustration."
)
pages = [
{
"name": "智能档案",
"filename": "SmartArchive.jpg",
"content_prompt": "Page Title: '智能档案' (Smart Archive). "
"HERO SECTION (Top Half): Two Massive, Colorful, Creative Cards for Quick Actions: "
"1. '语音日记' (Voice Diary) with a microphone & kitten icon. "
"2. '拍照识别' (Photo Scan) with a camera & leaf icon. "
"These must be the biggest elements. "
"Growth Section: A beautiful illustration of a 'Growth Tree' (Little Tree) representing the student's progress. "
"Bottom: Minimalist stats summary (no dense tables). "
"Visuals: Fresh green tones, organic shapes, feeling of life and growth."
},
{
"name": "AI军师",
"filename": "AIAdvisor.jpg",
"content_prompt": "Page Title: 'AI军师' (AI Advisor). "
"Character: A friendly 'Professional Cartoon Teacher' (wearing glasses, smart look) or a 'Wise Owl' sitting on a branch. "
"Chat Interface: Clean bubbles floating among falling leaves. "
"Input Area: Modern input field with voice icon. "
"Suggestions: '如何提高专注力?', '考前焦虑怎么办?' displayed as leaves on a vine. "
"Visuals: Calming green background, trustworthy but fun teacher character."
},
{
"name": "知识智库",
"filename": "KnowledgeBase.jpg",
"content_prompt": "Page Title: '知识智库' (Knowledge Base). "
"Layout: 'Garden of Knowledge' concept. "
"Categories: Represented as different plants or fruits (e.g., 'Study Methods' is an Apple tree). "
"Cards: Minimalist cards with high-quality thumbnails (book covers, abstract concepts). "
"Text: Minimal title text, very clean. "
"Visuals: Airy, light, breathable design. No clutter."
},
{
"name": "社区连接",
"filename": "Community.jpg",
"content_prompt": "Page Title: '社区连接' (Community). "
"Layout: Modern Card Feed with soft shadows. "
"Interactions: 'Like' button is a flower blooming, 'Comment' is a leaf. "
"Content: Happy parent sharing a moment (photo of a child smiling). "
"Visuals: Warm community vibe but keeping the fresh green theme. Cartoon avatars for users."
}
]
def log(msg):
print(msg)
with open("test_banana_run.log", "a", encoding="utf-8") as f:
f.write(msg + "\n")
def download_image(url, save_path):
try:
response = requests.get(url, stream=True, timeout=30)
if response.status_code == 200:
with open(save_path, 'wb') as f:
for chunk in response.iter_content(1024):
f.write(chunk)
log(f"✅ 图片已保存: {save_path}")
else:
log(f"❌ 下载失败,状态码: {response.status_code}")
except Exception as e:
log(f"❌ 下载图片失败: {e}")
log(f"开始生成 {len(pages)} 张APP界面设计图,并保存至 {save_dir}...\n")
for i, page in enumerate(pages):
log(f"[{i+1}/{len(pages)}] 正在生成: {page['name']} ...")
full_prompt = f"{style_prompt} {page['content_prompt']}"
data = {
"model": "nano-banana-pro",
"prompt": full_prompt,
"n": 1,
"size": "1024x1024",
"response_format": "url"
}
try:
log(f"Sending request for {page['name']}...")
response = requests.post(url, headers=headers, json=data, timeout=60)
if response.status_code == 200:
result = response.json()
img_url = None
if 'data' in result:
if isinstance(result['data'], list) and len(result['data']) > 0:
img_url = result['data'][0].get('url')
elif isinstance(result['data'], dict):
img_url = result['data'].get('url')
if img_url:
log(f"生成成功,URL: {img_url}")
save_path = os.path.join(save_dir, page['filename'])
download_image(img_url, save_path)
else:
log(f"❌ 未找到图片URL, 完整响应: {result}")
else:
log(f"❌ 生成失败: {page['name']}")
log(f"状态码: {response.status_code}")
log(f"错误信息: {response.text}")
except Exception as e:
log(f"❌ 请求异常: {e}")
time.sleep(1)

151
LingYa/说明.md Normal file
View File

@@ -0,0 +1,151 @@
AI家庭教育助手——"智伴成长"产品建设方案
一、产品概述
产品名称:智伴成长(SmartParent)
核心定位:面向K12阶段家长的家庭教育AI顾问,通过智能化手段解决家长在教育过程中的信息差、方法缺失和情绪焦虑问题。
核心价值主张:做家长最懂教育的AI军师,将不确定的教育困境转化为可执行的确定性方案。
二、目标用户分析
2.1 核心用户画像
主要用户:K12阶段学生的家长,以母亲为主力群体
典型特征:
• 教育焦虑感强,对孩子的学习和成长高度关注
• 具备一定的付费意愿,但时间碎片化严重
• 并非教育专业人士,面对复杂教育问题时缺乏系统方法论
• 需要情感支持,希望获得"被理解"的感觉而非单纯的知识灌输
痛点场景: 孩子成绩突然下滑时,家长知道要干预但不知道从何入手;面对青春期叛逆,想沟通却怕说错话;海量教育信息中难以辨别真伪,担心错过关键决策点。
2.2 用户需求分层
基础需求:快速获取教育问题的解决方案,如作业辅导、错题分析、学习方法指导
进阶需求:获得个性化的教育规划建议,了解孩子的能力短板和发展路径
情感需求:缓解焦虑情绪,获得情绪支持和共鸣,确认自己的教育方式没有方向性错误
社交需求:了解其他家长的类似经历和成功方案,获得群体参照和认同感
________________________________________
三、核心功能模块设计
3.1 智能档案系统——降低记录门槛
这是产品的数据入口层,设计理念是"让家长用最自然的方式记录,而不是增加负担"。
语音日记功能:家长可以在接送孩子路上、睡前等碎片时间,用语音简单描述当天发生的教育相关事件。系统自动提取关键信息,生成时间轴式的成长记录。
拍照识别功能:支持拍摄试卷、作业、成绩单、奖状等各类教育场景图片。系统自动识别文字内容,分析知识点掌握情况,无需家长手动录入。
全景画像功能:基于持续积累的数据,自动为孩子建立多维标签体系,如学习习惯特征、学科能力分布、情绪行为模式等,形成可视化的"数字双胞胎"。
关键设计原则:每次记录都必须有即时反馈。家长上传一张试卷,系统立即输出分析报告,而不是仅仅存储数据。只有让家长立刻看到价值,才能形成持续使用的习惯。
3.2 AI军师服务——解决实际问题
这是产品的核心服务层,直接回应家长的具体困惑。
话术生成服务:针对具体沟通场景提供可选择的对话方案。例如孩子想放弃兴趣班时,系统提供两种不同风格的开场白供家长参考,并说明每种方案的适用情境。
角色模拟对练:家长可以与AI进行对话演练。AI扮演孩子的角色,让家长尝试沟通,然后指出家长表达中的问题并给出优化建议。这解决了"知道应该沟通但不知道怎么开口"的实践困境。
情绪急救服务:当系统检测到家长的输入带有强烈负面情绪时,自动切换至情绪疏导模式。此时不急于提供教育建议,而是先进行共情和安抚,待情绪平复后再讨论具体问题。
成长报告服务:每周或每月自动生成阶段性总结,不仅呈现数据变化,更重要的是解读变化背后的原因,并给出下阶段的行动计划建议。
路径规划服务:基于长期数据积累,提供跨度较大的教育规划。例如根据当前成绩趋势,推演未来一学期的提升路径,并明确具体的资源投入建议。
3.3 知识智库服务——构建专业壁垒
这是产品的内容支撑层,确保建议的专业性和系统性。
学习方法库:整合经过验证的高效学习策略,如费曼学习法、间隔重复记忆法、错题复盘流程等。每个方法都标注适用条件,帮助家长判断自己的孩子是否适合采用。
学科辅导库:覆盖K12全学段的知识图谱,重点在于提供"如何辅导"的思路而非直接给答案。例如孩子卡在某个数学知识点时,系统告诉家长应该从哪个前置概念补起,用什么生活例子帮助理解。
升学规划库:整合中高考政策、录取数据、专业信息等,提供选科建议、志愿填报策略等决策支持。关键不在于数据堆砌,而在于将复杂政策转化为家长能理解的决策逻辑。
心理沟通库:基于发展心理学理论,提供不同年龄段孩子的心理特征解读和沟通技巧。特别关注青春期、学业压力期等关键阶段的应对策略。
案例参照库:在保护隐私的前提下,提供脱敏后的相似案例分析。让家长看到"面对同样的问题,其他家庭是如何解决的,效果如何",降低决策的不确定感。
3.4 社区连接服务——增强用户粘性
同类经验分享:家长可以浏览其他用户授权分享的解决历程,获得群体智慧和情感支持。
专家内容触达:定期推送与当前阶段匹配的专家解读和教育趋势分析。
成就激励体系:设置记录里程碑,如"已连续记录30天,生成首份成长报告",通过正向反馈增强使用动力。
________________________________________
四、差异化竞争策略
4.1 体验差异化:即时反馈机制
区别于传统教育App的"先记录后分析"模式,本产品强调每次交互都有即时产出。家长输入即获得输出,无需等待数据积累到一定量级才能看到价值。
4.2 内容差异化:方法论模型化
不直接搬运网红教育专家的内容,而是将其核心逻辑转化为可复制的方法论模型。同时强调本地化,针对不同地区的中高考政策差异提供针对性建议。
4.3 服务差异化:AI与情感结合
不仅提供理性建议,更关注家长的情绪状态。在功能设计中明确区分"工具模式"和"陪伴模式",让家长感受到被理解而非被教育。
4.4 数据差异化:能力可视化
将抽象的学业表现转化为直观的能力雷达图,让家长看到的不是冷冰冰的分数,而是孩子各项能力的动态发展图景。
________________________________________
五、商业模式设计
5.1 订阅收入模式
免费试用层:提供3个月全功能体验,但限制历史数据查看范围。目的是让用户充分感受产品价值,建立使用依赖。
基础订阅层:月费19.9元,提供基础的AI对话和通用知识库服务。面向价格敏感型用户,维持基本活跃度。
专业订阅层:月费49.9元,开放多专家会诊、个性化方案生成、家长社群等核心功能。这是主要的收入来源和利润贡献层。
尊享服务层:月费199元,增加真人专家月度咨询和紧急心理干预通道。面向高焦虑、高支付能力的家长群体,提供深度服务。
5.2 裂变拉新机制——三邀一奖励体系
设计"一个家长邀请三位妈妈加入"的核心裂变机制,形成低成本获客闭环。
奖励方案设计:
• 邀请人成功邀请三位新家长注册并激活,即可解锁一套VIP专属课程。课程内容聚焦高价值主题,如"青春期沟通实战课"或"小升初择校全攻略"。
• 或者,邀请人可选择延长三个月免费使用期,继续享受专业版功能权益。
• 被邀请的新用户同样获得新手礼包,如首月专业版体验或专属测评报告,降低其注册后的使用门槛。
运营要点:
• 将奖励与产品核心价值绑定,避免纯现金补贴带来的薅羊毛用户。
• 设置邀请进度可视化,让邀请人实时看到距离解锁奖励还差几人,增强目标感。
• 鼓励被邀请者在社群中分享使用心得,形成口碑验证效应。
此机制充分利用家长群体的社交网络属性,将获客成本转化为课程制作成本,实现边际递减。
5.3 机构推荐收入——精准场景广告
在家长寻求外部教育资源的关键决策点,嵌入优质机构推荐,向合作方收取推广费用。
核心场景: 当家长主动发起类似"我家孩子报个作文班,哪里合适"、"想补数学,松原本地哪个机构好"的咨询时,AI在提供通用建议后,优先推荐经过审核的合作培训机构。
合作机构筛选标准:
• 建立教学质量评估体系,从师资力量、过往学员提分效果、家长真实评价等维度综合打分。
• 只推荐评分达到一定门槛的机构,确保推荐质量与产品调性一致。
• 定期复盘推荐后的实际转化率和家长满意度,淘汰低质量合作方。
收费模式:
• 基础展示费:机构入驻知识库并获得推荐资格的基础费用。
• 效果付费:按家长通过平台产生的实际咨询量或报名转化量计费。
• 深度联运:与头部机构合作开发专属诊断工具,如"XX机构数学能力测评",实现产品功能与商业推广的融合。
风险控制:
• 明确标注"合作推荐"标识,保持信息透明度,维护家长信任。
• 建立防火墙机制,AI的教育建议独立生成,不受合作方商业利益影响。
• 设置家长反馈通道,对推荐不满意的机构及时调整合作策略。
________________________________________
六、本地化运营体系——区域合作伙伴网络
与各地运营商、本地教育机构或资深教育从业者合作,构建覆盖全国的本地化服务网络。
6.1 合作伙伴角色定位
寻找具备本地教育资源整合能力的区域合作伙伴,赋予其"城市合伙人"身份。
理想合作方画像:
• 本地教育培训机构负责人
• 退休教师或教育系统从业者
• 拥有家长社群资源的KOL
• 地方运营商渠道
6.2 合作伙伴赋能体系
功能授权:向合作伙伴开放后台内容管理权限,支持其录入和维护本地教育知识库。
内容共建: 合作伙伴负责整理录入高度本地化的教育信息,例如:
• 四平地区小升初政策解读,包括划片规则、择校流程、关键时间节点。
• 吉林省中考470分段的报考策略,分析该分数段可冲刺的高中选项及录取概率。
• 松原市育才中学与油田一中的对比分析,涵盖升学率、特色班级、师资力量、校园文化等维度,帮助家长做出符合自身需求的选择。
价值逻辑: 通用AI无法回答如此细粒度的本地问题,而合作伙伴凭借其本地深耕经验,能够提供真正实用的决策参考。这种本地化内容是建立用户信任的关键壁垒。
6.3 合作伙伴收益模式
流量分成:合作伙伴引入的用户产生的订阅收入,按约定比例分成。
本地广告优先权:合作伙伴推荐的本地机构在区域用户搜索结果中获得优先展示。
数据服务:向合作伙伴提供区域教育趋势报告,辅助其业务决策。
品牌背书:官方认证的城市合伙人标识,提升其本地公信力。
6.4 质量控制机制
建立内容审核流程,合作伙伴录入的本地化知识需经过抽样校验,确保信息准确性和时效性。
设置用户反馈机制,对过时或错误信息及时修正,维护产品整体可信度。
七、运营策略建议
7.1 冷启动阶段
聚焦单一细分场景建立口碑。建议优先选择"初中数学成绩诊断"或"青春期亲子沟通"作为切入点,打透特定人群后再扩展。
手工打磨首批高质量服务案例,确保早期用户的满意度,形成可传播的正面口碑。
建立明确的用户反馈闭环,快速迭代产品体验,重点验证"家长是否愿意持续记录"和"建议是否被实际采纳"两个核心假设。
首批种子用户优先选择具备社交网络影响力的家长,为后续裂变机制储备势能。
7.2 规模化阶段
逐步扩展服务场景,覆盖更多学段和学科领域。
建立用户生成内容(UGC)的良性循环,鼓励优秀家长分享使用经验,形成内容飞轮。
在重点区域启动城市合伙人招募,以"成功案例地区"为样板,向周边城市复制本地化运营模式。
探索与线下教育机构的深度合作,将AI诊断与人工辅导相结合,创造线上线下融合(OMO)的服务体验,同时拓展机构推荐收入来源。
八、风险控制要点
AI建议准确性风险:所有建议必须标注置信度,高敏感度话题强制提示"建议咨询专业人士",并考虑购买相关责任保险。
用户数据隐私风险:采用本地加密存储,赋予家长完全的数据控制权,获取第三方安全认证以增强信任。
用户留存风险:在免费试用期内设置关键里程碑,通过成就感和沉没成本提升付费转化率。
内容合规风险:知识库建设注重方法论转化,避免直接引用受版权保护的内容或名人名义。
商业推荐信任风险:严格筛选合作机构,确保推荐质量;明确标识商业内容,避免损害产品中立性形象。
本地化信息质量风险:建立审核机制和用户反馈通道,防止合作伙伴录入过时或错误信息。
九、关键成功要素
内容质量:垂直知识库的权威性和实用性是付费的基础,需要持续投入建设。
交互体验:降低使用门槛,确保每次交互都有即时价值反馈,是留存的关键。
信任建立:在教育这个高敏感领域,建立家长对AI建议的信任需要长期积累。
场景聚焦:初期避免大而全,在单一场景建立绝对优势后再扩展。
网络效应:裂变机制和本地化运营共同构建用户增长飞轮,形成规模壁垒。
商业平衡:在用户体验与商业收入之间找到平衡点,避免因过度商业化损害产品核心价值。
本方案从用户需求出发,构建了完整的产品功能体系、多元化商业模式和分层运营路径,特别强化了裂变增长、本地合作和商业变现三个关键维度,为后续的技术实现方案提供了清晰的业务框架。

View File

@@ -1,31 +0,0 @@
import requests
import json
# API配置
url = 'https://api.lingyaai.cn/v1/images/generations'
api_key = 'sk-bSjxX2X1FAptXPcBjItcMcbRvcGFZTtRRcUf52BGQr1dscZM' # 请替换为你的实际API密钥
# 请求头
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
# 请求数据
data = {
'prompt': '帮我生成一张数字化校园的结构图',
'model': 'nano-banana-pro',
'aspect_ratio': '1:1'
}
# 发送POST请求
response = requests.post(url, headers=headers, json=data)
# 打印响应
print(f'状态码: {response.status_code}')
print(f'响应内容: {response.text}')
# 如果需要解析JSON响应
if response.status_code == 200:
result = response.json()
print(f'JSON响应: {json.dumps(result, indent=2, ensure_ascii=False)}')

View File

@@ -1,38 +0,0 @@
import requests
import json
# API配置
url = 'https://api.lingyaai.cn/v1/messages'
api_key = 'sk-bSjxX2X1FAptXPcBjItcMcbRvcGFZTtRRcUf52BGQr1dscZM' # 请替换为你的实际API密钥
# 读取scene.txt文件内容
with open('scene.txt', 'r', encoding='utf-8') as f:
scene_content = f.read()
# 请求头
headers = {
'anthropic-version': '2023-06-01',
'content-type': 'application/json',
'x-api-key': api_key
}
# 请求数据
data = {
'model': 'claude-sonnet-4-5-20250929',
'max_tokens': 1024,
'messages': [
{'role': 'user', 'content': scene_content}
]
}
# 发送POST请求
response = requests.post(url, headers=headers, json=data)
# 打印响应
print(f'状态码: {response.status_code}')
print(f'响应内容: {response.text}')
# 如果需要解析JSON响应
if response.status_code == 200:
result = response.json()
print(f'\nJSON响应: {json.dumps(result, indent=2, ensure_ascii=False)}')