insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('bui_Entity','entity','java','${context.javaBeanName}.java','package ${context.packageName}.entity;\n\n/**\n ${table.comment}\n*/\npublic class ${context.javaBeanName} {\n#foreach($column in $columns)\n // ${column.comment}\n private ${column.javaTypeBox} ${column.javaFieldName};\n#end\n\n#foreach(${column} in ${columns}) \n public void set${column.javaFieldNameUF}(${column.javaTypeBox} ${column.javaFieldName}){\n this.${column.javaFieldName} = ${column.javaFieldName};\n }\n\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('bui_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'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('bui_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'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('bui_Mybatis','mapper','xml','${context.javaBeanNameLF}Mapper.xml','\n\n\n\n \n \n #foreach($column in $columns)\n \n #end\n \n \n \n \n SELECT \n #set ($i=0) \n #foreach($column in $columns) \n #if($i > 0),#end t.${column.columnName}\n#set($i=$i +1) \n #end\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 \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 SELECT \n #set ($i=0) \n #foreach($column in $columns) \n #if($i > 0),#end t.${column.columnName}\n#set($i=$i +1) \n #end\n FROM ${table.tableName} t\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n \n \n \n \n SELECT\n #set ($i=0) \n #foreach($column in $columns) \n #if($i > 0),#end t.${column.columnName}\n #set($i=$i +1) \n #end\n FROM ${table.tableName} t\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('bui_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'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('bui_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 \n \n\n \n \n \n \n \n #foreach($column in $columns)\n #if(!${column.isIdentityPk})\n \n ${column.javaFieldName}:\n \n \n \n \n #end\n #end\n\n\n \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 *${column.javaFieldName}\n \n \n \n \n \n #end\n #end \n\n \n \n \n \n \n \n \n\n\n\n\n','admin'); insert into `template_config` (`name`, `save_path`, `suffix`, `file_name`, `content`, `back_user`) values('bui_SearchEntity','entity',NULL,'${context.javaBeanName}Sch.java','package ${context.packageName}.entity;\n\nimport org.durcframework.core.expression.annotation.ValueField;\nimport org.durcframework.core.support.SearchBUI;\n\npublic class ${context.javaBeanName}Sch extends SearchBUI {\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');