ALTER TABLE `sys_approvallog`
ADD COLUMN `approvalid`  varchar(30) NULL COMMENT '审批id' AFTER `approvalorg`;

update sys_approvallog sa,sys_approval sa1
set sa.approvalid=sa1.id
where sa.approvalid is null and sa.processInstanceId=sa1.processInstanceId;


