Jeecg-Mybatis版本代码生成器演示视频

http://pan.baidu.com/share/link?shareid=243717&uk=2668473880
 


简要说明 


JEECG[J2EE Code Generation] 


代码生成:根据表生成对应的Bean,Service,Dao,Action,XML,JSP等,增删改查功能直接使用,实现了快速开发 


jeecg-mybatis-framework,采用SpringMVC+Mybatis等主流框架 


支持数据库: Mysql,Oracle10g 


前端:使用Jquery和Easyui技术.JS封装简洁,操作简单. 


权限:对菜单,按钮控制.根据登陆用户权限展示拥有的菜单和按钮. 


拦截:对所有无权限URL进行拦截,防止手动发送HTTP请求,确保系统全性.

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="scott.dao.demo.JeecgNoteDao" >
  6. <!-- Result Map-->
  7. <resultMap id="BaseResultMap" type="scott.entity.demo.JeecgNote" >
  8. <result column="id" property="id"/>
  9. <result column="title" property="title"/>
  10. <result column="content" property="content"/>
  11. <result column="crtuser" property="crtuser"/>
  12. <result column="crtuser_name" property="crtuser_name"/>
  13. <result column="create_dt" property="create_dt"/>
  14. <result column="deleted" property="deleted"/>
  15. </resultMap>
  16. <!-- jeecg_note table all fields -->
  17. <sql id="Base_Column_List" >
  18. id,title,content,crtuser,crtuser_name,create_dt,deleted
  19. </sql>
  20. <!-- 查询条件 -->
  21. <sql id="Example_Where_Clause">
  22. =1
  23. <trim  suffixOverrides="," >
  24. <if test="id != null and id != ''" >
  25. and id =  #{id}
  26. </if>
  27. <if test="title != null and title != ''" >
  28. and title =  #{title}
  29. </if>
  30. <if test="content != null and content != ''" >
  31. and content =  #{content}
  32. </if>
  33. <if test="crtuser != null and crtuser != ''" >
  34. and crtuser =  #{crtuser}
  35. </if>
  36. <if test="crtuser_name != null and crtuser_name != ''" >
  37. and crtuser_name =  #{crtuser_name}
  38. </if>
  39. <if test="create_dt != null and create_dt != ''" >
  40. and create_dt =  #{create_dt}
  41. </if>
  42. <if test="deleted != null and deleted != ''" >
  43. and deleted =  #{deleted}
  44. </if>
  45. </trim>
  46. </sql>
  47. <!-- 插入记录 -->
  48. <insert id="add" parameterType="Object" >
  49. <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
  50. SELECT LAST_INSERT_ID()
  51. </selectKey>
  52. insert into jeecg_note(id,title,content,crtuser,crtuser_name,create_dt,deleted)
  53. values(#{id},#{title},#{content},#{crtuser},#{crtuser_name},#{create_dt},#{deleted})
  54. </insert>
  55. <!-- 根据id,修改记录-->
  56. <update id="update" parameterType="Object" >
  57. update jeecg_note set title=#{title},content=#{content},crtuser=#{crtuser},crtuser_name=#{crtuser_name},create_dt=#{create_dt},deleted=#{deleted} where id=#{id}
  58. </update>
  59. <!-- 修改记录,只修改只不为空的字段 -->
  60. <update id="updateBySelective" parameterType="Object" >
  61. update jeecg_note set
  62. <trim  suffixOverrides="," >
  63. <if test="title != null  ">
  64. title=#{title},
  65. </if>
  66. <if test="content != null  ">
  67. content=#{content},
  68. </if>
  69. <if test="crtuser != null  ">
  70. crtuser=#{crtuser},
  71. </if>
  72. <if test="crtuser_name != null  ">
  73. crtuser_name=#{crtuser_name},
  74. </if>
  75. <if test="create_dt != null  ">
  76. create_dt=#{create_dt},
  77. </if>
  78. <if test="deleted != null  ">
  79. deleted=#{deleted},
  80. </if>
  81. </trim> where id=#{id}
  82. </update>
  83. <!-- 删除记录 -->
  84. <delete id="delete" parameterType="Object">
  85. delete   from jeecg_note where id = #{id}
  86. </delete>
  87. <!-- 根据id查询 公告 -->
  88. <select id="queryById"  resultMap="BaseResultMap" parameterType="Object">
  89. select <include refid="Base_Column_List" />
  90. from jeecg_note where id = #{id}
  91. </select>
  92. <!-- 公告 列表总数-->
  93. <select id="queryByCount" resultType="java.lang.Integer"  parameterType="Object">
  94. ) from jeecg_note
  95. <include refid="Example_Where_Clause"/>
  96. </select>
  97. <!-- 查询公告列表 -->
  98. <select id="queryByList" resultMap="BaseResultMap"  parameterType="Object">
  99. select
  100. <include refid="Base_Column_List"/>
  101. from jeecg_note
  102. <include refid="Example_Where_Clause"/>
  103. <if test="pager.orderCondition != null and pager.orderCondition != ''" >
  104. ${pager.orderCondition}
  105. </if>
  106. <if test="pager.mysqlQueryCondition != null and pager.mysqlQueryCondition != ''" >
  107. ${pager.mysqlQueryCondition}
  108. </if>
  109. </select>
  110. </mapper>

【jeecg-mybatis版本】 mybatis+spring mvc 完美整合方案 查询,保存,更新,删除自动生成的更多相关文章

  1. MyBatis 与 Spring 的完美整合方法

    MyBaits 整合 Spring MyBatis-Spring 项目 第一步:创建测试工程 第二步:引入依赖 jar 包 第三步:编写 Spring 配置文件 第四步:编写 MyBatis 配置文件 ...

  2. Thymeleaf 3与Spring MVC 4 整合配置

    Thymeleaf 3与Spring MVC 4 整合配置 Maven 依赖配置 Spring 相关依赖就不说了 <dependency> <groupId>org.thyme ...

  3. 玩转spring mvc(四)---在spring MVC中整合JPA

    关于在Spring MVC中整合JPA是在我的上一篇关于spring mvc基本配置基础上进行的,所以大家先参考一下我的上一篇文章:http://blog.csdn.net/u012116457/ar ...

  4. 返璞归真 asp.net mvc (1) - 添加、查询、更新和删除的 Demo

    原文:返璞归真 asp.net mvc (1) - 添加.查询.更新和删除的 Demo [索引页] [源码下载] 返璞归真 asp.net mvc (1) - 添加.查询.更新和删除的 Demo 作者 ...

  5. MyBatis原理,Spring、SpringBoot整合MyBatis

    1. MyBatis概述 MyBatis 是支持定制化 SQL.存储过程以及高级映射的优秀的持久层框架.MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集.MyBatis 可 ...

  6. mongoDB数据库和Spring MVC的整合

    之前一直用到的项目是Spring MVC+maven+mysql的,最近有些数据需要用到mongoDB数据库,现在做一些总结. 第一步:加载jar.maven配置 <!-- mongodb开始 ...

  7. 6.Spring MVC SSM整合问题总结

    1.Cannot find class [org.springframework.http.converter.json.MappingJacksonHttpMessageConverter] for ...

  8. spring mvc + freemarker 整合

    <?xml version="1.0" encoding="UTF-8" ?> <beans xmlns="http://www.s ...

  9. Spring mvc shiro 整合

    参考 : http://www.360doc.com/content/14/0722/10/18637323_396209195.shtml http://www.360doc.com/content ...

随机推荐

  1. Unity动画知识之二:Animator动画状态机

    上次我们讲过Unity游戏动画从入门到住院,今天我们来讲一下动画状态机. 好了,现在我们已经成功的导入了动画.接下来要玩的东西就很装13啦.因为大部分动画师是用不到这家伙的,需要掌握这个技能的,至少也 ...

  2. MySql错误处理(三)- 错误处理的例子

    有几种错误处理的声明形式: § 如果任何错误(不是 NOT FOUND ) , 设置 l_error 为 1 后继续执行: DECLARE CONTINUE HANDLER FOR SQLEXCEPT ...

  3. 详细解读Android中的搜索框(一)—— 简单小例子

    这次开的是一个讲解SearchView的栏目,第一篇主要是给一个小例子,让大家对这个搜索视图有一个了解,之后再分布细化来说. 目标: 我们先来定个目标,我们通过搜索框来输入要搜索的联系人名字,输入的时 ...

  4. 在自己建立的Thread中设置Handler,并接收消息

    这里主要讲的是Android中线程的概念,自己的线程不能更新UI线程中的视图.如果把Handler设置在自己的线程中,那么必须建立一个Looper.至于为什么在Activity中建立Handler就不 ...

  5. 层次聚类 Hierarchical Clustering

    -------------------------------- 不管是GMM,还是k-means,都面临一个问题,就是k的个数如何选取?比如在bag-of-words模型中,用k-means训练码书 ...

  6. HTTPS安全证书介绍

    IIS配置web SSL 安全证书Https访问 From : http://cao416451347ming.blog.163.com/blog/static/1154556162010217441 ...

  7. ss简单使用

    ss简单使用 ss即socket state. 1.常用语句 ss -l 显示所有处于监听的网络接口连接 ss -pl 显示所有处于监听的网络接口连接,及相应的进程名称.进号等 ss -t -a 显示 ...

  8. CodeReview工具Gerrit的python库pygerrit2

    源代码: https://github.com/dpursehouse/pygerrit2

  9. apache+jetty 配置web jsp服务器负载均衡

    首先,查找中文资料,貌似很少,有一个网友写了点,但是1版本过老,2有些地方有错误. 经过我自己摸索,记录一下.这个图很简洁明了 第一阶段 ,配置jetty 首先从 http://download.ec ...

  10. Log Shipping搭建

    1.    概述 SQL Server 使用日志传送,您可以自动将“主服务器”实例上“主数据库”内的事务日志备份发送到单独“辅助服务器”实例上的一个或多个“辅助数据库”.事务日志备份分别应用于每个辅助 ...