Compare commits

..

No commits in common. "32a79ff29833e0e9987b23499266b24b5a5c2ddb" and "8de16c3ef85dd0d8c42c87e2e522f8129f9f8f25" have entirely different histories.

3 changed files with 3 additions and 13 deletions

View File

@ -23,12 +23,6 @@ public class RuleFactory implements FallbackFactory<RuleFeign> {
log.info(cause);
return Result.error("网络开小差......");
}
@Override
public Result testEngine(String className, DataValue dataValue) {
log.info(cause);
return Result.error("网络开小差......");
}
};
}
}

View File

@ -1,19 +1,14 @@
package com.muyu.remote.feign;
import com.muyu.common.core.domain.Result;
import com.muyu.common.domain.DataValue;
import com.muyu.remote.feign.Factory.RuleFactory;
import com.muyu.rule.common.domain.RuleEngineVersion;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(value = "cloud-etl-rule",fallbackFactory= RuleFactory.class)
public interface RuleFeign {
@PostMapping("/version/findVersionById/{id}")
public Result<RuleEngineVersion> findVersionById(@PathVariable("id") Long id);
@PostMapping("/version/testEngine/{className}")
public Result testEngine(@PathVariable("className") String className,@RequestBody DataValue dataValue);
}

View File

@ -398,7 +398,6 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
log.info(finalCurrentFuture);
Callable<DataValue[][]> task = () -> {
DataValue[][] prevResult = finalCurrentFuture.get();
log.info(data.getClassName());
if (data.getRuleId().equals("3")) {
BasicEngine<DataValue[][]> basicEngine = engineDataSetMap.get(data.getClassName());
basicEngine.set(prevResult);
@ -408,7 +407,9 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
if (data.getRuleId().equals("1")) {
for (DataValue[] values : prevResult) {
for (DataValue value : values) {
ruleFeign.testEngine(data.getClassName(),value);
BasicEngine<DataValue> dataValueBasicEngine = engineMap.get(data.getClassName());
dataValueBasicEngine.set(value);
dataValueBasicEngine.execution();
}
}