/*
SQLyog Ultimate v11.33 (64 bit)
MySQL - 5.1.73-community : Database - auto_code
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`auto_code` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `auto_code`;
/*Table structure for table `back_user` */
DROP TABLE IF EXISTS `back_user`;
CREATE TABLE `back_user` (
`username` varchar(20) NOT NULL,
`password` varchar(50) NOT NULL,
`add_time` datetime NOT NULL,
PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `back_user` */
insert into `back_user`(`username`,`password`,`add_time`) values ('aaaa','123456','2015-01-05 11:52:26'),('admin','admin','2014-06-24 10:12:49');
/*Table structure for table `datasource_config` */
DROP TABLE IF EXISTS `datasource_config`;
CREATE TABLE `datasource_config` (
`dc_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL,
`driver_class` varchar(50) DEFAULT NULL,
`jdbc_url` varchar(100) DEFAULT NULL,
`username` varchar(50) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL,
`back_user` varchar(20) DEFAULT NULL,
PRIMARY KEY (`dc_id`),
KEY `f_username_user` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*Data for the table `datasource_config` */
insert into `datasource_config`(`dc_id`,`name`,`driver_class`,`jdbc_url`,`username`,`password`,`back_user`) values (4,'autoCode','com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/auto_code','root','root','admin'),(5,'ISP','net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:sqlserver://192.168.9.31:1433;databaseName=isp','sa','isp#123','admin'),(6,'rms','com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/rms','root','root','admin'),(7,'fire','com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/fire','root','root','admin');
/*Table structure for table `template_config` */
DROP TABLE IF EXISTS `template_config`;
CREATE TABLE `template_config` (
`tc_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
`save_path` varchar(100) DEFAULT NULL,
`suffix` varchar(20) DEFAULT NULL,
`file_name` varchar(50) DEFAULT NULL,
`content` text,
`back_user` varchar(20) DEFAULT NULL,
PRIMARY KEY (`tc_id`),
KEY `f_backuser` (`back_user`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
/*Data for the table `template_config` */
insert into `template_config`(`tc_id`,`name`,`save_path`,`suffix`,`file_name`,`content`,`back_user`) values (8,'durc_Entity','entity','java','${context.javaBeanName}.java','package ${context.packageName}.entity;\n\npublic class ${context.javaBeanName} {\n#foreach($column in $columns) \n private ${column.javaType} ${column.javaFieldName};\n#end\n\n#foreach(${column} in ${columns}) \n public void set${column.javaFieldNameUF}(${column.javaType} ${column.javaFieldName}){\n this.${column.javaFieldName} = ${column.javaFieldName};\n }\n\n public ${column.javaType} get${column.javaFieldNameUF}(){\n return this.${column.javaFieldName};\n }\n\n#end\n}','admin'),(9,'durc_DAO','dao','java','${context.javaBeanName}Dao.java','package ${context.packageName}.dao;\n\nimport org.durcframework.core.dao.BaseDao;\nimport ${context.packageName}.entity.${context.javaBeanName};\n\npublic interface ${context.javaBeanName}Dao extends BaseDao<${context.javaBeanName}> {\n}','admin'),(10,'durc_Service','service','java','${context.javaBeanName}Service.java','package ${context.packageName}.service;\n\nimport org.durcframework.core.service.CrudService;\nimport ${context.packageName}.dao.${context.javaBeanName}Dao;\nimport ${context.packageName}.entity.${context.javaBeanName};\nimport org.springframework.stereotype.Service;\n\n@Service\npublic class ${context.javaBeanName}Service extends CrudService<${context.javaBeanName}, ${context.javaBeanName}Dao> {\n\n}','admin'),(11,'durc_SearchEntity','entity','java','${context.javaBeanName}Sch.java','package ${context.packageName}.entity;\n\nimport org.durcframework.core.SearchEntity;\nimport org.durcframework.core.expression.annotation.ValueField;\n\npublic class ${context.javaBeanName}Sch extends SearchEntity{\n\n#foreach($column in $columns) \n private ${column.javaTypeBox} ${column.javaFieldName}Sch;\n#end\n\n#foreach(${column} in ${columns}) \n public void set${column.javaFieldNameUF}Sch(${column.javaTypeBox} ${column.javaFieldName}Sch){\n this.${column.javaFieldName}Sch = ${column.javaFieldName}Sch;\n }\n \n @ValueField(column = \"${column.columnName}\")\n public ${column.javaTypeBox} get${column.javaFieldNameUF}Sch(){\n return this.${column.javaFieldName}Sch;\n }\n\n#end\n\n}','admin'),(12,'durc_Mybatis','mapper','xml','${context.javaBeanNameLF}Mapper.xml','\n\n\n \n #foreach($column in $columns)\n \n #end\n \n\n \n SELECT t.*\n FROM ${table.tableName} t\n \n \n \n ORDER BY t.${context.pkName} desc\n \n \n ORDER BY ${order}\n \n \n \n LIMIT\n #{start,jdbcType=INTEGER},#{limit,jdbcType=INTEGER}\n \n \n\n\n \n SELECT count(*) FROM ${table.tableName} t\n \n \n\n \n INSERT INTO ${table.tableName}\n (\n #set ($i=0) \n #foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n #if($i > 0),#end `${column.columnName}`\n#set($i=$i +1)\n #end \n #end\n )\n VALUES (\n #set ($i=0) \n #foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n #if($i > 0),#end #{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}\n#set($i=$i +1)\n #end \n #end\n \n )\n \n\n\n \n UPDATE ${table.tableName}\n SET \n#set ($i=0) \n #foreach($column in $columns) \n #if(!${column.isPk}) \n #if($i > 0),#end ${column.columnName}=#{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}\n #set($i=$i+1) \n #end \n #end \n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n\n \n SELECT t.*\n FROM ${table.tableName} t\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n \n \n DELETE FROM ${table.tableName}\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n\n ','admin'),(14,'durc_Controller','controller','java','${context.javaBeanName}Controller.java','package ${context.packageName}.controller;\n\nimport org.durcframework.core.GridResult;\nimport org.durcframework.core.MessageResult;\nimport org.durcframework.core.controller.CrudController;\nimport ${context.packageName}.entity.${context.javaBeanName};\nimport ${context.packageName}.entity.${context.javaBeanName}Sch;\nimport ${context.packageName}.service.${context.javaBeanName}Service;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\n@Controller\npublic class ${context.javaBeanName}Controller extends\n CrudController<${context.javaBeanName}, ${context.javaBeanName}Service> {\n\n @RequestMapping(\"/add${context.javaBeanName}.do\")\n public @ResponseBody\n MessageResult add${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.save(entity);\n }\n\n @RequestMapping(\"/list${context.javaBeanName}.do\")\n public @ResponseBody\n GridResult list${context.javaBeanName}(${context.javaBeanName}Sch searchEntity) {\n return this.query(searchEntity);\n }\n\n @RequestMapping(\"/update${context.javaBeanName}.do\")\n public @ResponseBody\n MessageResult update${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.update(entity);\n }\n\n @RequestMapping(\"/del${context.javaBeanName}.do\")\n public @ResponseBody\n MessageResult del${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.delete(entity);\n }\n \n}','admin'),(15,'sw-mybatis-sqlserver','${context.javaBeanNameLF}/mapper','xml','${context.javaBeanNameLF}Mapper.xml','\n\n\n\n#foreach($column in $columns)\n \n#end \n \n \n 0\">\n SELECT t0.* FROM (\n \n select row_number() over(order by\n \n \n ${paramMap.orderCol}\n \n \n ${context.pkName} desc\n \n \n ) row\n #set ($i=0) \n #foreach($column in $columns) \n #if($i > 0),#end ${column.columnName}\n #set($i=$i +1) \n #end\n from ${table.tableName} t \n \n 0\">\n ) t0 WHERE t0.row BETWEEN (#{paramMap.firstResult} +1) AND\n (#{paramMap.firstResult} \n #{paramMap.rp})\n \n \n \n SELECT \n#set ($i=0) \n #foreach($column in $columns) \n #if($i > 0),#end \n ${column.columnName}\n #set($i=$i +1) \n #end\n FROM ${table.tableName}\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n \n DELETE FROM ${table.tableName}\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n \n INSERT INTO ${table.tableName}\n (\n #set ($i=0) \n #foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n #if($i > 0),#end ${column.columnName}\n #set($i=$i +1)\n #end \n #end\n )\n VALUES (\n #set ($i=0) \n #foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n #if($i > 0),#end #{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}\n #set($i=$i +1)\n #end \n #end\n \n )\n \n \n select count(*) from ${table.tableName} t\n \n \n\n \n UPDATE ${table.tableName}\n SET \n#set ($i=0) \n #foreach($column in $columns) \n #if(!${column.isPk}) \n #if($i > 0),#end ${column.columnName}=#{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}\n #set($i=$i +1)\n #end \n #end \n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n ','admin'),(16,'sw-pojo','${context.javaBeanNameLF}/pojo','java','${context.javaBeanName}.java','package ${context.packageName}.${context.javaBeanNameLF}.pojo;\n\nimport com.shunwang.business.framework.pojo.BasePojo;\n\npublic class ${context.javaBeanName} extends BasePojo {\n#foreach($column in $columns) \n private ${column.javaType} ${column.javaFieldName};\n#end\n\n#foreach(${column} in ${columns}) \n public void set${column.javaFieldNameUF}(${column.javaType} ${column.javaFieldName}){\n this.${column.javaFieldName} = ${column.javaFieldName};\n }\n\n public ${column.javaType} get${column.javaFieldNameUF}(){\n return this.${column.javaFieldName};\n }\n\n#end\n}','admin'),(17,'sw-dao','${context.javaBeanNameLF}/dao','java','${context.javaBeanName}Dao.java','package ${context.packageName}.${context.javaBeanNameLF}.dao;\n\nimport com.shunwang.business.framework.dao.CrudDao;\nimport ${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName};\n\npublic interface ${context.javaBeanName}Dao extends CrudDao<${context.javaBeanName}> {\n}','admin'),(18,'sw-bo','${context.javaBeanNameLF}/bo','java','${context.javaBeanName}Bo.java','package ${context.packageName}.${context.javaBeanNameLF}.bo;\n\nimport org.springframework.stereotype.Service;\n\nimport com.shunwang.business.framework.bo.CrudBo;\nimport ${context.packageName}.${context.javaBeanNameLF}.dao.${context.javaBeanName}Dao;\nimport ${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName};\n\n@Service\npublic class ${context.javaBeanName}Bo extends CrudBo<${context.javaBeanName}, ${context.javaBeanName}Dao> {\n\n}','admin'),(19,'durc_jspEasyUICRUD','jsp','jsp','${context.javaBeanNameLF}.jsp','<%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\"\n pageEncoding=\"UTF-8\"%>\n\n\n
\n \n增删改查列子 \n\n\n\n \n\n \n \n \n \n \n \n \n \n\n\n','admin'),(20,'sw-mybatis-mysql','${context.javaBeanNameLF}/mapper','xml','${context.javaBeanNameLF}Mapper.xml','\n\n\n\n#foreach($column in $columns)\n \n#end \n \n \n SELECT *\n FROM ${table.tableName} t\n \n \n \n ORDER BY ${paramMap.orderCol}\n \n \n ORDER BY ${context.pkName} desc\n \n \n 0\">\n LIMIT #{paramMap.firstResult},#{paramMap.rp}\n \n \n\n \n SELECT \n#set ($i=0) \n #foreach($column in $columns) \n #if($i > 0),#end \n ${column.columnName}\n #set($i=$i+ 1) \n #end\n FROM ${table.tableName}\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n \n DELETE FROM ${table.tableName}\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n \n INSERT INTO ${table.tableName}\n (\n #set ($i=0) \n #foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n #if($i > 0),#end ${column.columnName}\n #set($i=$i +1)\n #end \n #end\n )\n VALUES (\n #set ($i=0) \n #foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n #if($i > 0),#end #{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}\n #set($i=$i +1)\n #end \n #end\n \n )\n \n \n select count(*) from ${table.tableName} t\n \n \n\n \n UPDATE ${table.tableName}\n SET \n#set ($i=0) \n #foreach($column in $columns) \n #if(!${column.isPk}) \n #if($i > 0),#end ${column.columnName}=#{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}\n #set($i=$i +1)\n #end \n #end \n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n ','admin'),(23,'durc-jspFduiCRUD','jsp',NULL,'${context.javaBeanNameLF}.jsp','<%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\"\n pageEncoding=\"UTF-8\"%>\n<%@ include file=\"../taglib.jsp\" %>\n\n\n\n \n增删改查 \n\n\n\n
\n
\n \n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n ${column.javaFieldName}: \n #end\n#end\n \n
\n \n \n
\n
\n
\n \n \n \n
\n \n \n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n \n ${column.javaFieldName}: \n \n #end\n#end\n \n
\n
\n\n\n\n','admin');
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;