mysql吧 A表数据同步到B表 uat手动执行脚本没问题 xxjob定时跑没问题 prd手动执行脚本没问题 xxjob定时跑就报错 两个环境数据库配置一模一样
INSERT INTO deal_investment (id,
project_id,
deal_id,
investor_id,
currency,
date_investment_ft,
latest_shareholdin,
number_of_shares,
amount_investment,
operate_rmb,
recovery_amount,
debt_amount,
debt_amount_rmb,
create_by,
create_time,
update_by,
update_time,
del_flag)
SELECT ddi.id,
ddi.project_id,
ddi.deal_id,
(SELECT t.ID FROM invest_platform t WHERE t.invest_platform_no = ddi.investor_id and t.del_flag='0') investor_id,
ddi.currency,
ddi.date_investment_ft,
ddi.latest_shareholdin*100,
ddi.number_of_shares,
ddi.amount_investment,
ddi.operate_rmb,
ddi.recovery_amount,
ddi.debt_amount,
ddi.debt_amount_rmb,
1,
now(),
1,
now(),
0
FROM dwmp_deal_investment ddi;
COMMIT;
这是同步脚本 手动和job都是这么写的