提交 6b2454b1 编写于 作者: O o2sword

自建表分应用编译2

上级 d817bca8
...@@ -9,6 +9,9 @@ import java.util.ArrayList; ...@@ -9,6 +9,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Stream; import java.util.stream.Stream;
import com.x.base.core.entity.dynamic.DynamicBaseEntity;
import com.x.base.core.entity.dynamic.DynamicEntity;
import com.x.base.core.project.tools.ListTools;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.FileFilterUtils; import org.apache.commons.io.filefilter.FileFilterUtils;
import org.apache.commons.io.filefilter.IOFileFilter; import org.apache.commons.io.filefilter.IOFileFilter;
...@@ -90,10 +93,10 @@ public abstract class JettySeverTools { ...@@ -90,10 +93,10 @@ public abstract class JettySeverTools {
jars.add(file.getAbsolutePath()); jars.add(file.getAbsolutePath());
} }
} }
for (String str : module.dynamicJars()) { if (module.dynamicJars()!=null && module.dynamicJars().length > 0) {
File file = new File(Config.dir_dynamic_jars(), str + ".jar"); IOFileFilter filter = new WildcardFileFilter(DynamicEntity.JAR_PREFIX + "*.jar");
if (file.exists()) { for (File o : FileUtils.listFiles(Config.dir_dynamic_jars(), filter, null)) {
jars.add(file.getAbsolutePath()); jars.add(o.getAbsolutePath());
} }
} }
for (Path path : paths) { for (Path path : paths) {
......
...@@ -40,6 +40,7 @@ class ActionBuildTable extends BaseAction { ...@@ -40,6 +40,7 @@ class ActionBuildTable extends BaseAction {
for(Query query : queryList){ for(Query query : queryList){
business.buildAllTable(query.getId()); business.buildAllTable(query.getId());
} }
jar.delete();
wo.setValue(true); wo.setValue(true);
}else { }else {
wo.setValue(business.buildAllTable(queryId)); wo.setValue(business.buildAllTable(queryId));
......
...@@ -25,9 +25,9 @@ class ActionBuildTableDispatch extends BaseAction { ...@@ -25,9 +25,9 @@ class ActionBuildTableDispatch extends BaseAction {
private static Logger logger = LoggerFactory.getLogger(ActionBuildTableDispatch.class); private static Logger logger = LoggerFactory.getLogger(ActionBuildTableDispatch.class);
ActionResult<Wo> execute(EffectivePerson effectivePerson, String queryId) throws Exception { ActionResult<Wo> execute(EffectivePerson effectivePerson, String queryId) throws Exception {
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
ActionResult<Wo> result = new ActionResult<>(); ActionResult<Wo> result = new ActionResult<>();
Wo wo = new Wo(); Wo wo = new Wo();
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
Business business = new Business(emc); Business business = new Business(emc);
if (!business.controllable(effectivePerson)) { if (!business.controllable(effectivePerson)) {
throw new ExceptionAccessDenied(effectivePerson); throw new ExceptionAccessDenied(effectivePerson);
...@@ -36,6 +36,7 @@ class ActionBuildTableDispatch extends BaseAction { ...@@ -36,6 +36,7 @@ class ActionBuildTableDispatch extends BaseAction {
if (null == query) { if (null == query) {
throw new ExceptionEntityNotExist(queryId, Query.class); throw new ExceptionEntityNotExist(queryId, Query.class);
} }
}
List<Application> apps = ThisApplication.context().applications().get(x_query_assemble_designer.class); List<Application> apps = ThisApplication.context().applications().get(x_query_assemble_designer.class);
if (ListTools.isNotEmpty(apps)) { if (ListTools.isNotEmpty(apps)) {
apps.stream().forEach(o -> { apps.stream().forEach(o -> {
...@@ -54,7 +55,6 @@ class ActionBuildTableDispatch extends BaseAction { ...@@ -54,7 +55,6 @@ class ActionBuildTableDispatch extends BaseAction {
return result; return result;
} }
}
public static class Wo extends WrapBoolean { public static class Wo extends WrapBoolean {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册