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. Android控件之ImageSwticher

    Android控件之ImageSwticher 1. ImageSwticher介绍 ImageSwitcher是图片切换的控件,它能实现图片切换时的动画效果,包括图片导入效果.图片消失效果等等.An ...

  2. runOnUiThread更新主线程

    更新UI采用Handle+Thread,需要发送消息,接受处理消息(在回调方法中处理),比较繁琐.除此之外,还可以使用runOnUiThread方法.   利用Activity.runOnUiThre ...

  3. log4j1修改DailyRollingFileAppender支持日志最大数量

    配置说明: log4j.appender.logfile=org.apache.log4j.MyDailyRollingFileAppender log4j.appender.logfile.File ...

  4. springboot1.5x版不支持velocity的解决方案 及 spring 5.0.0 版不支持velocity的解决方案

    由于老系统是在spring4.x.x下的用到了Velocity. 测试地址 https://sms.reyo.cn/用户名:aa 密码:123456 5.0.0官方申明: 中止的支持 在 API 层面 ...

  5. go 用的不多的命令

    8.go doc 文档注释相关,可以搭建本地GO文档服务器,包含自己的项目注释,更多细节请参考:https://github.com/hyper-carrot/go_command_tutorial/ ...

  6. byte数组怎么存放到Json中传递

    可以把byte[]序列化成base64字符串后,再放json里传输就可以了.不需要考虑每个字节转成一个字符存到json字符串里. String str = Base64.encodeToString( ...

  7. 波士顿法律第一至五季/全集Boston Legal迅雷下载

    本季第一至五季Boston Legal(2004-2008)看点:<波士顿法律>(Boston Legal)是讲述的是美国波士顿市一家律师事务所的故事,主要是两位活宝Alan(James ...

  8. sys.usb.config webcam

    setprop persist.sys.usb.config webcamecho 0 > /sys/devices/virtual/android_usb/android0/enableech ...

  9. 【转】从源码来分析ListView

    原文:http://yanmingming.sinaapp.com/?p=1251 原文其实不叫这个名字,本文对于原文有一定的修改,觉得这个名字比较适合本篇. 一.ListView 的工作原理 Ada ...

  10. 带标签的 break 和 continue (Java)

    2002年12月发于 CCW-I2006年9月搬至 CSDN,略作修改 Java 中有 goto 关键字,但这个关键字没有任何作用,换句话说,我们不能使用 goto 来进行跳转到某行.实际上,结构化程 ...