
#旧数据表以数据导完再执行下面脚本

update t_ba_bafwjbxx t,security_company s
set t.comId=s.id
where
t.comId is NULL
and t.BAFWGSFGSMC=s.`name`
and s.active=true;


update t_ba_bayjbxx set datastatus ='0' where ifnull(datastatus,'')='';



update t_ba_bayjbxx t,security_company s
set t.companyId=s.id
where
t.companyId is NULL
and t.BAFWGSFGSMC=s.`name`
and s.active=true;