1 Star 0 Fork 955

olddrivertan/autoCode

forked from tanghc/code-gen 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
autoCode.sql 92.41 KB
一键复制 编辑 原始数据 按行查看 历史
tanghc 提交于 2016-08-09 13:55 . 更新模板
/*
SQLyog Ultimate v11.33 (64 bit)
MySQL - 5.1.71-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 COMMENT '用户名',
`password` varchar(50) NOT NULL COMMENT '密码',
`add_time` datetime NOT NULL COMMENT '添加时间',
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,
`driver_class` varchar(50) DEFAULT NULL COMMENT '数据库驱动',
`db_name` varchar(50) DEFAULT NULL,
`ip` varchar(50) DEFAULT NULL,
`port` int(11) DEFAULT NULL,
`username` varchar(50) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL,
`back_user` varchar(20) DEFAULT NULL,
PRIMARY KEY (`dc_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/*Data for the table `datasource_config` */
insert into `datasource_config`(`dc_id`,`driver_class`,`db_name`,`ip`,`port`,`username`,`password`,`back_user`) values (4,'com.mysql.jdbc.Driver','auto_code','localhost',3306,'root','root','admin'),(6,'com.mysql.jdbc.Driver','rms','localhost',3306,'root','root','admin'),(9,'com.mysql.jdbc.Driver','stu','localhost',3306,'root','root','admin'),(11,'com.mysql.jdbc.Driver','ymm','127.0.0.1',3306,'root','root','admin'),(12,'com.mysql.jdbc.Driver','vback','127.0.0.1',3306,'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=39 DEFAULT CHARSET=utf8 COMMENT='模板表';
/*Data for the table `template_config` */
insert into `template_config`(`tc_id`,`name`,`save_path`,`suffix`,`file_name`,`content`,`back_user`) values (8,'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'),(9,'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'),(10,'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'),(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,'bui_Mybatis','mapper','xml','${context.javaBeanNameLF}Mapper.xml','#set($jq=\"$\")\r\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\" >\r\n<!-- \r\n This file is automatically generated by autoCode(https://git.oschina.net/durcframework/autoCode)\r\n-->\r\n<mapper namespace=\"${context.packageName}.dao.${context.javaBeanName}Dao\">\r\n <resultMap id=\"queryResultMap\" type=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n #foreach($column in $columns)\r\n #if( \"${column.comment}\" != \"\" )\r\n <!-- ${column.comment} -->\r\n #end\r\n <result column=\"${column.columnName}\" property=\"${column.javaFieldName}\" jdbcType=\"${column.mybatisJdbcType}\" />\r\n #end\r\n </resultMap>\r\n \r\n <!-- 聚合查询 -->\r\n <select id=\"findProjection\" parameterType=\"org.durcframework.core.expression.projection.ProjectionQuery\" resultType=\"java.util.HashMap\">\r\n SELECT\r\n <include refid=\"expressionBlock.projectionColumn\"/>\r\n FROM ${table.tableName} t\r\n <include refid=\"expressionBlock.where\"/> \r\n <include refid=\"expressionBlock.groupBy\"/>\r\n <include refid=\"expressionBlock.having\"/>\r\n <if test=\"order != null\">\r\n ORDER BY ${jq}{order}\r\n </if>\r\n </select>\r\n \r\n <!-- 根据条件查询记录 -->\r\n <select id=\"find\" parameterType=\"org.durcframework.core.expression.ExpressionQuery\"\r\n resultMap=\"queryResultMap\">\r\n SELECT \r\n <choose>\r\n <when test=\"columns.size>0\">\r\n <foreach collection=\"columns\" item=\"column\" separator=\",\" >\r\n ${jq}{column}\r\n </foreach>\r\n </when>\r\n <otherwise>\r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if($i > 0),#end t.${column.columnName}\r\n #set($i=$i +1) \r\n #end\r\n </otherwise>\r\n </choose>\r\n \r\n FROM ${table.tableName} t\r\n <include refid=\"expressionBlock.where\" />\r\n <choose>\r\n <when test=\"order == null\">\r\n ORDER BY t.${context.pkName} desc\r\n </when>\r\n <otherwise>\r\n ORDER BY ${jq}{order}\r\n </otherwise>\r\n </choose>\r\n <if test=\"!isQueryAll\">\r\n LIMIT\r\n #{start,jdbcType=INTEGER},#{limit,jdbcType=INTEGER}\r\n </if>\r\n </select>\r\n\r\n <!-- 根据条件查询记录数 -->\r\n <select id=\"findTotalCount\" parameterType=\"org.durcframework.core.expression.ExpressionQuery\"\r\n resultType=\"java.lang.Integer\">\r\n SELECT count(*) FROM ${table.tableName} t\r\n <include refid=\"expressionBlock.where\" />\r\n </select>\r\n\r\n <!-- 保存,保存全部字段 -->\r\n <insert id=\"save\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\"\r\n#if(${pkColumn.isIdentity})\r\n keyProperty=\"${context.javaPkName}\" keyColumn=\"${context.pkName}\" useGeneratedKeys=\"true\"\r\n#end\r\n >\r\n INSERT INTO ${table.tableName}\r\n (\r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if(!${column.isIdentityPk}) \r\n #if($i > 0),#end `${column.columnName}`\r\n#set($i=$i +1)\r\n #end \r\n #end\r\n )\r\n VALUES (\r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if(!${column.isIdentityPk}) \r\n #if($i > 0),#end #{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}\r\n#set($i=$i +1)\r\n #end \r\n #end\r\n \r\n )\r\n </insert>\r\n \r\n <!-- 保存,保存不为NULL的字段 -->\r\n <insert id=\"saveNotNull\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\"\r\n #if(${pkColumn.isIdentity})\r\n keyProperty=\"${context.javaPkName}\" keyColumn=\"${context.pkName}\" useGeneratedKeys=\"true\"\r\n #end\r\n >\r\n INSERT INTO ${table.tableName}\r\n \r\n <trim prefix=\"(\" suffix=\")\" suffixOverrides=\",\"> \r\n\r\n #foreach($column in $columns) \r\n #if(!${column.isIdentityPk}) \r\n <if test=\"${column.javaFieldName} != null\">\r\n `${column.columnName}`,\r\n </if>\r\n #end \r\n #end\r\n </trim>\r\n <trim prefix=\"values (\" suffix=\")\" suffixOverrides=\",\"> \r\n #foreach($column in $columns) \r\n #if(!${column.isIdentityPk}) \r\n <if test=\"${column.javaFieldName} != null\" >\r\n #{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n </if>\r\n #end \r\n #end\r\n </trim>\r\n </insert>\r\n\r\n <!-- 更新,更新全部字段 -->\r\n <update id=\"update\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n UPDATE ${table.tableName}\r\n <set> \r\n #foreach($column in $columns) \r\n #if(!${column.isPk}) \r\n ${column.columnName}=#{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n #end \r\n #end\r\n </set> \r\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\r\n </update>\r\n \r\n <!-- 根据指定条件更新 -->\r\n <update id=\"updateByExpression\">\r\n UPDATE ${table.tableName}\r\n <set> \r\n #foreach($column in $columns) \r\n #if(!${column.isPk}) \r\n ${column.columnName}=#{entity.${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n #end \r\n #end\r\n </set>\r\n <include refid=\"expressionBlock.updateWhere\" />\r\n </update>\r\n \r\n <!-- 更新不为NULL的字段 -->\r\n <update id=\"updateNotNull\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n UPDATE ${table.tableName}\r\n <set>\r\n #foreach($column in $columns) \r\n #if(!${column.isPk}) \r\n <if test=\"${column.javaFieldName} != null\" >\r\n ${column.columnName}=#{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n </if>\r\n #end \r\n #end\r\n </set>\r\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\r\n </update>\r\n \r\n <!-- 根据指定条件更新不为NULL的字段 -->\r\n <update id=\"updateNotNullByExpression\">\r\n UPDATE ${table.tableName}\r\n <set>\r\n #foreach($column in $columns) \r\n #if(!${column.isPk}) \r\n <if test=\"entity.${column.javaFieldName} != null\" >\r\n ${column.columnName}=#{entity.${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n </if>\r\n #end \r\n #end\r\n </set>\r\n <include refid=\"expressionBlock.updateWhere\" />\r\n </update>\r\n\r\n <!-- 根据主键获取单条记录 -->\r\n <select id=\"get\" resultMap=\"queryResultMap\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n SELECT \r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if($i > 0),#end t.${column.columnName}\r\n#set($i=$i +1) \r\n #end\r\n FROM ${table.tableName} t\r\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\r\n </select>\r\n \r\n <!-- 根据条件获取单条记录 -->\r\n <select id=\"getByExpression\" resultMap=\"queryResultMap\" parameterType=\"org.durcframework.core.expression.ExpressionQuery\">\r\n SELECT\r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if($i > 0),#end t.${column.columnName}\r\n #set($i=$i +1) \r\n #end\r\n FROM ${table.tableName} t\r\n <include refid=\"expressionBlock.where\" />\r\n </select>\r\n \r\n <!-- 根据主键删除记录 -->\r\n <delete id=\"del\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n DELETE FROM ${table.tableName}\r\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\r\n </delete> \r\n \r\n <!-- 根据条件删除记录 -->\r\n <delete id=\"delByExpression\" parameterType=\"org.durcframework.core.expression.ExpressionQuery\">\r\n DELETE FROM ${table.tableName}\r\n <include refid=\"expressionBlock.where\" />\r\n </delete>\r\n\r\n</mapper>','admin'),(14,'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 ModelAndView add${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.add(entity);\n }\n\n @RequestMapping(\"/list${context.javaBeanName}.do\")\n public ModelAndView list${context.javaBeanName}(${context.javaBeanName}Sch searchEntity) {\n return this.list(searchEntity);\n }\n\n @RequestMapping(\"/update${context.javaBeanName}.do\")\n public ModelAndView update${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.modify(entity);\n }\n\n @RequestMapping(\"/del${context.javaBeanName}.do\")\n public ModelAndView del${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.remove(entity);\n }\n \n}','admin'),(15,'sw-mybatis-sqlserver','${context.javaBeanNameLF}/mapper','xml','${context.javaBeanNameLF}Mapper.xml','<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\" >\n<mapper namespace=\"${context.packageName}.${context.javaBeanNameLF}.dao.${context.javaBeanName}Dao\">\n<resultMap id=\"BaseResultMap\" type=\"${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName}\">\n#foreach($column in $columns)\n <result column=\"${column.columnName}\" property=\"${column.javaFieldName}\" jdbcType=\"${column.mybatisJdbcType}\"/>\n#end \n</resultMap>\n <select id=\"query\" resultMap=\"BaseResultMap\" parameterType=\"com.shunwang.business.framework.mybatis.query.ConditionQuery\" >\n <if test=\"paramMap.rp>0\">\n SELECT t0.* FROM (\n </if>\n select row_number() over(order by\n <choose>\n <when test=\"paramMap.orderCol!=null\">\n ${paramMap.orderCol}\n </when>\n <otherwise>\n ${context.pkName} desc\n </otherwise>\n </choose>\n ) row\n \n #foreach($column in $columns) \n ,${column.columnName} \n #end\n from ${table.tableName} t \n <include refid=\"conditionQuery.core\" />\n <if test=\"paramMap.rp > 0\">\n ) t0 WHERE t0.row BETWEEN (#{paramMap.firstResult} +1) AND\n (#{paramMap.firstResult} + #{paramMap.rp})\n </if>\n </select>\n <select id=\"get\" resultMap=\"BaseResultMap\" parameterType=\"java.lang.Integer\" >\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 </select>\n <delete id=\"delete\" parameterType=\"${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName}\" >\n DELETE FROM ${table.tableName}\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n </delete>\n <insert id=\"save\" parameterType=\"${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName}\" useGeneratedKeys=\"true\" keyProperty=\"${context.javaPkName}\">\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 </insert>\n <select id=\"queryCnt\" parameterType=\"com.shunwang.business.framework.mybatis.query.ConditionQuery\" resultType=\"java.lang.Integer\" >\n select count(*) from ${table.tableName} t\n <include refid=\"conditionQuery.core\" />\n </select>\n\n <update id=\"update\" parameterType=\"${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName}\">\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 </update>\n</mapper>','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.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'),(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<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<title>后台管理</title>\n<%@ include file=\"easyui_lib.jsp\" %>\n</head>\n<body>\n\n <div class=\"easyui-panel search-panel\">\n <form id=\"schForm\">\n <table>\n <tr>\n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n <td class=\"fm_lab\">${column.javaFieldName}:</td><td><input name=\"${column.javaFieldName}Sch\" type=\"text\"></td> \n #end\n#end\n<td><a id=\"schBtn\" class=\"easyui-linkbutton\" iconCls=\"icon-search\">查询</a></td>\n </tr>\n </table>\n </form>\n </div>\n\n <div id=\"toolbar\">\n <a id=\"addBtn\" class=\"easyui-linkbutton\" iconCls=\"icon-add\" plain=\"true\">添加</a>\n </div>\n \n <table id=\"dg\"></table>\n \n <div id=\"dlg\" class=\"easyui-dialog\" style=\"width:320px;height:280px;padding:10px 20px\"\n closed=\"true\" modal=\"true\" buttons=\"#dlg-buttons\">\n <form id=\"fm\" method=\"post\">\n <table class=\"insert-tab\">\n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n <tr>\n <td class=\"fm_lab\">${column.javaFieldName}:</td><td><input name=\"${column.javaFieldName}\" type=\"text\" class=\"easyui-validatebox\" required=\"true\"></td>\n </tr>\n #end\n#end\n </table>\n </form>\n </div>\n <div id=\"dlg-buttons\">\n <a id=\"saveBtn\" class=\"easyui-linkbutton\" iconCls=\"icon-ok\">保存</a>\n <a id=\"cancelBtn\" class=\"easyui-linkbutton\" iconCls=\"icon-cancel\">取消</a>\n </div>\n \n<script type=\"text/javascript\">\n#set($jq=\"$\") \n(function(){\nvar that = this;\n\nvar pk = \'${context.javaPkName}\'; // java类中的主键字段\nvar listUrl = ctx + \'list${context.javaBeanName}.do\'; // 查询\nvar addUrl = ctx + \'add${context.javaBeanName}.do\'; // 添加\nvar updateUrl = ctx + \'update${context.javaBeanName}.do\'; // 修改\nvar delUrl = ctx + \'del${context.javaBeanName}.do\'; // 删除\nvar submitUrl = \'\'; // 提交URL\n\nvar toolbarId = \'toolbar\'; // 工具条ID\n\nvar ${jq}dialog = ${jq}(\'#dlg\'); // 窗口\nvar ${jq}form = ${jq}(\'#fm\'); // 表单\nvar ${jq}grid = ${jq}(\'#dg\'); // 表格\nvar ${jq}schForm = ${jq}(\'#schForm\'); // 查询表单\n\nvar ${jq}schBtn = ${jq}(\'#schBtn\'); // 查询按钮\nvar ${jq}saveBtn = ${jq}(\'#saveBtn\'); // 保存按钮\nvar ${jq}cancelBtn = ${jq}(\'#cancelBtn\'); // 取消按钮\nvar ${jq}addBtn = ${jq}(\'#addBtn\'); // 添加按钮\n\n// 初始化表格\n${jq}grid.datagrid({ \n url:listUrl\n ,columns:[[\n#set($i=0)\n#foreach($column in $columns)\n #if($i>0),#end\n #if(!${column.isIdentityPk})\n {field:\'${column.javaFieldName}\',title:\'${column.javaFieldName}\'}\n #set($i=$i+1)\n #end \n#end \n ,{field:\'_btn1\',title:\'操作\',align:\'center\',formatter:function(val,row){\n return \'<a href=\"#\" onclick=\"\'+FunUtil.createFun(that,\'edit\',row)+\' return false;\">修改</a>\'\n + \'<span class=\"opt-split\">|</span>\'\n + \'<a href=\"#\" onclick=\"\'+FunUtil.createFun(that,\'del\',row)+\' return false;\">删除</a>\'\n }}\n ]]\n ,toolbar:\'#\' + toolbarId\n ,pagination:true\n ,fitColumns:true\n ,singleSelect:true\n ,striped:true\n ,pageSize:20\n});\n\n// 初始化事件\n${jq}addBtn.click(function(){\n ${jq}dialog.dialog(\'open\').dialog(\'setTitle\',\'添加\');\n ${jq}form.trigger(\'reset\');\n submitUrl = addUrl;\n});\n\n${jq}schBtn.click(function(){\n var data = getFormData(${jq}schForm);\n ${jq}grid.datagrid(\'load\',data);\n});\n\n${jq}saveBtn.click(function(){\n save();\n});\n\n${jq}cancelBtn.click(function(){\n ${jq}dialog.dialog(\'close\');\n});\n\n\n// 编辑\nthis.edit = function(row){\n if (row){\n ${jq}dialog.dialog(\'open\').dialog(\'setTitle\',\'修改\');\n ${jq}form.form(\'clear\').form(\'load\',row);\n \n submitUrl = updateUrl + [\'?\',pk,\'=\',row[pk]].join(\'\');\n }\n}\n\n// 保存\nthis.save = function(){\n var self = this;\n ${jq}form.form(\'submit\',{\n url: submitUrl,\n onSubmit: function(){\n return ${jq}(this).form(\'validate\');\n },\n success: function(resultTxt){\n var result = ${jq}.parseJSON(resultTxt);\n Action.execResult(result,function(result){\n ${jq}dialog.dialog(\'close\');// close the dialog\n ${jq}grid.datagrid(\'reload\');\n });\n }\n });\n}\n\n// 删除\nthis.del = function(row){\n if(row){\n ${jq}.messager.confirm(\'确认\',\'确定要删除该数据吗?\',function(r){\n if (r){\n Action.post(delUrl,row,function(result){\n Action.execResult(result,function(result){\n ${jq}grid.datagrid(\'reload\');\n });\n });\n }\n });\n }\n}\n\n})();\n</script>\n</body>\n</html>','admin'),(20,'sw-mybatis-mysql','${context.javaBeanNameLF}/mapper','xml','${context.javaBeanNameLF}Mapper.xml','<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\" >\n<mapper namespace=\"${context.packageName}.${context.javaBeanNameLF}.dao.${context.javaBeanName}Dao\">\n<resultMap id=\"BaseResultMap\" type=\"${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName}\">\n#foreach($column in $columns)\n <result property=\"${column.javaFieldName}\" column=\"${column.columnName}\" jdbcType=\"${column.mybatisJdbcType}\"/>\n#end \n</resultMap>\n <select id=\"query\" resultMap=\"BaseResultMap\" parameterType=\"com.shunwang.business.framework.mybatis.query.ConditionQuery\" >\n SELECT *\n FROM ${table.tableName} t\n <include refid=\"conditionQuery.core\" />\n <choose>\n <when test=\"paramMap.orderCol!=null\">\n ORDER BY ${paramMap.orderCol}\n </when>\n <otherwise>\n ORDER BY ${context.pkName} desc\n </otherwise>\n </choose>\n <if test=\"paramMap.rp>0\">\n LIMIT #{paramMap.firstResult},#{paramMap.rp}\n </if>\n </select>\n\n <select id=\"get\" resultMap=\"BaseResultMap\" parameterType=\"java.lang.Integer\" >\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 </select>\n <delete id=\"delete\" parameterType=\"${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName}\" >\n DELETE FROM ${table.tableName}\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\n </delete>\n <insert id=\"save\" parameterType=\"${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName}\" useGeneratedKeys=\"true\" keyProperty=\"${context.javaPkName}\">\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 </insert>\n <select id=\"queryCnt\" parameterType=\"com.shunwang.business.framework.mybatis.query.ConditionQuery\" resultType=\"java.lang.Integer\" >\n select count(*) from ${table.tableName} t\n <include refid=\"conditionQuery.core\" />\n </select>\n\n <update id=\"update\" parameterType=\"${context.packageName}.${context.javaBeanNameLF}.pojo.${context.javaBeanName}\">\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 </update>\n</mapper>','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<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<title>增删改查</title>\n</head>\n<body>\n<div class=\"search-wrap\">\n <div class=\"search-content\">\n <table class=\"search-tab\">\n <tr>\n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n <th>${column.javaFieldName}:</th><td id=\"txt-${column.javaFieldName}Sch\"></td> \n #end\n#end\n <td>\n <div id=\"btnSch\"></div>\n </td>\n </tr>\n </table>\n </div>\n </div>\n <div class=\"result-wrap\">\n <div class=\"result-title\">\n <div class=\"result-list\">\n <a id=\"addNew\" href=\"javascript:void(0)\"><i class=\"icon-font\"></i>新增</a>\n </div>\n </div>\n <div class=\"result-content\">\n <div id=\"grid\"></div>\n </div>\n </div>\n \n <div id=\"crudWin\" style=\"display: none;\">\n <table class=\"insert-tab\" width=\"100%\">\n <caption id=\"formMsg\"></caption>\n <tbody>\n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n <tr>\n <th>${column.javaFieldName}:</th><td id=\"txt-${column.javaFieldName}\"></td>\n </tr>\n #end\n#end\n </tbody>\n </table>\n </div>\n\n<script type=\"text/javascript\">\n(function(){\n \nvar schPanel;\nvar grid;\nvar formPanel;\nvar crudWin;\n\nvar pk = \'${context.javaPkName}\'; // java类中的主键字段\nvar listUrl = ctx + \'list${context.javaBeanName}.do\'; // 查询\nvar addUrl = ctx + \'add${context.javaBeanName}.do\'; // 添加\nvar updateUrl = ctx + \'update${context.javaBeanName}.do\'; // 修改\nvar delUrl = ctx + \'del${context.javaBeanName}.do\'; // 删除\n \nschPanel = new FDFormPanel({\n controls:[\n#set($i=0)\n#foreach($column in $columns) \n #if(!${column.isIdentityPk})\n #if($i>0),#end new FDTextBox({domId:\'txt-${column.javaFieldName}Sch\',name:\'${column.javaFieldName}Sch\'}) \n #set($i=$i+1) \n #end\n#end\n ]\n});\n\nnew FDButton({domId:\'btnSch\',text:\'查询\',onclick:function(){\n search();\n}});\n\ngrid = new FDGrid({\n domId:\'grid\'\n ,url:listUrl\n ,columns:[\n#set($i=0)\n#foreach($column in $columns)\n #if(!${column.isIdentityPk}) \n #if($i>0),#end {text:\'${column.javaFieldName}\',name:\'${column.javaFieldName}\'}\n #set($i=$i+1)\n #end \n#end \n ]\n ,actionButtons:[\n {text:\'修改\',onclick:update}\n ,{text:\'删除\',onclick:del}\n ]\n});\n\ncrudWin = new FDWindow({\n contentId:\'crudWin\'\n ,buttons:[\n {text:\'保存\',onclick:function(){\n formPanel.save();\n }}\n ,{text:\'取消\',onclick:function(){\n crudWin.hide();\n }}\n ]\n});\n\nformPanel = new FDFormPanel({\n grid:grid\n ,win:crudWin\n // 服务器端的请求\n ,crudUrl:{\n add: addUrl\n ,update: updateUrl\n ,del: delUrl\n }\n ,controls:[\n new FDHidden({name:pk,defaultValue:0})\n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n ,new FDTextBox({domId:\'txt-${column.javaFieldName}\',name:\'${column.javaFieldName}\',msgId:\'formMsg\',width:200\n ,validates:[\n {rule:{notNull:true},successClass:\'green\',errorClass:\'require-red\',errorMsg:\'${column.javaFieldName}不能为空\'}\n ]\n })\n #end\n#end\n ]\n});\n\n$(\'#addNew\').click(function(){\n add();\n});\n\nfunction add() {\n formPanel.add();\n}\n\nfunction update(rowData,rowIndex) {\n formPanel.update(rowData);\n}\n\n\nfunction del(row,rowIndex) {\n formPanel.del(row);\n}\n\nfunction search() {\n grid.search(schPanel.getData());\n}\n \n})();\n</script>\n</body>\n</html>','admin'),(24,'durc-bootstrap-ajax','jsp',NULL,'${context.javaBeanNameLF}.jsp','##请编辑velocity模板\n#set($jq=\"$\")\n<%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\"\n pageEncoding=\"UTF-8\"%>\n<%@ include file=\"taglib.jsp\" %>\n<c:set var=\"bluenile\" value=\"${jq}{res}bluenile/\"/>\n<c:set var=\"bsgrid\" value=\"${jq}{res}bsgrid/\"/>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title>后台管理</title>\n <meta content=\"IE=edge,chrome=1\" http-equiv=\"X-UA-Compatible\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <script type=\"text/javascript\">var ctx = \'${ctx}\';</script>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"${jq}{bluenile}lib/bootstrap/css/bootstrap.min.css\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"${jq}{bluenile}stylesheets/theme.css\">\n <link rel=\"stylesheet\" href=\"${jq}{bluenile}lib/font-awesome/css/font-awesome.css\">\n <script src=\"${jq}{bluenile}lib/jquery-1.7.2.min.js\" type=\"text/javascript\"></script>\n <script src=\"${jq}{res}js/common.js\" type=\"text/javascript\"></script>\n <!-- datepicker -->\n <script src=\"${jq}{res}My97DatePicker/WdatePicker.js\" type=\"text/javascript\"></script>\n <!-- validate -->\n <script src=\"${jq}{res}jqueryValidate/jquery.validate.min.js\" type=\"text/javascript\"></script>\n <script src=\"${jq}{res}jqueryValidate/localization/messages_zh.min.js\" type=\"text/javascript\"></script>\n <!-- dialog -->\n <link rel=\"stylesheet\" href=\"${jq}{res}artDialog/css/ui-dialog.css\">\n <script src=\"${jq}{res}artDialog/dist/dialog-plus-min.js\"></script>\n <!-- bsgrid -->\n <link rel=\"stylesheet\" href=\"${jq}{bsgrid}merged/bsgrid.all.min.css\"/>\n <script type=\"text/javascript\" src=\"${jq}{bsgrid}js/lang/grid.zh-CN.min.js\"></script>\n <script type=\"text/javascript\" src=\"${jq}{bsgrid}merged/bsgrid.all.min.js\"></script>\n \n <!--[if lt IE 9]>\n <script type=\"text/javascript\" src=\"${jq}{bluenile}lib/bootstrap/js/respond.min.js\"></script>\n <![endif]-->\n <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->\n <!--[if lt IE 9]>\n <script src=\"${jq}{bluenile}lib/html5.js\"></script>\n <![endif]-->\n </head>\n\n <!--[if lt IE 7 ]> <body class=\"ie ie6\"> <![endif]-->\n <!--[if IE 7 ]> <body class=\"ie ie7 \"> <![endif]-->\n <!--[if IE 8 ]> <body class=\"ie ie8 \"> <![endif]-->\n <!--[if IE 9 ]> <body class=\"ie ie9 \"> <![endif]-->\n <!--[if (gt IE 9)|!(IE)]><!--> \n <body class=\"\"> \n <!--<![endif]-->\n <div class=\"navbar\">\n <div class=\"navbar-inner\">\n <ul class=\"nav pull-right\">\n <li><a href=\"#\" class=\"hidden-phone visible-tablet visible-desktop\">设置</a></li>\n <li id=\"fat-menu\" class=\"dropdown\">\n <a href=\"#\" role=\"button\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"icon-user\"></i> admin\n <i class=\"icon-caret-down\"></i>\n </a>\n <ul class=\"dropdown-menu\">\n <li><a href=\"#\">我的账号</a></li>\n <li class=\"divider\"></li>\n <li><a href=\"#\">退出</a></li>\n </ul>\n </li>\n </ul>\n <a class=\"brand\" href=\"#\"><span class=\"first\">后台管理</span></a>\n </div>\n </div>\n \n <div class=\"sidebar-nav\">\n <a href=\"#dashboard-menu\" class=\"nav-header\" data-toggle=\"collapse\"><i class=\"icon-dashboard\"></i>基础管理</a>\n <ul id=\"dashboard-menu\" class=\"nav nav-list collapse in\">\n <li class=\"active\"><a href=\"orderInfo_bootstrap_ajax.jsp\">订单管理</a></li>\n \n </ul>\n </div>\n \n <div class=\"content\">\n <div class=\"header\">\n <span class=\"page-title\">订单管理</span>\n </div>\n\n <div class=\"container-fluid\">\n <div class=\"row-fluid\">\n <div style=\"padding-top: 20px;\">\n <!-- content here -->\n <form id=\"schFrm\" class=\"form-inline\" onsubmit=\"return false;\">\n <table>\n <tr>\n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n <td>${column.javaFieldName}:</td><td><input name=\"${column.javaFieldName}Sch\" type=\"text\"></td> \n #end\n#end\n </tr>\n </table>\n <button id=\"schBtn\" class=\"btn\"><i class=\"icon-search\"></i>查询</button>\n <input type=\"reset\" class=\"btn\" value=\"清空\">\n </form>\n <hr>\n <div class=\"btn-toolbar\">\n <button id=\"addBtn\" class=\"btn btn-primary\"><i class=\"icon-plus\"></i> 新增订单</button>\n <div class=\"btn-group\">\n </div>\n </div>\n <table id=\"searchTable\">\n <tr> \n#foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n <th w_index=\"${column.javaFieldName}\">${column.javaFieldName}</th>\n #end \n#end \n<th w_render=\"operate\" width=\"10%;\">操作</th>\n </tr>\n </table>\n \n <div id=\"crudWin\">\n <form id=\"crudFrm\">\n <table>\n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n <tr>\n <td>${column.javaFieldName}:</td><td><input name=\"${column.javaFieldName}\" type=\"text\" required=\"true\"></td>\n </tr>\n #end\n#end\n </table>\n </form>\n </div>\n \n<script type=\"text/javascript\"> \nvar that = this;\n\nvar pk = \'${context.javaPkName}\'; // java类中的主键字段\nvar listUrl = ctx + \'list${context.javaBeanName}.do\'; // 查询\nvar addUrl = ctx + \'add${context.javaBeanName}.do\'; // 添加\nvar updateUrl = ctx + \'update${context.javaBeanName}.do\'; // 修改\nvar delUrl = ctx + \'del${context.javaBeanName}.do\'; // 删除\nvar submitUrl = \'\'; // 提交URL\n\nvar gridObj; // 表格\nvar crudWin; // 窗口\nvar ${jq}schFrm = ${jq}(\'#schFrm\'); // 查询表单\nvar ${jq}crudFrm = ${jq}(\'#crudFrm\'); // 编辑表单\n\nvar ${jq}schBtn = ${jq}(\'#schBtn\'); // 查询按钮\nvar ${jq}addBtn = ${jq}(\'#addBtn\'); // 添加按钮\n\nvar validator; // 验证器\n\nfunction reset() {\n ${jq}crudFrm.get(0).reset();\n validator.resetForm();\n}\n\n\n// 初始化事件\n${jq}addBtn.click(function() {\n reset();\n crudWin.title(\'添加\');\n crudWin.show();\n submitUrl = addUrl;\n});\n\n${jq}schBtn.click(function() {\n search();\n});\n\ngridObj = ${jq}.fn.bsgrid.init(\'searchTable\', {\n url: listUrl\n ,pageSizeSelect: true\n ,stripeRows: true\n ,rowHoverColor: true\n ,rowSelectedColor: false\n ,pageSize: 10\n});\n\ncrudWin = dialog({\n title: \'编辑\',\n width:400,\n content: document.getElementById(\'crudWin\'),\n okValue: \'保存\',\n ok: function () {\n that.save();\n return false;\n },\n cancelValue: \'取消\',\n cancel: function () {\n this.close();\n return false;\n }\n});\n\nfunction search(){\n gridObj.options.otherParames = getFormData(${jq}schFrm);\n gridObj.gotoPage(1);\n}\n\nfunction operate(row, rowIndex, colIndex, options) {\n return \'<a href=\"#\" onclick=\"\'\n + FunUtil.createFun(that, \'edit\', row)\n + \' return false;\">修改</a>\'\n + \'&nbsp;&nbsp;\'\n + \'<a href=\"#\" onclick=\"\'\n + FunUtil.createFun(that, \'del\', row)\n + \' return false;\">删除</a>\';\n}\n\n// 保存\nthis.save = function() {\n var self = this;\n var data = getFormData(${jq}crudFrm);\n var validateVal = validator.form();\n if(validateVal) {\n Action.post(submitUrl, data, function(result) {\n Action.execResult(result, function(result) {\n gridObj.refreshPage();\n crudWin.close();\n });\n });\n }\n}\n // 编辑\nthis.edit = function(row) {\n if (row) {\n reset();\n crudWin.title(\'修改\');\n loadFormData(${jq}crudFrm,row);\n submitUrl = updateUrl + \'?\' + pk + \'=\' + row[pk];\n crudWin.show();\n }\n}\n\n// 删除\nthis.del = function(row) {\n if (row) {\n var d = dialog({\n title: \'提示\',\n width: 200,\n content: \'确定要删除该记录吗?\',\n okValue: \'确定\',\n ok: function () {\n Action.post(delUrl, row, function(result) {\n Action.execResult(result, function(result) {\n gridObj.refreshPage();\n });\n });\n },\n cancelValue: \'取消\',\n cancel: function () {}\n });\n d.showModal();\n }\n}\n\nvalidator = ${jq}crudFrm.validate();\n</script>\n <footer>\n <hr>\n <p>&copy; 2016</p>\n </footer>\n </div>\n </div>\n </div>\n </div>\n\n <script src=\"${jq}{bluenile}lib/bootstrap/js/bootstrap.min.js\"></script>\n </body>\n</html>\n','admin'),(25,'durc_SearchEntityBs','entity',NULL,'${context.javaBeanName}Sch.java','package ${context.packageName}.entity;\n\nimport org.durcframework.core.SearchEntity;\nimport org.durcframework.core.expression.annotation.ValueField;\n\nimport org.durcframework.core.support.BsgridSearch;\n\npublic class ${context.javaBeanName}Sch extends BsgridSearch {\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'),(27,'durc_ControllerBs','controller',NULL,'${context.javaBeanName}Controller','package ${context.packageName}.controller;\n\nimport org.durcframework.core.support.BsgridController;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.servlet.ModelAndView;\n\nimport ${context.packageName}.entity.${context.javaBeanName};\nimport ${context.packageName}.entity.${context.javaBeanName}Sch;\nimport ${context.packageName}.service.${context.javaBeanName}Service;\n\n\n@Controller\npublic class ${context.javaBeanName}Controller extends\n BsgridController<${context.javaBeanName}, ${context.javaBeanName}Service> {\n\n @RequestMapping(\"/add${context.javaBeanName}.do\")\n public ModelAndView add${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.add(entity);\n }\n\n @RequestMapping(\"/list${context.javaBeanName}.do\")\n public ModelAndView list${context.javaBeanName}(${context.javaBeanName}Sch searchEntity) {\n return this.list(searchEntity);\n }\n\n @RequestMapping(\"/update${context.javaBeanName}.do\")\n public ModelAndView update${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.modify(entity);\n }\n\n @RequestMapping(\"/del${context.javaBeanName}.do\")\n public ModelAndView del${context.javaBeanName}(${context.javaBeanName} entity) {\n return this.remove(entity);\n }\n \n}\n','admin'),(28,'durc-jsp-flatlab','jsp',NULL,'${context.javaBeanNameLF}.jsp','##请编辑velocity模板\n#set($jq=\"$\")\n<%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\"\n pageEncoding=\"UTF-8\"%>\n<%@ include file=\"taglib.jsp\" %>\n<c:set var=\"flatlab\" value=\"${jq}{res}flatlab/\"/>\n<c:set var=\"bsgrid\" value=\"${jq}{res}bsgrid/\"/>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"shortcut icon\" href=\"${jq}{flatlab}img/favicon.png\">\n <title>后台管理</title>\n <script type=\"text/javascript\">var ctx = \'${jq}{ctx}\';</script>\n <!-- Bootstrap core CSS -->\n <link href=\"${jq}{flatlab}css/bootstrap.min.css\" rel=\"stylesheet\">\n <link href=\"${jq}{flatlab}css/bootstrap-reset.css\" rel=\"stylesheet\">\n <!--external css-->\n <link href=\"${jq}{flatlab}assets/font-awesome/css/font-awesome.css\" rel=\"stylesheet\" />\n <!-- Custom styles for this template -->\n <link href=\"${jq}{flatlab}css/style.css\" rel=\"stylesheet\">\n <link href=\"${jq}{flatlab}css/style-responsive.css\" rel=\"stylesheet\" />\n <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->\n <!--[if lt IE 9]>\n <script src=\"${jq}{flatlab}js/html5shiv.js\"></script>\n <script src=\"${jq}{flatlab}js/respond.min.js\"></script>\n <![endif]-->\n <script src=\"${jq}{flatlab}js/jquery.js\"></script>\n \n <script src=\"${jq}{res}js/common.js\" type=\"text/javascript\"></script>\n <!-- datepicker -->\n <script src=\"${jq}{res}My97DatePicker/WdatePicker.js\" type=\"text/javascript\"></script>\n <!-- validate -->\n <script src=\"${jq}{res}jqueryValidate/jquery.validate.min.js\" type=\"text/javascript\"></script>\n <script src=\"${jq}{res}jqueryValidate/localization/messages_zh.min.js\" type=\"text/javascript\"></script>\n <!-- dialog -->\n <link rel=\"stylesheet\" href=\"${jq}{res}artDialog/css/ui-dialog.css\">\n <script src=\"${jq}{res}artDialog/dist/dialog-plus-min.js\"></script>\n <!-- bsgrid -->\n <link rel=\"stylesheet\" href=\"${jq}{bsgrid}merged/bsgrid.all.min.css\"/>\n <link rel=\"stylesheet\" href=\"${jq}{bsgrid}css/skins/grid_flexigrid.min.css\"/>\n <script type=\"text/javascript\" src=\"${jq}{bsgrid}js/lang/grid.zh-CN.min.js\"></script>\n <script type=\"text/javascript\" src=\"${jq}{bsgrid}merged/bsgrid.all.min.js\"></script>\n </head>\n\n <body>\n\n <section id=\"container\" class=\"\">\n <!--header start-->\n <header class=\"header dark-bg\">\n <div class=\"sidebar-toggle-box\">\n <div data-original-title=\"显示/隐藏菜单\" data-placement=\"right\" class=\"fa fa-bars tooltips\"></div>\n </div>\n <!--logo start-->\n <a href=\"#\" class=\"logo\" >后台<span>管理</span></a>\n <!--logo end-->\n <div class=\"top-nav \">\n <ul class=\"nav pull-right top-menu\">\n <!-- user login dropdown start-->\n <li class=\"dropdown\">\n <a data-toggle=\"dropdown\" class=\"dropdown-toggle\" href=\"#\">\n <span class=\"username\">admin</span>\n <b class=\"caret\"></b>\n </a>\n <ul class=\"dropdown-menu extended logout\">\n <div class=\"log-arrow-up\"></div>\n <li><a href=\"#\"><i class=\"fa fa-cog\"></i> 修改密码</a></li>\n <li><a href=\"#\"><i class=\"fa fa-key\"></i> 退出</a></li>\n </ul>\n </li>\n <!-- user login dropdown end -->\n </ul>\n </div>\n </header>\n <!--header end-->\n <!--sidebar start-->\n <aside>\n <div id=\"sidebar\" class=\"nav-collapse \">\n <!-- sidebar menu start-->\n <ul class=\"sidebar-menu\" id=\"nav-accordion\">\n <li>\n <a href=\"#\">\n <i class=\"fa fa-dashboard\"></i>\n <span>首页</span>\n </a>\n </li>\n <li class=\"sub-menu\">\n <a href=\"javascript:;\" class=\"active\">\n <i class=\"fa fa-laptop\"></i>\n <span>基础管理</span>\n </a>\n <ul class=\"sub\" >\n <li class=\"active\"><a href=\"${ctx}orderInfo.jsp\">订单管理</a></li>\n </ul>\n </li>\n\n </ul>\n <!-- sidebar menu end-->\n </div>\n </aside>\n <!--sidebar end-->\n <!--main content start-->\n <section id=\"main-content\">\n <section class=\"wrapper site-min-height\">\n <!-- page start-->\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <div class=\"border-head\">\n <h3>订单管理</h3>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <section class=\"panel\">\n <div class=\"panel-body\">\n <form id=\"schFrm\" class=\"form-inline\" onsubmit=\"return false;\"> \n #foreach($column in $columns)\n #if(!${column.isIdentityPk})\n ${column.javaFieldName}:<input name=\"${column.javaFieldName}Sch\" type=\"text\" class=\"form-control\"> \n #end\n #end\n <button id=\"schBtn\" class=\"btn btn-primary\"><i class=\"icon-search\"></i>查询</button>\n <input type=\"reset\" class=\"btn\" value=\"清空\">\n </form>\n </div>\n </section>\n <section class=\"panel\">\n <div class=\"panel-body\">\n <div class=\"btn-group\">\n <a id=\"addBtn\" class=\"btn btn-primary\">\n <i class=\"fa fa-plus\"></i> 新增订单 \n </a>\n </div>\n <hr>\n <table id=\"searchTable\">\n <tr> \n#foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n <th w_index=\"${column.javaFieldName}\">${column.javaFieldName}</th>\n #end \n#end \n<th w_render=\"operate\" width=\"10%;\">操作</th>\n </tr>\n </table>\n </div>\n </section>\n </div>\n </div>\n \n <div id=\"crudWin\">\n <form id=\"crudFrm\">\n <table class=\"table table-bordered\">\n #foreach($column in $columns)\n #if(!${column.isIdentityPk})\n <tr>\n <td>${column.javaFieldName}:</td><td><input name=\"${column.javaFieldName}\" type=\" required=\"true\"></td>\n </tr>\n #end\n #end\n </table>\n </form>\n </div>\n \n<script type=\"text/javascript\"> \nvar that = this;\n\nvar pk = \'${context.javaPkName}\'; // java类中的主键字段\nvar listUrl = ctx + \'listBsgrid${context.javaBeanName}.do\'; // 查询\nvar addUrl = ctx + \'addBsgrid${context.javaBeanName}.do\'; // 添加\nvar updateUrl = ctx + \'updateBsgrid${context.javaBeanName}.do\'; // 修改\nvar delUrl = ctx + \'delBsgrid${context.javaBeanName}.do\'; // 删除\nvar submitUrl = \'\'; // 提交URL\n\nvar gridObj; // 表格\nvar crudWin; // 窗口\nvar ${jq}schFrm = ${jq}(\'#schFrm\'); // 查询表单\nvar ${jq}crudFrm = ${jq}(\'#crudFrm\'); // 编辑表单\n\nvar ${jq}schBtn = ${jq}(\'#schBtn\'); // 查询按钮\nvar ${jq}addBtn = ${jq}(\'#addBtn\'); // 添加按钮\n\nvar validator; // 验证器\n\nfunction reset() {\n ${jq}crudFrm.get(0).reset();\n validator.resetForm();\n}\n\n\n// 初始化事件\n${jq}addBtn.click(function() {\n submitUrl = addUrl;\n reset();\n crudWin.title(\'添加\');\n crudWin.show(); \n});\n\n${jq}schBtn.click(function() {\n search();\n});\n\ngridObj = ${jq}.fn.bsgrid.init(\'searchTable\', {\n url: listUrl\n ,pageSizeSelect: true\n ,stripeRows: true\n ,rowHoverColor: true\n ,rowSelectedColor: false\n ,pageSize: 10\n});\n\ncrudWin = dialog({\n title: \'编辑\',\n width:400,\n content: document.getElementById(\'crudWin\'),\n okValue: \'保存\',\n ok: function () {\n that.save();\n return false;\n },\n cancelValue: \'取消\',\n cancel: function () {\n this.close();\n return false;\n }\n});\n\nfunction search(){\n gridObj.options.otherParames = getFormData(${jq}schFrm);\n gridObj.gotoPage(1);\n}\n\nfunction operate(row, rowIndex, colIndex, options) {\n return \'<a href=\"#\" onclick=\"\'\n + FunUtil.createFun(that, \'edit\', row)\n + \' return false;\">修改</a>\'\n + \'&nbsp;&nbsp;\'\n + \'<a href=\"#\" onclick=\"\'\n + FunUtil.createFun(that, \'del\', row)\n + \' return false;\">删除</a>\';\n}\n\n// 保存\nthis.save = function() {\n var self = this;\n var data = getFormData(${jq}crudFrm);\n var validateVal = validator.form();\n if(validateVal) {\n Action.post(submitUrl, data, function(result) {\n Action.execResult(result, function(result) {\n gridObj.refreshPage();\n crudWin.close();\n });\n });\n }\n}\n // 编辑\nthis.edit = function(row) {\n if (row) {\n submitUrl = updateUrl + \'?\' + pk + \'=\' + row[pk];\n reset();\n crudWin.title(\'修改\');\n loadFormData(${jq}crudFrm,row); \n crudWin.show();\n }\n}\n\n// 删除\nthis.del = function(row) {\n if (row) {\n var d = dialog({\n title: \'提示\',\n width: 200,\n content: \'确定要删除该记录吗?\',\n okValue: \'确定\',\n ok: function () {\n Action.post(delUrl, row, function(result) {\n Action.execResult(result, function(result) {\n gridObj.refreshPage();\n });\n });\n },\n cancelValue: \'取消\',\n cancel: function () {}\n });\n d.showModal();\n }\n}\n\nvalidator = ${jq}crudFrm.validate();\n</script>\n <!-- page end-->\n </section>\n </section>\n <!--main content end-->\n\n <!--footer start-->\n <footer class=\"site-footer\">\n <div class=\"text-center\">\n 2016 &copy; \n <a href=\"#\" class=\"go-top\">\n <i class=\"fa fa-angle-up\"></i>\n </a>\n </div>\n </footer>\n <!--footer end-->\n </section>\n\n <!-- js placed at the end of the document so the pages load faster -->\n <script src=\"${jq}{flatlab}js/bootstrap.min.js\"></script>\n <script class=\"include\" type=\"text/javascript\" src=\"${jq}{flatlab}js/jquery.dcjqaccordion.2.7.js\"></script>\n <script src=\"${jq}{flatlab}js/jquery.scrollTo.min.js\"></script>\n <script src=\"${jq}{flatlab}js/slidebars.min.js\"></script>\n <script src=\"${jq}{flatlab}js/jquery.nicescroll.js\" type=\"text/javascript\"></script>\n <script src=\"${jq}{flatlab}js/respond.min.js\" ></script>\n \n <!--common script for all pages-->\n <script src=\"${jq}{flatlab}js/common-scripts.js\"></script>\n </body>\n</html>\n','admin'),(29,'durc-jsp-AdminLTE','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<c:set var=\"AdminLTE\" value=\"${jq}{res}AdminLTE/\"/>\n<c:set var=\"bsgrid\" value=\"${jq}{res}bsgrid/\"/>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <title>后台管理</title>\n <script type=\"text/javascript\">var ctx = \'${jq}{ctx}\';</script>\n <!-- Tell the browser to be responsive to screen width -->\n <meta content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\" name=\"viewport\">\n <!-- Bootstrap 3.3.5 -->\n <link rel=\"stylesheet\" href=\"${jq}{AdminLTE}bootstrap/css/bootstrap.min.css\">\n <!-- Font Awesome -->\n <link rel=\"stylesheet\" href=\"${jq}{AdminLTE}plugins/font-awesome/css/font-awesome.min.css\">\n <!-- Ionicons -->\n <link rel=\"stylesheet\" href=\"${jq}{AdminLTE}plugins/ionicons/css/ionicons.min.css\">\n <!-- Theme style -->\n <link rel=\"stylesheet\" href=\"${jq}{AdminLTE}dist/css/AdminLTE.min.css\">\n <!-- AdminLTE Skins. We have chosen the skin-blue for this starter\n page. However, you can choose any other skin. Make sure you\n apply the skin class to the body tag so the changes take effect.\n -->\n <link rel=\"stylesheet\" href=\"${jq}{AdminLTE}dist/css/skins/skin-blue-light.min.css\">\n\n <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->\n <!-- WARNING: Respond.js doesn\'t work if you view the page via file:// -->\n <!--[if lt IE 9]>\n <script src=\"${jq}{AdminLTE}plugins/html5shiv.js\"></script>\n <script src=\"${jq}{AdminLTE}plugins/respond.min.js\"></script>\n <![endif]-->\n <script src=\"${jq}{AdminLTE}plugins/jQuery/jquery.min.js\"></script>\n \n <script src=\"${jq}{res}js/common.js\" type=\"text/javascript\"></script>\n <!-- datepicker -->\n <script src=\"${jq}{res}My97DatePicker/WdatePicker.js\" type=\"text/javascript\"></script>\n <!-- validate -->\n <script src=\"${jq}{res}jqueryValidate/jquery.validate.min.js\" type=\"text/javascript\"></script>\n <script src=\"${jq}{res}jqueryValidate/localization/messages_zh.min.js\" type=\"text/javascript\"></script>\n <!-- dialog -->\n <link rel=\"stylesheet\" href=\"${jq}{res}artDialog/css/ui-dialog.css\">\n <script src=\"${jq}{res}artDialog/dist/dialog-plus-min.js\"></script>\n <!-- bsgrid -->\n <link rel=\"stylesheet\" href=\"${jq}{bsgrid}merged/bsgrid.all.min.css\"/>\n <link rel=\"stylesheet\" href=\"${jq}{bsgrid}css/skins/grid_skin.min.css\"/>\n <script type=\"text/javascript\" src=\"${jq}{bsgrid}js/lang/grid.zh-CN.min.js\"></script>\n <script type=\"text/javascript\" src=\"${jq}{bsgrid}merged/bsgrid.all.min.js\"></script>\n \n </head>\n <body class=\"hold-transition skin-blue-light sidebar-mini\">\n <div class=\"wrapper\">\n\n <!-- Main Header -->\n <header class=\"main-header\">\n\n <!-- Logo -->\n <a href=\"#\" class=\"logo\">\n <!-- mini logo for sidebar mini 50x50 pixels -->\n <span class=\"logo-mini\"></span>\n <!-- logo for regular state and mobile devices -->\n <span class=\"logo-lg\">后台管理</span>\n </a>\n\n <!-- Header Navbar -->\n <nav class=\"navbar navbar-static-top\" role=\"navigation\">\n <!-- Sidebar toggle button-->\n <a href=\"#\" class=\"sidebar-toggle\" data-toggle=\"offcanvas\">\n <span class=\"sr-only\">Toggle navigation</span>\n </a>\n <!-- Navbar Right Menu -->\n <div class=\"navbar-custom-menu\">\n <ul class=\"nav navbar-nav\">\n <li>\n <a href=\"#\"><i class=\"fa fa-share\"></i>退出</a>\n </li>\n </ul>\n </div>\n </nav>\n </header>\n <!-- Left side column. contains the logo and sidebar -->\n <aside class=\"main-sidebar\">\n\n <!-- sidebar: style can be found in sidebar.less -->\n <section class=\"sidebar\">\n <!-- Sidebar user panel -->\n <div class=\"user-panel\">\n <div>你好,<span>admin</span></div>\n </div>\n <!-- Sidebar Menu -->\n <ul class=\"sidebar-menu\">\n <!-- Optionally, you can add icons to the links -->\n <li><a href=\"#\"><i class=\"fa fa-dashboard\"></i> <span>首页</span></a></li>\n <li class=\"treeview active\">\n <a href=\"#\"><i class=\"fa fa-link\"></i> <span>基础管理</span> <i class=\"fa fa-angle-left pull-right\"></i></a>\n <ul class=\"treeview-menu\">\n <li class=\"active\"><a href=\"#\"><i class=\"fa fa-circle-o\"></i> 订单管理</a></li>\n </ul>\n </li>\n </ul><!-- /.sidebar-menu -->\n </section>\n <!-- /.sidebar -->\n </aside>\n\n <!-- Content Wrapper. Contains page content -->\n <div class=\"content-wrapper\">\n <!-- Content Header (Page header) -->\n <section class=\"content-header\">\n <h1>订单管理\n<!-- <small>管理您的订单</small> -->\n </h1>\n </section>\n\n <!-- Main content -->\n <section class=\"content\">\n\n <!-- Your Page Content Here -->\n <div class=\"box box-default\">\n <div class=\"box-body\">\n <!-- form start -->\n <form id=\"schFrm\" class=\"form-inline\" onsubmit=\"return false;\">\n #foreach($column in $columns)\n #if(!${column.isIdentityPk})\n${column.javaFieldName}:<input name=\"${column.javaFieldName}Sch\" type=\"text\" class=\"form-control\"> \n #end\n #end\n <button id=\"schBtn\" type=\"submit\" class=\"btn btn-primary\"><i class=\"fa fa-search\"></i> 查询</button>\n <button type=\"reset\" class=\"btn btn-default\"><i class=\"fa fa-remove\"></i> 清空</button>\n </form>\n </div><!-- /.box-body -->\n </div>\n \n <div class=\"box\">\n <div class=\"box-header\">\n <div class=\"btn-group\">\n <a id=\"addBtn\" class=\"btn btn-primary\">\n <i class=\"fa fa-plus\"></i> 新增订单 \n </a>\n </div>\n </div><!-- /.box-header -->\n \n <div class=\"box-body\"> \n <table id=\"searchTable\">\n <tr> \n #foreach($column in $columns) \n #if(!${column.isIdentityPk}) \n <th w_index=\"${column.javaFieldName}\">${column.javaFieldName}</th>\n #end \n #end \n <th w_render=\"operate\" width=\"10%;\">操作</th>\n </tr>\n </table>\n </div><!-- /.box-body -->\n </div>\n \n <div id=\"crudWin\">\n <form id=\"crudFrm\" class=\"form-horizontal\">\n #foreach($column in $columns)\n #if(!${column.isIdentityPk}) \n <div class=\"form-group\">\n <label class=\"col-sm-3 control-label\">${column.javaFieldName}</label>\n <div class=\"col-sm-7\">\n <input name=\"${column.javaFieldName}\" type=\"text\" class=\"form-control\" required=\"true\">\n </div>\n </div>\n #end\n #end \n </form>\n </div>\n \n<script type=\"text/javascript\"> \nvar that = this;\n\nvar pk = \'${context.javaPkName}\'; // java类中的主键字段\nvar listUrl = ctx + \'listBsgrid${context.javaBeanName}.do\'; // 查询\nvar addUrl = ctx + \'addBsgrid${context.javaBeanName}.do\'; // 添加\nvar updateUrl = ctx + \'updateBsgrid${context.javaBeanName}.do\'; // 修改\nvar delUrl = ctx + \'delBsgrid${context.javaBeanName}.do\'; // 删除\nvar submitUrl = \'\'; // 提交URL\n\nvar gridObj; // 表格\nvar crudWin; // 窗口\nvar ${jq}schFrm = ${jq}(\'#schFrm\'); // 查询表单\nvar ${jq}crudFrm = ${jq}(\'#crudFrm\'); // 编辑表单\n\nvar ${jq}schBtn = ${jq}(\'#schBtn\'); // 查询按钮\nvar ${jq}addBtn = ${jq}(\'#addBtn\'); // 添加按钮\n\nvar validator; // 验证器\n\nfunction reset() {\n ${jq}crudFrm.get(0).reset();\n validator.resetForm();\n}\n\n\n// 初始化事件\n${jq}addBtn.click(function() {\n submitUrl = addUrl;\n reset();\n crudWin.title(\'添加\');\n crudWin.showModal(); \n});\n\n${jq}schBtn.click(function() {\n search();\n});\n\ngridObj = ${jq}.fn.bsgrid.init(\'searchTable\', {\n url: listUrl\n ,pageSizeSelect: true\n ,rowHoverColor: true // 移动行变色\n ,rowSelectedColor: false // 选择行不高亮\n ,isProcessLockScreen:false // 加载数据不显示遮罩层\n ,displayBlankRows: false\n ,pageSize: 10\n});\n\ncrudWin = dialog({\n title: \'编辑\',\n width:400,\n content: document.getElementById(\'crudWin\'),\n okValue: \'保存\',\n ok: function () {\n that.save();\n return false;\n },\n cancelValue: \'取消\',\n cancel: function () {\n this.close();\n return false;\n }\n});\n\nfunction search(){\n var schData = getFormData(${jq}schFrm);\n gridObj.search(schData);\n}\n\nfunction operate(row, rowIndex, colIndex, options) {\n return \'<a href=\"#\" onclick=\"\'\n + FunUtil.createFun(that, \'edit\', row)\n + \' return false;\">修改</a>\'\n + \'&nbsp;&nbsp;\'\n + \'<a href=\"#\" onclick=\"\'\n + FunUtil.createFun(that, \'del\', row)\n + \' return false;\">删除</a>\';\n}\n\n// 保存\nthis.save = function() {\n var self = this;\n var data = getFormData(${jq}crudFrm);\n var validateVal = validator.form();\n if(validateVal) {\n Action.post(submitUrl, data, function(result) {\n Action.execResult(result, function(result) {\n gridObj.refreshPage();\n crudWin.close();\n });\n });\n }\n}\n // 编辑\nthis.edit = function(row) {\n if (row) {\n submitUrl = updateUrl + \'?\' + pk + \'=\' + row[pk];\n reset();\n crudWin.title(\'修改\');\n loadFormData(${jq}crudFrm,row); \n crudWin.showModal();\n }\n}\n\n// 删除\nthis.del = function(row) {\n if (row) {\n var d = dialog({\n title: \'提示\',\n width: 200,\n content: \'确定要删除该记录吗?\',\n okValue: \'确定\',\n ok: function () {\n Action.post(delUrl, row, function(result) {\n Action.execResult(result, function(result) {\n gridObj.refreshPage();\n });\n });\n },\n cancelValue: \'取消\',\n cancel: function () {}\n });\n d.showModal();\n }\n}\n\nvalidator = ${jq}crudFrm.validate();\n</script>\n\n </section><!-- /.content -->\n </div><!-- /.content-wrapper -->\n\n <!-- Main Footer -->\n <footer class=\"main-footer\">\n <!-- Default to the left -->\n <strong>Copyright &copy; 2016</strong>\n </footer>\n\n </div><!-- ./wrapper -->\n\n <!-- REQUIRED JS SCRIPTS -->\n <!-- Bootstrap 3.3.5 -->\n <script src=\"${jq}{AdminLTE}bootstrap/js/bootstrap.min.js\"></script>\n <!-- AdminLTE App -->\n <script src=\"${jq}{AdminLTE}dist/js/app.min.js\"></script>\n\n <!-- Optionally, you can add Slimscroll and FastClick plugins.\n Both of these plugins are recommended to enhance the\n user experience. Slimscroll is required when using the\n fixed layout. -->\n </body>\n</html>\n','admin'),(30,'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<c:set var=\"bui\" value=\"${jq}{res}bui/\"/>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n <head>\n <title>后台管理</title>\n <script type=\"text/javascript\">var ctx = \'${ctx}\';</script>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <link href=\"${jq}{bui}css/dpl-min.css\" rel=\"stylesheet\" type=\"text/css\" />\n <link href=\"${jq}{bui}css/bui-min.css\" rel=\"stylesheet\" type=\"text/css\" />\n <link href=\"${jq}{bui}css/page-min.css\" rel=\"stylesheet\" type=\"text/css\" />\n </head>\n<body>\n \n <div class=\"container\">\n <div class=\"row\">\n <form id=\"searchForm\" class=\"form-horizontal\">\n <div class=\"row\"> \n #foreach($column in $columns)\n #if(!${column.isIdentityPk})\n <div class=\"control-group span8\">\n <label class=\"control-label\">${column.javaFieldName}:</label>\n <div class=\"controls\">\n <input type=\"text\" class=\"control-text\" name=\"${column.javaFieldName}Sch\">\n </div>\n </div> \n #end\n #end\n\n\n <div class=\"control-group\">\n <div class=\"controls\">\n <button type=\"button\" id=\"schBtn\" class=\"button button-primary\">搜索</button>\n </div>\n </div>\n </div>\n </form>\n </div>\n <hr>\n <div class=\"search-grid-container\">\n <div id=\"grid\"></div>\n </div>\n </div>\n \n <div id=\"content\" class=\"hide\">\n <form id=\"J_Form\" class=\"form-horizontal\"> \n #foreach($column in $columns)\n #if(!${column.isIdentityPk}) \n <div class=\"row\">\n <div class=\"control-group span8\">\n <label class=\"control-label\"><s>*</s>${column.javaFieldName}</label>\n <div class=\"controls\">\n <input name=\"${column.javaFieldName}\" data-rules=\"{required:true}\" class=\"input-normal control-text\" type=\"text\"/>\n </div>\n </div>\n </div>\n #end\n #end \n\n </form>\n </div>\n \n <script type=\"text/javascript\" src=\"${jq}{bui}js/jquery-1.8.1.min.js\"></script>\n <script type=\"text/javascript\" src=\"${jq}{bui}js/bui-min.js\"></script>\n <script type=\"text/javascript\" src=\"${jq}{res}js/common.js\"></script>\n \n<script type=\"text/javascript\">\n${jq}(function(){\n var TYPE_ADD = \'add\', TYPE_EDIT = \'update\',TYPE_REMOVE = \'remove\';\n \n var listUrl = ctx + \'list${context.javaBeanName}.do\'; // 查询\n var addUrl = ctx + \'add${context.javaBeanName}.do\'; // 添加\n var updateUrl = ctx + \'update${context.javaBeanName}.do\'; // 修改\n var delUrl = ctx + \'del${context.javaBeanName}.do\'; // 删除\n var exportUrl = ctx + \'export${context.javaBeanName}.do\'; // 导出 \n \n var Grid = BUI.Grid;\n var Store = BUI.Data.Store;\n var Form = BUI.Form;\n \n var grid; // 表格\n var store; // 数据\n var schForm; // 查询form\n var editing;// 编辑表单\n\n function init() {\n initForm();\n initData();\n initEditing();\n initGrid();\n initEvent();\n }\n \n function initForm() {\n var formCfg = {\n srcNode : \'#searchForm\' \n ,value : {}\n };\n schForm = new Form.HForm(formCfg);\n schForm.render();\n }\n \n function initData() {\n store = new Store({\n url : listUrl,\n autoLoad:true,\n totalProperty:\'total\',\n pageSize:10, // 配置分页数目\n proxy : {\n save : { //也可以是一个字符串,那么增删改,都会往那么路径提交数据,同时附加参数saveType\n addUrl : addUrl,\n updateUrl : updateUrl,\n removeUrl : delUrl\n }\n ,method:\'POST\'\n }\n \n });\n }\n \n function initEditing() {\n editing = new BUI.Editor.DialogEditor({\n contentId:\'content\'\n ,form:{srcNode:${jq}(\'#J_Form\')}\n ,buttons:[\n {text:\'确定\',elCls : \'button button-primary\',handler : function(){\n save();\n }}\n ,{text:\'取消\',elCls : \'button\',handler : function(){\n this.close();\n }}\n ]\n });\n }\n \n function initGrid() {\n var columns = [\n #set($i=0)\n#foreach($column in $columns)\n #if(!${column.isIdentityPk}) \n #if($i>0),#end {title:\'${column.javaFieldName}\',dataIndex:\'${column.javaFieldName}\'}\n #set($i=$i+1)\n #end \n#end \n ,{title:\'操作\',dataIndex:\'\',width:200,renderer : function(value,obj){\n var updateStr = \'<span class=\"grid-command btn-edit\">修改</span>\';\n var delStr = \'<span class=\"grid-command btn-del\">删除</span>\';\n return updateStr + delStr;\n }}\n ]; \n \n grid = new Grid.Grid({\n render:\'#grid\'\n ,columns : columns\n ,loadMask: true\n ,store: store\n ,emptyDataTpl : \'<div class=\"centered\"><h2>查询的数据不存在</h2></div>\'\n ,tbar : {\n items : [\n {text : \'<i class=\"icon-plus\"></i>新建\',btnCls : \'button button-small\',handler:add}\n ,{text : \'<i class=\"icon-download\"></i>导出\',btnCls : \'button button-small\',handler:exportFile}\n ]\n }\n // 底部工具栏\n ,bbar:{\n // pagingBar:表明包含分页栏\n pagingBar:true\n }\n });\n\n grid.render();\n }\n \n function initEvent() {\n //监听事件,删除一条记录\n grid.on(\'cellclick\',function(ev){\n var sender = ${jq}(ev.domTarget); //点击的Dom\n if(sender.hasClass(\'btn-del\')){\n var record = ev.record;\n del(record);\n }\n if(sender.hasClass(\'btn-edit\')){\n var record = ev.record;\n edit(record);\n }\n });\n \n ${jq}(\'#schBtn\').on(\'click\',function(ev){\n ev.preventDefault();\n search();\n });\n }\n \n \n //////// functions ////////\n \n function search() {\n var param = schForm.serializeToObject();\n param.start = 0;\n store.load(param);\n }\n \n function exportFile() {\n var data = schForm.serializeToObject();\n ExportUtil.doExport(exportUrl,data);\n }\n \n function save() {\n editing.valid();\n if(editing.isValid()) {\n var editType = editing.get(\'editType\');\n var form = editing.get(\'form\');\n var curRecord = editing.get(\'record\'); // 表格中的数据\n var record = form.serializeToObject(); // 表单数据\n \n BUI.mix(curRecord,record); // 将record赋值到curRecord中\n \n store.save(editType,curRecord,function(){\n store.load();\n editing.close();\n })\n }\n }\n \n function add(){\n editing.set(\'editType\',TYPE_ADD);\n showEditor({});\n }\n \n function edit(record) {\n editing.set(\'editType\',TYPE_EDIT);\n showEditor(record);\n }\n \n function showEditor(record) {\n editing.set(\'record\',record);\n editing.show();\n editing.setValue(record,true); //设置值,并且隐藏错误\n }\n \n function del(record){\n if(record){\n BUI.Message.Confirm(\'确认要删除选中的记录么?\',function(){\n store.save(TYPE_REMOVE,record,function(){\n store.load();\n })\n },\'question\');\n }\n }\n \n init();\n \n});\n</script>\n\n</body>\n</html>\n','admin'),(31,'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'),(32,'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'),(33,'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'),(34,'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'),(35,'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'),(36,'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'),(37,'v_Mybatis','mapper',NULL,'${context.javaBeanNameLF}Mapper.xml','#set($jq=\"$\")\r\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\" >\r\n<!-- \r\n This file is automatically generated by autoCode(https://git.oschina.net/durcframework/autoCode)\r\n-->\r\n<mapper namespace=\"${context.packageName}.dao.${context.javaBeanName}Dao\">\r\n <resultMap id=\"queryResultMap\" type=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n #foreach($column in $columns)\r\n #if( \"${column.comment}\" != \"\" )\r\n <!-- ${column.comment} -->\r\n #end\r\n <result column=\"${column.columnName}\" property=\"${column.javaFieldName}\" jdbcType=\"${column.mybatisJdbcType}\" />\r\n #end\r\n </resultMap>\r\n \r\n <!-- 聚合查询 -->\r\n <select id=\"findProjection\" parameterType=\"org.durcframework.core.expression.projection.ProjectionQuery\" resultType=\"java.util.HashMap\">\r\n SELECT\r\n <include refid=\"expressionBlock.projectionColumn\"/>\r\n FROM ${table.tableName} t\r\n <include refid=\"expressionBlock.where\"/> \r\n <include refid=\"expressionBlock.groupBy\"/>\r\n <include refid=\"expressionBlock.having\"/>\r\n <if test=\"order != null\">\r\n ORDER BY ${jq}{order}\r\n </if>\r\n </select>\r\n \r\n <!-- 根据条件查询记录 -->\r\n <select id=\"find\" parameterType=\"org.durcframework.core.expression.ExpressionQuery\"\r\n resultMap=\"queryResultMap\">\r\n SELECT \r\n <choose>\r\n <when test=\"columns.size>0\">\r\n <foreach collection=\"columns\" item=\"column\" separator=\",\" >\r\n ${jq}{column}\r\n </foreach>\r\n </when>\r\n <otherwise>\r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if($i > 0),#end t.${column.columnName}\r\n #set($i=$i +1) \r\n #end\r\n </otherwise>\r\n </choose>\r\n \r\n FROM ${table.tableName} t\r\n <include refid=\"expressionBlock.where\" />\r\n <choose>\r\n <when test=\"order == null\">\r\n ORDER BY t.${context.pkName} desc\r\n </when>\r\n <otherwise>\r\n ORDER BY ${jq}{order}\r\n </otherwise>\r\n </choose>\r\n <if test=\"!isQueryAll\">\r\n LIMIT\r\n #{start,jdbcType=INTEGER},#{limit,jdbcType=INTEGER}\r\n </if>\r\n </select>\r\n\r\n <!-- 根据条件查询记录数 -->\r\n <select id=\"findTotalCount\" parameterType=\"org.durcframework.core.expression.ExpressionQuery\"\r\n resultType=\"java.lang.Integer\">\r\n SELECT count(*) FROM ${table.tableName} t\r\n <include refid=\"expressionBlock.where\" />\r\n </select>\r\n\r\n <!-- 保存,保存全部字段 -->\r\n <insert id=\"save\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\"\r\n#if(${pkColumn.isIdentity})\r\n keyProperty=\"${context.javaPkName}\" keyColumn=\"${context.pkName}\" useGeneratedKeys=\"true\"\r\n#end\r\n >\r\n INSERT INTO ${table.tableName}\r\n (\r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if(!${column.isIdentityPk}) \r\n #if($i > 0),#end `${column.columnName}`\r\n#set($i=$i +1)\r\n #end \r\n #end\r\n )\r\n VALUES (\r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if(!${column.isIdentityPk}) \r\n #if($i > 0),#end #{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}\r\n#set($i=$i +1)\r\n #end \r\n #end\r\n \r\n )\r\n </insert>\r\n \r\n <!-- 保存,保存不为NULL的字段 -->\r\n <insert id=\"saveNotNull\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\"\r\n #if(${pkColumn.isIdentity})\r\n keyProperty=\"${context.javaPkName}\" keyColumn=\"${context.pkName}\" useGeneratedKeys=\"true\"\r\n #end\r\n >\r\n INSERT INTO ${table.tableName}\r\n \r\n <trim prefix=\"(\" suffix=\")\" suffixOverrides=\",\"> \r\n\r\n #foreach($column in $columns) \r\n #if(!${column.isIdentityPk}) \r\n <if test=\"${column.javaFieldName} != null\">\r\n `${column.columnName}`,\r\n </if>\r\n #end \r\n #end\r\n </trim>\r\n <trim prefix=\"values (\" suffix=\")\" suffixOverrides=\",\"> \r\n #foreach($column in $columns) \r\n #if(!${column.isIdentityPk}) \r\n <if test=\"${column.javaFieldName} != null\" >\r\n #{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n </if>\r\n #end \r\n #end\r\n </trim>\r\n </insert>\r\n\r\n <!-- 更新,更新全部字段 -->\r\n <update id=\"update\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n UPDATE ${table.tableName}\r\n <set> \r\n #foreach($column in $columns) \r\n #if(!${column.isPk}) \r\n ${column.columnName}=#{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n #end \r\n #end\r\n </set> \r\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\r\n </update>\r\n \r\n <!-- 根据指定条件更新 -->\r\n <update id=\"updateByExpression\">\r\n UPDATE ${table.tableName}\r\n <set> \r\n #foreach($column in $columns) \r\n #if(!${column.isPk}) \r\n ${column.columnName}=#{entity.${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n #end \r\n #end\r\n </set>\r\n <include refid=\"expressionBlock.updateWhere\" />\r\n </update>\r\n \r\n <!-- 更新不为NULL的字段 -->\r\n <update id=\"updateNotNull\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n UPDATE ${table.tableName}\r\n <set>\r\n #foreach($column in $columns) \r\n #if(!${column.isPk}) \r\n <if test=\"${column.javaFieldName} != null\" >\r\n ${column.columnName}=#{${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n </if>\r\n #end \r\n #end\r\n </set>\r\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\r\n </update>\r\n \r\n <!-- 根据指定条件更新不为NULL的字段 -->\r\n <update id=\"updateNotNullByExpression\">\r\n UPDATE ${table.tableName}\r\n <set>\r\n #foreach($column in $columns) \r\n #if(!${column.isPk}) \r\n <if test=\"entity.${column.javaFieldName} != null\" >\r\n ${column.columnName}=#{entity.${column.javaFieldName},jdbcType=${column.mybatisJdbcType}}, \r\n </if>\r\n #end \r\n #end\r\n </set>\r\n <include refid=\"expressionBlock.updateWhere\" />\r\n </update>\r\n\r\n <!-- 根据主键获取单条记录 -->\r\n <select id=\"get\" resultMap=\"queryResultMap\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n SELECT \r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if($i > 0),#end t.${column.columnName}\r\n#set($i=$i +1) \r\n #end\r\n FROM ${table.tableName} t\r\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\r\n </select>\r\n \r\n <!-- 根据条件获取单条记录 -->\r\n <select id=\"getByExpression\" resultMap=\"queryResultMap\" parameterType=\"org.durcframework.core.expression.ExpressionQuery\">\r\n SELECT\r\n #set ($i=0) \r\n #foreach($column in $columns) \r\n #if($i > 0),#end t.${column.columnName}\r\n #set($i=$i +1) \r\n #end\r\n FROM ${table.tableName} t\r\n <include refid=\"expressionBlock.where\" />\r\n </select>\r\n \r\n <!-- 根据主键删除记录 -->\r\n <delete id=\"del\" parameterType=\"${context.packageName}.entity.${context.javaBeanName}\">\r\n DELETE FROM ${table.tableName}\r\n WHERE ${context.pkName} = #{${context.javaPkName},jdbcType=${context.mybatisPkType}}\r\n </delete> \r\n \r\n <!-- 根据条件删除记录 -->\r\n <delete id=\"delByExpression\" parameterType=\"org.durcframework.core.expression.ExpressionQuery\">\r\n DELETE FROM ${table.tableName}\r\n <include refid=\"expressionBlock.where\" />\r\n </delete>\r\n\r\n</mapper>','admin'),(38,'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<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n <head>\n <title>后台管理</title>\n </head>\n<body>\n <form id=\"searchForm\">\n <table>\n <tr>\n#foreach($column in $columns)\n #if(!${column.isIdentityPk})\n <th>${column.javaFieldName}:</th><td><input type=\"text\" name=\"${column.javaFieldName}Sch\"></td> \n #end\n#end\n <td>\n <button type=\"button\" id=\"schBtn\" class=\"button button-primary\">搜索</button>\n </td>\n </tr>\n </table>\n <button type=\"button\" id=\"schBtn\" class=\"button button-primary\">搜索</button>\n </form>\n <hr>\n <div class=\"grid-bar\"> \n <button type=\"button\" id=\"addBtn\" class=\"button button-primary\">新增</button> \n </div>\n \n <div id=\"grid\"></div>\n \n <div id=\"dlg\" class=\"hide\">\n <form id=\"editForm\">\n <input type=\"hidden\" name=\"orderId\">\n <table>\n #foreach($column in $columns)\n #if(!${column.isIdentityPk}) \n <tr> \n <th><s>*</s>${column.javaFieldName}</th>\n <td>\n <input name=\"${column.javaFieldName}\" \n rules=\"[\n {rule:{notNull:true},errorMsg:\'不能为空\'}\n ]\"\n type=\"text\"/>\n </td> \n </tr>\n #end\n #end \n\n </table>\n </form>\n </div>\n \n\n<script type=\"text/javascript\">\n\nVUI.use([\'PageForm\'],function(){\n var listUrl = ctx + \'list${context.javaBeanName}.do\'; // 查询\n var addUrl = ctx + \'add${context.javaBeanName}.do\'; // 添加\n var updateUrl = ctx + \'update${context.javaBeanName}.do\'; // 修改\n var delUrl = ctx + \'del${context.javaBeanName}.do\'; // 删除\n var ${jq}schBtn = ${jq}(\'#schBtn\'); // 查询按钮\n var ${jq}addBtn = ${jq}(\'#addBtn\'); // 添加按钮\n var ${jq}exportBtn = ${jq}(\'#exportBtn\');\n \n var grid; // 表格\n var schForm,pageForm; \n var dialog;// 编辑表单\n\n function init() {\n initEditing();\n initGrid();\n initEvent();\n initForm();\n }\n \n function initForm() {\n schForm = new VUI.Form({formId:\'searchForm\'});\n \n pageForm = new VUI.PageForm({\n formId:\'editForm\'\n ,grid:grid\n ,win:dialog\n ,crudUrl:{\n add:addUrl\n ,update:updateUrl\n ,del:delUrl\n }\n });\n }\n \n function initEditing() {\n dialog = new VUI.DialogForm({\n contentId:\'dlg\'\n ,formId:\'editForm\'\n ,onOk:function(){\n save();\n }\n });\n }\n \n function initGrid() {\n \n grid = new VUI.Grid({\n renderId:\'grid\'\n ,url:listUrl\n ,columns : [[\n {title:\'订单编号\',field:\'orderId\'}\n ,{title:\'手机号\',field:\'mobile\'}\n ,{title:\'城市名\',field:\'cityName\'}\n ,{title:\'地址\',field:\'address\'}\n ,{title:\'下单时间\',field:\'createDate\'}\n ,{title:\'操作\',field:\'\',width:200,formatter : function(value,obj){\n var updateStr = \'<span class=\"grid-command btn-edit\">修改</span>\';\n var delStr =\'<span class=\"grid-command btn-del\">删除</span>\';\n return updateStr + delStr;\n }}\n ]]\n ,striped:true // 斑马线\n ,pagination :true\n ,rownumbers :true\n });\n\n }\n \n function initEvent() {\n grid.on(\'ClickCell\',function(ev){\n var sender = ${jq}(ev.target); //点击的Dom\n if(sender.hasClass(\'btn-del\')){\n var record = ev.row;\n del(record);\n }\n if(sender.hasClass(\'btn-edit\')){\n var record = ev.row;\n edit(record);\n }\n });\n \n ${jq}schBtn.on(\'click\',function(ev){\n search();\n });\n \n ${jq}addBtn.on(\'click\',function(ev){\n add();\n });\n \n ${jq}exportBtn.on(\'click\',function(ev){\n exportFile();\n });\n }\n \n \n //////// functions ////////\n \n function search() {\n grid.load(schForm.getData());\n }\n \n function exportFile() {\n var data = schForm.getData();\n ExportUtil.doExport(exportUrl,data);\n }\n \n function save() {\n pageForm.save();\n }\n \n function add(){\n pageForm.add();\n }\n \n function edit(record) {\n pageForm.update(record);\n }\n \n function del(record){\n pageForm.del(record);\n }\n \n init();\n \n});\n\n</script>\n</body>\n</html>','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 */;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/olddrivertan/autoCode.git
git@gitee.com:olddrivertan/autoCode.git
olddrivertan
autoCode
autoCode
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385