| | |
| | | String query; |
| | | Id targetId; |
| | | |
| | | Boolean IsNeedExecute = false; // 2021-03-05 mzy WLIG-BYHD79 SFDC环境batch合并调查 是否符合执行条件 |
| | | |
| | | global PowerBIUpdateBatch(Id targetid) { |
| | | this.targetId = targetid; |
| | | } |
| | | |
| | | global PowerBIUpdateBatch(Boolean needExecute) { |
| | | IsNeedExecute = needExecute; // 2021-03-05 mzy WLIG-BYHD79 SFDC环境batch合并调查 |
| | | } |
| | | |
| | | global Database.QueryLocator start(Database.BatchableContext BC) { |
| | | query = 'select Id, ShareWithPowerBI__c, ShareWithPowerBIFormula__c, ShareWithPowerBI_NeedUpd__c'; |
| | |
| | | } |
| | | |
| | | global void finish(Database.BatchableContext BC) { |
| | | |
| | | //2021-03-05 mzy WLIG-BYHD79 SFDC环境batch合并调查 start |
| | | if(!Test.isRunningTest() &&IsNeedExecute==true){ |
| | | //batch里调用下一个batch时,希望跟原有的Schedule里面传的条数保持一致 |
| | | Id execBTId = Database.executebatch(new ConsumAutoCancelRequestBatch(true)); |
| | | } |
| | | //2021-03-05 mzy WLIG-BYHD79 SFDC环境batch合并调查 end |
| | | |
| | | |
| | | } |
| | | |