【jeecg-欧洲杯足彩官网

`
zhangdaiscott
  • 浏览: 395910 次
  • 性别:
  • 来自: 北京
博主相关
  • 博客
  • 微博
  • 相册
  • 收藏
  • 博客专栏
    jeecg快速开发平台
    浏览量:0
    文章分类
    社区版块
    • ( 37)
    • ( 194)
    • ( 0)
    存档分类

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

    jeecg-mybatis版本代码生成器演示视频 

       
    简要说明 
    jeecg[j2ee code generation] 
    代码生成:根据表生成对应的bean,service,dao,action,xml,jsp等,增删改查功能直接使用,实现了快速开发 
    jeecg-mybatis-framework,采用springmvc mybatis等主流框架 
    支持数据库: mysql,oracle10g 
    前端:使用jquery和easyui技术.js封装简洁,操作简单. 
    权限:对菜单,按钮控制.根据登陆用户权限展示拥有的菜单和按钮. 
    拦截:对所有无权限url进行拦截,防止手动发送http请求,确保系统全性. 


    java代码  
    1. "1.0" encoding="utf-8"?>  
    2.   public "-//mybatis.org//dtd mapper 3.0//en"  
    3.   "http://mybatis.org/dtd/mybatis-3-mapper.dtd">  
    4. "scott.dao.demo.jeecgnotedao" >   
    5.   
    6. "baseresultmap" type="scott.entity.demo.jeecgnote" >  
    7.     "id" property="id"/>  
    8.     "title" property="title"/>  
    9.     "content" property="content"/>  
    10.     "crtuser" property="crtuser"/>  
    11.     "crtuser_name" property="crtuser_name"/>  
    12.     "create_dt" property="create_dt"/>  
    13.     "deleted" property="deleted"/>  
    14.   
    15.          
    16.   
    17. "base_column_list" >  
    18.      id,title,content,crtuser,crtuser_name,create_dt,deleted  
    19.   
    20.      
    21.      
    22.   
    23. "example_where_clause">  
    24. where 1=1  
    25. "," >  
    26.     <if test="id != null and id != ''" >  
    27.         and id =  #{id}  
    28.     if>  
    29.     <if test="title != null and title != ''" >  
    30.         and title =  #{title}  
    31.     if>  
    32.     <if test="content != null and content != ''" >  
    33.         and content =  #{content}  
    34.     if>  
    35.     <if test="crtuser != null and crtuser != ''" >  
    36.         and crtuser =  #{crtuser}  
    37.     if>  
    38.     <if test="crtuser_name != null and crtuser_name != ''" >  
    39.         and crtuser_name =  #{crtuser_name}  
    40.     if>  
    41.     <if test="create_dt != null and create_dt != ''" >  
    42.         and create_dt =  #{create_dt}  
    43.     if>  
    44.     <if test="deleted != null and deleted != ''" >  
    45.         and deleted =  #{deleted}  
    46.     if>  
    47.   
    48.   
    49.      
    50.   
    51.   
    52. "add" parametertype="object" >  
    53. "java.lang.integer" order="after" keyproperty="id">  
    54.     select last_insert_id()  
    55.     
    56.   insert into jeecg_note(id,title,content,crtuser,crtuser_name,create_dt,deleted)  
    57.  values(#{id},#{title},#{content},#{crtuser},#{crtuser_name},#{create_dt},#{deleted})  
    58.   
    59.   
    60.     
    61.  "update" parametertype="object" >  
    62.   update jeecg_note set title=#{title},content=#{content},crtuser=#{crtuser},crtuser_name=#{crtuser_name},create_dt=#{create_dt},deleted=#{deleted} where id=#{id}  
    63.    
    64.    
    65.    
    66. "updatebyselective" parametertype="object" >  
    67.     update jeecg_note set   
    68.     "," >  
    69.     <if test="title != null  ">  
    70.         title=#{title},  
    71.     if>  
    72.     <if test="content != null  ">  
    73.         content=#{content},  
    74.     if>  
    75.     <if test="crtuser != null  ">  
    76.         crtuser=#{crtuser},  
    77.     if>  
    78.     <if test="crtuser_name != null  ">  
    79.         crtuser_name=#{crtuser_name},  
    80.     if>  
    81.     <if test="create_dt != null  ">  
    82.         create_dt=#{create_dt},  
    83.     if>  
    84.     <if test="deleted != null  ">  
    85.         deleted=#{deleted},  
    86.     if>  
    87.      where id=#{id}  
    88.   
    89.   
    90.   
    91. "delete" parametertype="object">  
    92.     delete   from jeecg_note where id = #{id}  
    93.   
    94.    
    95.   
    96. "querybyid"  resultmap="baseresultmap" parametertype="object">  
    97.     select "base_column_list" />   
    98.      from jeecg_note where id = #{id}  
    99.   
    100.   
    101.   
    102. "querybycount" resulttype="java.lang.integer"  parametertype="object">  
    103.     select count(1) from jeecg_note   
    104.     "example_where_clause"/>  
    105.   
    106.       
    107.   
    108. "querybylist" resultmap="baseresultmap"  parametertype="object">  
    109.     select   
    110.     "base_column_list"/>  
    111.     from jeecg_note   
    112.     "example_where_clause"/>  
    113.     <if test="pager.ordercondition != null and pager.ordercondition != ''" >  
    114.       ${pager.ordercondition}  
    115.     if>  
    116.     <if test="pager.mysqlquerycondition != null and pager.mysqlquerycondition != ''" >  
    117.        ${pager.mysqlquerycondition}  
    118.     if>  
    119.   
    120.       
    121.      
    1
    2
    分享到:
    |
    评论
    5 楼 linapex 2014-06-07  
    已经失效了
    4 楼 2013-11-14  
    顶一个
    3 楼 hellostory 2013-11-14  
    还有,有些写法个人觉得可以更简练些、命名也可以更优雅些(有些看起来好像是直接用mybatis官方代码生成器,╮(╯▽╰)╭ ),比如sql wheres
    
    	
    		and supplier_id=#{id}
    		and supplier_code like #{code}
    	
    
    
    2 楼 hellostory 2013-11-14  
    为什么不直接使用mybatis的usegeneratedkeyskeyproperty,而另起炉灶用“”?
    1 楼 2013-11-14  
    好东西  先顶一个

    相关推荐

      全套完整的spring spring mvc mybatis mysql dubbo整合开发任务流程后台管理系统

      基于spring spring mvc mybatis框架整合实现超市货物管理系统(实现登入功能、mysql数据库的增删改查及分页显示)

      基于spring spring mvc mybatis的销售管理系统 基于spring spring mvc mybatis的销售管理系统 基于spring spring mvc mybatis的销售管理系统 基于spring spring mvc mybatis的销售管理系统 基于...

      spring boot mybatis spring mvc bootstrap开发停车位管理系统(调用百度地图api)

      null 博文链接:https://baobeituping.iteye.com/blog/2397594

      ssm(mybatis spring spring mvc)框架整合,用于使用ssm框架的项目,必要的都有

      activiti5.14 spring4.0 srping mvc4.0 mybatis3.0.5 maven环境搭建,可以跑起来,并且可以逆向生成相关的数据库表

      项目描述 学生成绩管理系统,有三...spring boot spring mvc mybatis layui jquery thymeleaf http://localhost:8080/sys/loginview 管理员账号 admin admin 老师登录 2020031920 111111 学生账号登录 20200319 111111

      spring-springmvc-mybatis 基于spring spring mvc mybatis的网上商城项目

      ssm(spring spring mvc mybatis)开发学生信息后台管理系统,实现学生增删改查功能设计一个简单的学生信息管理系统,要求使用ssm框架技术整合实现,用户登录后能够通过web页面添加、删除、修改和查询学生信息 ...

      spring mybatis spring mvc整合

      java ee 框架整合 开发入门到实战-spring spring mvc mybatis微课版复习笔记

      spring 3 mybatis 3 maven spring mvc mysql 配置例子,里面的数据库使用的是 mysql 自带的例子数据库 world。如果你安装的时候没有安装例子,请确保你有办法弄到这个数据库。该数据库在新的mysql安装包中...

      mybatis spring spring mvc整合详解与spring mvc参考手册与zvm配置手册 希望对你有帮助!!

      maven spring spring mvc mybatis mysql,搭建ssm框架环境

      后端技术:springboot,mybatis 本系统共分为两个角色:管理员和用户。 主要功能有: 前台: 车位查询、车位预约、公告展示、个人信息管理、留言、订单查看等。 后台: 信息发布管理、车位管理、订单管理、积分管理、...

      利用maven搭起的spring mvc mybatis框架,并带有数据库表结构,使用者可直接导入mysql使用,有主外键关系

      ssm整合--spring-mybatis-spring-mvc,内含sql文件,全套整合,简洁,详细地址访问:https://blog.csdn.net/qq_40374604/article/details/88256278

      一、项目简述 本系统功能包括: 1 .... 2 .... 3 ....4 ....环境配置: jdk8 tomcat8 mysql5.7 lntellij idea maven( eclispe ,sts myeclispe 都支持...项目技术: weixin-java-mp spring spring mvc mybatis layui 微信小程序。

    global site tag (gtag.js) - google analytics
    网站地图