import com.yinjie.heating.common.api.NoSqlKeysService import com.yinjie.heating.common.datas.ESKeys import com.dySweetFishPlugin.elasticsearch.ESClient import com.sweetfish.util.Utility static def createRunnable(ESClient esClient, NoSqlKeysService keysService, long supplierCode) { return { //region 站内通知和短信 esClient.checkIndexEx(keysService.getESKey(ESKeys.ES_ERP_PAY_REQUEST_RECORD_INDEX, supplierCode), ESKeys.INDEX_CONFIG, Utility.ofMap(ESKeys.ESERPDEFAULT_TYPE, "payrequestrecord.json")) } as Runnable } //groovy最后一个表达式的值为返回 createRunnable(esClient, keysService, supplierCode)