LambdaqueryChainWrapper && LambdaUpdateChainWrapper

    public void archivalIUpdateOperate(List archivalRecordsList, List jobUniqueIds, boolean flag) {

        try {
            if (flag) {
                new LambdaUpdateChainWrapper(archivalRecordsMapper).in(ArchivalRecords::getJobUniqueId, jobUniqueIds)
                        .set(ArchivalRecords::getStatus, ArchivalRecordsStatusEnum.SUCCESS.getCode()).set(ArchivalRecords::getUpdateTime, new Date()).update();
            } else {
                new LambdaUpdateChainWrapper(archivalRecordsMapper).in(ArchivalRecords::getJobUniqueId, jobUniqueIds)
                        .set(ArchivalRecords::getStatus, ArchivalRecordsStatusEnum.RULE_MISMATCH_ARCHIVAL_FAILD.getCode()).set(ArchivalRecords::getUpdateTime, new Date()).update();
            }
        } catch (Exception e) {
            LogUtils.printErrorInfo(BizMonitorIndexEnum.RESOURCE_EXCEPTION.getCode(), null, null,
                    ResultStatusEnums.TASK_RESOURCE_ARCHIVE_FIALD.getStatus(), e, archivalRecordsList);
        }
    }
TaskPoolConfig taskPoolConfig = new LambdaQueryChainWrapper(taskPoolConfigMapper).eq(TaskPoolConfig
        ::getId, id).select(TaskPoolConfig::getResourceRule).one();

你可能感兴趣的:(java开发)