3.0版本
private void handlerPackage(TemplateConfig template, String outputDir, PackageConfig config) { this.packageInfo = new HashMap(6); this.packageInfo.put("Entity", this.joinPackage(config.getParent(), config.getEntity())); this.packageInfo.put("Mapper", this.joinPackage(config.getParent(), config.getMapper())); this.packageInfo.put("Xml", this.joinPackage(config.getParent(), config.getXml())); this.packageInfo.put("Service", this.joinPackage(config.getParent(), config.getService())); this.packageInfo.put("ServiceImpl", this.joinPackage(config.getParent(), config.getServiceImpl())); this.packageInfo.put("Controller", this.joinPackage(config.getParent(), config.getController())); Map configPathInfo = config.getPathInfo(); if(null != configPathInfo) { this.pathInfo = configPathInfo; } else { this.pathInfo = new HashMap(6); this.setPathInfo(this.pathInfo, template.getEntity(this.getGlobalConfig().isKotlin()), outputDir, "entity_path", "Entity"); this.setPathInfo(this.pathInfo, template.getMapper(), outputDir, "mapper_path", "Mapper"); this.setPathInfo(this.pathInfo, template.getXml(), outputDir, "xml_path", "Xml"); this.setPathInfo(this.pathInfo, template.getService(), outputDir, "service_path", "Service"); this.setPathInfo(this.pathInfo, template.getServiceImpl(), outputDir, "service_impl_path", "ServiceImpl"); this.setPathInfo(this.pathInfo, template.getController(), outputDir, "controller_path", "Controller"); } }
2.1.9版本
private void handlerPackage(TemplateConfig template, String outputDir, PackageConfig config) { this.packageInfo = new HashMap(); this.packageInfo.put("ModuleName", config.getModuleName()); this.packageInfo.put("Entity", this.joinPackage(config.getParent(), config.getEntity())); this.packageInfo.put("Mapper", this.joinPackage(config.getParent(), config.getMapper())); this.packageInfo.put("Xml", this.joinPackage(config.getParent(), config.getXml())); this.packageInfo.put("Service", this.joinPackage(config.getParent(), config.getService())); this.packageInfo.put("ServiceImpl", this.joinPackage(config.getParent(), config.getServiceImpl())); this.packageInfo.put("Controller", this.joinPackage(config.getParent(), config.getController())); this.pathInfo = new HashMap(); if(StringUtils.isNotEmpty(template.getEntity(this.getGlobalConfig().isKotlin()))) { this.pathInfo.put("entity_path", this.joinPath(outputDir, (String)this.packageInfo.get("Entity"))); }