diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/modules/generator/utils/GenUtil.java b/mes/hd/nladmin-system/src/main/java/org/nl/modules/generator/utils/GenUtil.java index 46bcf3bd..e59cebad 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/modules/generator/utils/GenUtil.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/modules/generator/utils/GenUtil.java @@ -90,7 +90,7 @@ public class GenUtil { List> genList = new ArrayList<>(); // 获取后端模版 List templates = getAdminTemplateNames(); - TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); + TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH)); for (String templateName : templates) { Map map = new HashMap<>(1); Template template = engine.getTemplate("generator/admin/" + templateName + ".ftl"); @@ -116,7 +116,7 @@ public class GenUtil { // String tempPath =SYS_TEM_DIR + "nladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator; String tempPath = SYS_TEM_DIR + "nladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator; Map genMap = getGenMap(columns, genConfig); - TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); + TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH)); // 生成后端代码 List templates = getAdminTemplateNames(); for (String templateName : templates) { @@ -153,7 +153,7 @@ public class GenUtil { public static void generatorCode(List columnInfos, GenConfig genConfig) throws IOException { Map genMap = getGenMap(columnInfos, genConfig); - TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); + TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH)); // 生成后端代码 List templates = getAdminTemplateNames(); for (String templateName : templates) { diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/modules/wql/core/bean/ConnectBean.java b/mes/hd/nladmin-system/src/main/java/org/nl/modules/wql/core/bean/ConnectBean.java deleted file mode 100644 index ae38d60b..00000000 --- a/mes/hd/nladmin-system/src/main/java/org/nl/modules/wql/core/bean/ConnectBean.java +++ /dev/null @@ -1,137 +0,0 @@ -package org.nl.modules.wql.core.bean;//package org.nl.module.wql.core.bean; -// -//import java.sql.Connection; -// -//import javax.transaction.UserTransaction; -// -//import org.hibernate.Session; -//import org.jbpm.api.cmd.Environment; -//import org.jbpm.pvm.internal.env.EnvironmentImpl; -//import org.jbpm.pvm.internal.hibernate.DbSessionImpl; -//import org.jbpm.pvm.internal.session.DbSession; -//import org.nl.module.wql.WQLCore; -//import org.nl.module.wql.core.db.DBConnection; -// -// -//public class ConnectBean { -// private String dbname = ""; -// private Connection conn = null; -// private UserTransaction utx = null; -// -// private ConnectBean() { -// // TODO Auto-generated constructor stub -// } -//// public ConnectBean(Connection conn) { -//// this.conn = conn; -//// } -// public static ConnectBean getConnectBean(){ -// ConnectBean conb = new ConnectBean(); -// conb.conn = DBConnection.getConnection(WQLCore.defalutDBName); -// conb.dbname = WQLCore.defalutDBName; -// return conb; -// } -// public static ConnectBean getConnectBean(Environment environment){ -// return getConnectBean((EnvironmentImpl)environment); -// } -// public static ConnectBean getConnectBean(EnvironmentImpl environmentImpl){ -// DbSessionImpl dbSession = (DbSessionImpl) environmentImpl.getFromCurrent(DbSession.class); -// Session session = dbSession.getSession(); -// ConnectBean conb = ConnectBean.getConnectBean(session.connection(),WQLCore.defalutDBName); -// return conb; -// } -// -// public static ConnectBean getConnectBean(Connection conn,String dbname){ -// if(null==dbname||"".equals(dbname)){ -// dbname = WQLCore.defalutDBName; -// } -// ConnectBean conb = new ConnectBean(); -// conb.conn = conn; -// conb.dbname = dbname; -// return conb; -// } -// public boolean beginTransation(){ -// boolean isSuccess = false; -// if(null!=this.conn){ -// DBConnection.openTransation(this.conn); -// this.utx = DBConnection.getTransaction(this.dbname); -// if(null!=this.utx){ -// try { -// this.utx.begin(); -// isSuccess = true; -// } catch (Exception e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } -// } -// } -// return isSuccess; -// } -// -// public boolean commitTransation(){ -// boolean isSuccess = false; -// if(null!=this.utx){ -// try { -// this.utx.commit(); -// isSuccess = true; -// } catch (Exception e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// try { -// this.utx.rollback(); -// } catch (Exception e1) { -// // TODO Auto-generated catch block -// e1.printStackTrace(); -// } -// }finally{ -// DBConnection.freeConnection(this.conn); -// this.conn = null; -// this.utx=null; -// } -// }else{ -// DBConnection.freeConnection(this.conn); -// } -// -// return isSuccess; -// } -// public boolean rollbackTransation(){ -// boolean isSuccess = false; -// if(null!=this.utx){ -// try { -// this.utx.rollback(); -// isSuccess = true; -// } catch (Exception e1) { -// // TODO Auto-generated catch block -// e1.printStackTrace(); -// }finally{ -// DBConnection.freeConnection(this.conn); -// this.conn = null; -// this.utx=null; -// } -// }else{ -// DBConnection.freeConnection(this.conn); -// } -// -// return isSuccess; -// } -// -// public String getDbname() { -// return dbname; -// } -// public void setDbname(String dbname) { -// this.dbname = dbname; -// } -// public Connection getConn() { -// return conn; -// } -// public void setConn(Connection conn) { -// this.conn = conn; -// } -// public UserTransaction getUtx() { -// return utx; -// } -// public void setUtx(UserTransaction utx) { -// this.utx = utx; -// } -// -// -//} \ No newline at end of file diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/controller/quartz/SysQuartzJobController.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/controller/quartz/SysQuartzJobController.java index f93821bc..991d9495 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/controller/quartz/SysQuartzJobController.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/controller/quartz/SysQuartzJobController.java @@ -39,14 +39,12 @@ public class SysQuartzJobController { private final ISysQuartzJobService quartzJobService; - //("查询定时任务") @GetMapping @SaCheckPermission("timing:list") public ResponseEntity query(JobQuery criteria, PageQuery pageable) { return new ResponseEntity<>(TableDataInfo.build(quartzJobService.queryAll(criteria, pageable)), HttpStatus.OK); } - //("查询任务执行日志") @GetMapping(value = "/logs") @SaCheckPermission("timing:list") public ResponseEntity queryJobLog(JobQuery criteria, PageQuery pageable) { @@ -54,7 +52,6 @@ public class SysQuartzJobController { } @Log("新增定时任务") - //("新增定时任务") @PostMapping @SaCheckPermission("timing:add") public ResponseEntity create(@Validated @RequestBody SysQuartzJob resources) { @@ -66,7 +63,6 @@ public class SysQuartzJobController { } @Log("修改定时任务") - //("修改定时任务") @PutMapping @SaCheckPermission("timing:edit") public ResponseEntity update(@Validated @RequestBody SysQuartzJob resources) { @@ -75,7 +71,6 @@ public class SysQuartzJobController { } @Log("更改定时任务状态") - //("更改定时任务状态") @PutMapping(value = "/{id}") @SaCheckPermission("timing:edit") public ResponseEntity update(@PathVariable String id) { @@ -84,7 +79,6 @@ public class SysQuartzJobController { } @Log("执行定时任务") - //("执行定时任务") @PutMapping(value = "/exec/{id}") @SaCheckPermission("timing:edit") public ResponseEntity execution(@PathVariable String id) { @@ -93,7 +87,6 @@ public class SysQuartzJobController { } @Log("删除定时任务") - //("删除定时任务") @DeleteMapping @SaCheckPermission("timing:del") public ResponseEntity delete(@RequestBody Set ids) { diff --git a/mes/hd/nladmin-system/src/main/resources/template/email/email.ftl b/mes/hd/nladmin-system/src/main/resources/templates/email/email.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/email/email.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/email/email.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/email/taskAlarm.ftl b/mes/hd/nladmin-system/src/main/resources/templates/email/taskAlarm.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/email/taskAlarm.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/email/taskAlarm.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/admin/Controller.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Controller.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/admin/Controller.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Controller.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/admin/Dto.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Dto.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/admin/Dto.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Dto.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/admin/Entity.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Entity.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/admin/Entity.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Entity.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/admin/Mapper.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Mapper.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/admin/Mapper.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Mapper.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/admin/QueryCriteria.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/admin/QueryCriteria.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/admin/QueryCriteria.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/admin/QueryCriteria.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/admin/Repository.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Repository.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/admin/Repository.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Repository.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/admin/Service.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Service.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/admin/Service.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/admin/Service.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/admin/ServiceImpl.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/admin/ServiceImpl.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/admin/ServiceImpl.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/admin/ServiceImpl.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/front/api.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/front/api.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/front/api.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/front/api.ftl diff --git a/mes/hd/nladmin-system/src/main/resources/template/generator/front/index.ftl b/mes/hd/nladmin-system/src/main/resources/templates/generator/front/index.ftl similarity index 100% rename from mes/hd/nladmin-system/src/main/resources/template/generator/front/index.ftl rename to mes/hd/nladmin-system/src/main/resources/templates/generator/front/index.ftl