添加版本删除
parent
96f380ecf9
commit
6c61f33de4
|
@ -1,6 +1,6 @@
|
|||
package com.muyu.rule.common.engine;
|
||||
|
||||
import cn.hutool.core.util.DesensitizedUtil;
|
||||
import com.muyu.rule.common.utils.Desensitization;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.muyu.etl.domain.DataValue;
|
||||
|
@ -8,6 +8,7 @@ import com.muyu.rule.common.basic.abstracts.DataEngineDataSetActuator;
|
|||
import com.muyu.rule.common.domain.DataValueRows;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author:张承志
|
||||
* @Package:com.muyu.rule.server.basic.engine.row
|
||||
|
@ -27,14 +28,15 @@ public class ENGINE_DataSet_ytrrt_S2 extends DataEngineDataSetActuator {
|
|||
JSONObject jsonObject = JSON.parseObject(key1);
|
||||
String key = (String)jsonObject.get("key");
|
||||
|
||||
|
||||
|
||||
for (DataValue[] value : dataValues) {
|
||||
for (DataValue dataValue1 : value) {
|
||||
if (dataValue1.getKey().equals(key)){
|
||||
dataValue1.setValue(DesensitizedUtil.mobilePhone((String) dataValue1.getValue()));
|
||||
dataValue1.setValue(Desensitization.mobilePhoneDesensitization((String) dataValue1.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
dataValueRows.setDataValue(dataValues);
|
||||
set(dataValueRows);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ public class RuleEngineVersionController {
|
|||
boolean b = versionService.complierClass(ruleEngineVersion.getClassName(), ruleEngineVersion.getVersionClazz());
|
||||
if (true==b){
|
||||
versionService.update(updateWrapper);
|
||||
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
|
@ -157,6 +158,7 @@ if (true==b){
|
|||
String template = "package com.muyu.rule.common.engine;\n" +
|
||||
"\n" +
|
||||
"import com.muyu.etl.domain.DataValue;\n" +
|
||||
"import com.muyu.rule.common.utils.Desensitization;\n" +
|
||||
"import com.muyu.rule.common.domain.${dataClass};\n" +
|
||||
"import com.muyu.rule.common.basic.abstracts.${parentClass};\n" +
|
||||
"import com.muyu.rule.common.exception.DeliteException;\n" +
|
||||
|
|
|
@ -64,17 +64,6 @@ public interface RuleEngineVersionService extends IService<RuleEngineVersion> {
|
|||
*/
|
||||
boolean complierClass(String className, String versionClazz);
|
||||
|
||||
|
||||
/**
|
||||
*对规则引擎进行类加载
|
||||
* @param className 规则引擎类名
|
||||
*/
|
||||
|
||||
// void loadRuleEngineClass(String className);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 测试数据
|
||||
*
|
||||
|
@ -88,4 +77,5 @@ public interface RuleEngineVersionService extends IService<RuleEngineVersion> {
|
|||
|
||||
public DataValue[][] testEngine( String className, DataValueRows dataValues);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -250,6 +250,8 @@ public class RuleEngineVersionServiceImpl extends ServiceImpl<RuleEngineVersionM
|
|||
return dataValues1.getDataValue();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void execution(String engineKey,DataValueFie dataValue){
|
||||
|
||||
BasicEngine<DataValueFie> dataValueBasicEngine = engineMap.get(engineKey);
|
||||
|
|
Loading…
Reference in New Issue