diff --git a/build.gradle b/build.gradle index 3d3e2c4..5231b5d 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ ext { * 1.如果依赖的jar需要打包到zip中,放置在lib根目录下 * 2.如果依赖的jar仅仅是编译时需要,防止在lib下子目录下即可 */ - libPath = "$projectDir/../webroot/WEB-INF/lib" + libPath = "$projectDir/../../webroot/WEB-INF/lib" /** * 是否对插件的class进行加密保护,防止反编译 @@ -21,7 +21,7 @@ ext { pluginName = pluginInfo.id pluginVersion = pluginInfo.version - outputPath = "$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes" + outputPath = "$projectDir/../../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes" } group = 'com.fr.plugin' diff --git a/src/main/java/com/tptj/demo/hg/db/access/provider/DemoDbController.java b/src/main/java/com/tptj/demo/hg/db/access/provider/DemoDbController.java index 8dd73e1..93070af 100644 --- a/src/main/java/com/tptj/demo/hg/db/access/provider/DemoDbController.java +++ b/src/main/java/com/tptj/demo/hg/db/access/provider/DemoDbController.java @@ -66,13 +66,15 @@ public class DemoDbController extends AbstractDBAccessProvider { */ public static DataBean delete( final String id ){ try{ + DemoEntity entity = accessor.runQueryAction((context)-> + context.getDAO(DemoDao.class).getById(id) + ); + if( null == entity ){ + return null; + } return accessor.runDMLAction(new DBAction() { @Override public DataBean run(DAOContext context) throws Exception { - DemoEntity entity = context.getDAO(DemoDao.class).getById(id); - if( null == entity ){ - return null; - } context.getDAO(DemoDao.class).remove( id ); List list = context.getDAO(LinkDao.class).removeByKey(entity.getKey()); return toDataBean(entity,list); diff --git a/src/main/java/com/tptj/demo/hg/db/access/provider/DemoEntity.java b/src/main/java/com/tptj/demo/hg/db/access/provider/DemoEntity.java index e811e0a..fc734a9 100644 --- a/src/main/java/com/tptj/demo/hg/db/access/provider/DemoEntity.java +++ b/src/main/java/com/tptj/demo/hg/db/access/provider/DemoEntity.java @@ -14,7 +14,6 @@ import com.fr.third.javax.persistence.Table; **/ @Entity @Table(name = "plugin_demo") -@TableAssociation(associated = true) public class DemoEntity extends BaseEntity { public static final String COLUMN_KEY = "key"; diff --git a/src/main/java/com/tptj/demo/hg/db/access/provider/LinkEntity.java b/src/main/java/com/tptj/demo/hg/db/access/provider/LinkEntity.java index fbc6771..6db4c57 100644 --- a/src/main/java/com/tptj/demo/hg/db/access/provider/LinkEntity.java +++ b/src/main/java/com/tptj/demo/hg/db/access/provider/LinkEntity.java @@ -13,7 +13,6 @@ import com.fr.third.javax.persistence.Table; **/ @Entity @Table(name = "plugin_demo_link") -@TableAssociation(associated = true) public class LinkEntity extends BaseEntity { public static final String COLUMN_KEY = "key";