@lgh-dev
2022-08-18T06:49:26.000000Z
字数 885
阅读 334
九斗鱼工作
查询要迁移的项目ID(by回款表)
select distinct(project_id) from
core_refund_record
where status = 600
查询待回款的纪录
select * from
core_refund_record
where status = 600
查询项目的信息
select * from
core_project where
id in (select distinct(project_id) fromcore_refund_record
where status = 600);
项目债权关联关系纪录
select credit_id from
module_project_link_credit_new
where project_id in (select distinct(project_id) fromjiudouyu_core_db.core_refund_record
where status = 600)
通过债权关系纪录查询债权纪录
select * from
module_credit
where id in (select credit_id frommodule_project_link_credit_new
where project_id in (select distinct(project_id) fromjiudouyu_core_db.core_refund_record
where status = 600));
通过债权查询第三方的借款记录
select * from
module_credit_third_detail
where credit_third_id in (select id frommodule_credit
where id in (select credit_id frommodule_project_link_credit_new
where project_id in (select distinct(project_id) fromjiudouyu_core_db.core_refund_record
where status = 600)))