insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('v_Entity','entity',NULL,'${context.javaBeanName}.java','package ${context.packageName}.entity;\n\n#if( \"${table.comment}\" != \"\" )\n/**\n ${table.comment}\n*/\n#end\npublic class ${context.javaBeanName} {\n#foreach($column in $columns)\n#if( \"${column.comment}\" != \"\" )\n // ${column.comment}\n#end\n private ${column.javaTypeBox} ${column.javaFieldName};\n#end\n\n#foreach(${column} in ${columns})\n#if( \"${column.comment}\" != \"\" )\n /** 设置 ${column.comment},对应字段 ${table.tableName}.${column.columnName} */\n#end \n public void set${column.javaFieldNameUF}(${column.javaTypeBox} ${column.javaFieldName}){\n this.${column.javaFieldName} = ${column.javaFieldName};\n }\n#if( \"${column.comment}\" != \"\" )\n /** 获取 ${column.comment},对应字段 ${table.tableName}.${column.columnName} */\n#end \n public ${column.javaTypeBox} get${column.javaFieldNameUF}(){\n return this.${column.javaFieldName};\n }\n\n#end\n}','admin'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('v_DAO','dao',NULL,'${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'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('v_Service','service',NULL,'${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'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('v_SearchEntity','entity',NULL,'${context.javaBeanName}Sch.java','package ${context.packageName}.entity;\n\nimport org.durcframework.core.expression.annotation.ValueField;\nimport org.durcframework.core.support.SearchEasyUI;\n\npublic class ${context.javaBeanName}Sch extends SearchEasyUI {\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'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('v_Controller','controller',NULL,'${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 MessageResult add${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.save(entity);\n }\n\n @RequestMapping(\"/list${context.javaBeanName}.do\")\n public @ResponseBody GridResult list${context.javaBeanName}(${context.javaBeanName}Sch searchEntity) {\n return this.query(searchEntity);\n }\n\n @RequestMapping(\"/update${context.javaBeanName}.do\")\n public @ResponseBody MessageResult update${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.update(entity);\n }\n\n @RequestMapping(\"/del${context.javaBeanName}.do\")\n public @ResponseBody MessageResult del${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.delete(entity);\n }\n \n}','admin'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('v_Mybatis','mapper',NULL,'${context.javaBeanNameLF}Mapper.xml','\n\n\n\n \n #foreach($column in $columns)\n #if( \"${column.comment}\" != \"\" )\n \n #end\n \n #end\n \n \n \n \n\n \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 INSERT INTO ${table.tableName}\n \n \n\n #foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n \n `${column.columnName}`,\n \n #end \n #end\n \n \n #foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n \n #{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \n \n #end \n #end\n \n \n\n \n \n UPDATE ${table.tableName}\n \n #foreach($column in $columns) \n #if(!${column.isPk}) \n ${column.columnName}=#{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \n #end \n #end\n \n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n \n \n \n UPDATE ${table.tableName}\n \n #foreach($column in $columns) \n #if(!${column.isPk}) \n ${column.columnName}=#{entity.${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \n #end \n #end\n \n \n \n \n \n \n UPDATE ${table.tableName}\n \n #foreach($column in $columns) \n #if(!${column.isPk}) \n \n ${column.columnName}=#{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \n \n #end \n #end\n \n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n \n \n \n UPDATE ${table.tableName}\n \n #foreach($column in $columns) \n #if(!${column.isPk}) \n \n ${column.columnName}=#{entity.${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \n \n #end \n #end\n \n \n \n\n \n \n \n \n \n \n \n \n DELETE FROM ${table.tableName}\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n \n \n \n DELETE FROM ${table.tableName}\n \n \n\n','admin'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('v_jsp','jsp',NULL,'${context.javaBeanNameLF}.jsp','#set($jq=\"$\")\n<%@ 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#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n \n #end\n#end\n \n \n
${column.javaFieldName}:\n \n
\n \n
\n
\n
\n \n
\n \n
\n \n
\n
\n \n \n #foreach($column in $columns)\n #if(!${column.isIdentityPk}) \n \n \n \n \n #end\n #end \n\n
*${column.javaFieldName}\n \n
\n
\n
\n \n\n\n\n','admin');