<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">

<!-- ========================================================== -->
<!-- Configuration for ibatis sqlmap mapping. -->
<!-- ========================================================== -->

<!-- ============================================================================= -->
<!-- This file is generated by <tt>borncrm-dalgen</tt>, a DAL (Data Access Layer) -->
<!-- code generation utility specially developed for <tt>rent</tt> project. -->
<!-- -->
<!-- PLEASE DO NOT MODIFY THIS FILE MANUALLY, or else your modification may be -->
<!-- OVERWRITTEN by someone else. To modify the file, you should go to directory -->
<!-- <tt>(project-home)/biz/dal/src/conf/dalgen</tt>, and find the corresponding -->
<!-- configuration files. Modify those files according to your needs, then run -->
<!-- <tt>borncrm-dalgen</tt> to generate this file. -->
<!-- -->
<!-- @author peigen -->
<!-- ============================================================================= -->

<sqlMap namespace="borncrm">
<!-- ============================================= -->
<!-- RESULT MAPS -->
<!-- ============================================= -->

<!-- result maps for database table user_info -->
<resultMap id="RM-USER-INFO" class="com.yjf.borncrm.dal.dataobject.UserInfoDO">
<result property="id" column="id" javaType="java.lang.String" jdbcType="VARCHAR" nullValue="0"/>
<result property="role" column="role" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="userName" column="user_name" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="realName" column="real_name" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="password" column="password" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="landline" column="landline" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="mobile" column="mobile" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="mail" column="mail" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="rowAddTime" column="row_add_time" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result property="rowUpdateTime" column="row_update_time" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result property="parentId" column="parent_id" javaType="long" jdbcType="BIGINT" nullValue="0"/>

</resultMap>

<!-- ============================================= -->
<!-- mapped statements for IbatisUserInfoDAO -->
<!-- ============================================= -->
<!-- mapped statement for IbatisUserInfoDAO.insert -->
<insert id="MS-USER-INFO-INSERT">
INSERT /*MS-BORNCRM-USER-INFO-INSERT*/ INTO user_info(id,role,user_name,real_name,password,landline,mobile,mail,row_add_time,row_update_time,parent_id)
VALUES (#id#,#role#,#userName#,#realName#,#password#,#landline#,#mobile#,#mail#,#rowAddTime#,#rowUpdateTime#,#parentId#)
</insert>

<!-- mapped statement for IbatisUserInfoDAO.update -->
<update id="MS-USER-INFO-UPDATE">
<![CDATA[
update /*MS-BORNCRM-USER-INFO-UPDATE*/ user_info set role=#role#, user_name=#userName#, real_name=#realName#, password=#password#, landline=#landline#, mobile=#mobile#, mail=#mail#, row_add_time=#rowAddTime#, row_update_time=#rowUpdateTime#, parent_id=#parentId# where (id = #id#)
]]>
</update>

<!-- mapped statement for IbatisUserInfoDAO.updatePassword -->
<update id="MS-USER-INFO-UPDATE-PASSWORD">
<![CDATA[
update /*MS-BORNCRM-USER-INFO-UPDATE-PASSWORD*/ user_info set password=#password# where (id = #id#)
]]>
</update>

<!-- mapped statement for IbatisUserInfoDAO.deleteById -->
<delete id="MS-USER-INFO-DELETE-BY-ID">
<![CDATA[
delete /*MS-BORNCRM-USER-INFO-DELETE-BY-ID*/ from user_info where (id = #value#)
]]>
</delete>

<!-- mapped statement for IbatisUserInfoDAO.findById -->
<select id="MS-USER-INFO-FIND-BY-ID" resultMap="RM-USER-INFO">
<![CDATA[
select /*MS-BORNCRM-USER-INFO-FIND-BY-ID*/ id, role, user_name, real_name, password, landline, mobile, mail, row_add_time, row_update_time, parent_id from user_info where status='1' and (id = #value#)
]]>
</select>

<!-- mapped statement for IbatisUserInfoDAO.findByLoginName -->
<select id="MS-USER-INFO-FIND-BY-LOGIN-NAME" resultMap="RM-USER-INFO">
<![CDATA[
select /*MS-BORNCRM-USER-INFO-FIND-BY-LOGIN-NAME*/ id, role, user_name, real_name, password, landline, mobile, mail, row_add_time, row_update_time, parent_id from user_info where status='1' and (user_name = #value#)
]]>
</select>

<!-- mapped statement for IbatisUserInfoDAO.findRealName -->
<select id="MS-USER-INFO-FIND-REAL-NAME" resultMap="RM-USER-INFO">
<![CDATA[
select /*MS-BORNCRM-USER-INFO-FIND-REAL-NAME*/ id, role, user_name, real_name, password, landline, mobile, mail, row_add_time, row_update_time, parent_id from user_info where status='1' and (real_name = #value#)
]]>
</select>

<!-- mapped statement for IbatisUserInfoDAO.searchDataCount -->
<select id="MS-USER-INFO-SEARCH-DATA-COUNT" resultClass="long">
SELECT /*MS-BORNCRM-USER-INFO-SEARCH-DATA-COUNT*/ count(id) FROM user_info
<dynamic prepend="where">
<isNotEmpty property="status" prepend=" and ">
status='1'
</isNotEmpty>
<isNotEmpty property="role" prepend=" and " >
role = #role#
</isNotEmpty>
<isNotEmpty property="userName" prepend=" and " >
user_name = #userName#
</isNotEmpty>
<isNotEmpty property="realName" prepend=" and ">
real_name = #realName#
</isNotEmpty>
<isNotEmpty property="landline" prepend=" and ">
landline = #landline#
</isNotEmpty>
<isNotEmpty property="mobile" prepend=" and ">
mobile = #mobile#
</isNotEmpty>
<isNotEmpty property="mail" prepend=" and ">
mail = #mail#
</isNotEmpty>

</dynamic>
</select>

<!-- mapped statement for IbatisUserInfoDAO.loadData -->
<select id="MS-USER-INFO-LOAD-DATA" resultMap="RM-USER-INFO">
SELECT /*MS-BORNCRM-USER-INFO-LOAD-DATA*/ id ,role ,user_name ,real_name ,password ,landline ,mobile ,mail ,row_add_time ,row_update_time ,parent_id FROM user_info

<dynamic prepend="where">
<isNotEmpty property="userInfo.status" prepend=" and ">
status = 1
</isNotEmpty>
<isNotEmpty property="userInfo.role" prepend=" and " >
role = #userInfo.role#
</isNotEmpty>
<isNotEmpty property="userInfo.userName" prepend=" and " >
user_name = #userInfo.userName#
</isNotEmpty>
<isNotEmpty property="userInfo.realName" prepend=" and ">
real_name = #userInfo.realName#
</isNotEmpty>
<isNotEmpty property="userInfo.landline" prepend=" and ">
landline = #userInfo.landline#
</isNotEmpty>
<isNotEmpty property="userInfo.mobile" prepend=" and ">
mobile = #userInfo.mobile#
</isNotEmpty>
<isNotEmpty property="userInfo.mail" prepend=" and ">
mail = #userInfo.mail#
</isNotEmpty>

</dynamic>
order by row_add_time DESC
LIMIT #limitStart#,#pageSize#;
</select>

<!-- mapped statement for IbatisUserInfoDAO.loadData -->
<select id="MS-USER-INFO-FIND-BY-ROLE" resultMap="RM-USER-INFO">
SELECT /*MS-USER-INFO-FIND-BY-ROLE*/ id, role, user_name, real_name, password, landline, mobile, mail, row_add_time, row_update_time, parent_id FROM user_info where status=1 and (role = #value#)
</select>
</sqlMap>

Ibatis sql语句1的更多相关文章

  1. Ibatis sql语句

    <?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE sqlMap PUBLIC "-/ ...

  2. 转:ibatis常用16条SQL语句

    1.输入参数为单个值 <delete id="com.fashionfree.stat.accesslog.deleteMemberAccessLogsBefore" par ...

  3. mybatis和ibatis控制台打印sql语句方法

    #将ibatis log4j运行级别调到DEBUG可以在控制台打印出ibatis运行的sql语句 log4j.rootLogger=debug,stdout,logfile### 把日志信息输出到控制 ...

  4. ibatis mybatis sql语句配置 符号不兼容 大于号 小于号<!CDATA[ ]>

    ibatis mybatis sql语句配置 符号不兼容 大于号 小于号<!CDATA[ ]> 因为这个是xml格式的,所以不允许出现类似">"这样的字符,但是都 ...

  5. IBatis.net动态SQL语句

    在学习动态SQL语句之前,首先必须对条件查询有一定了解,先来学习如何向IBatis.Net的映射文件里传入参数. 一.条件查询 1.传递单个参数 如根据Id查询: <select id=&quo ...

  6. iBATIS.net获取运行时sql语句

    [本文原创,第一次离首页如此之近.发在候选区攒攒rp,管理员看着不合适可以撤下.] 虽然只在iBatis的世界里小打小闹匆匆数月,却历经数次与领导和同事激辩,再通过不懈努力学习和开发积累,楼猪终于被它 ...

  7. IBatis.net 输出SQL语句(七)

    一.IBatis.net输出SQL语句到控制台 输出IBatis.net生成的SQL语句到控制台,能够方便调试. 如果要想输出IBatis.net的SQL语句到控制台,那么只需要做如下配置即可: &l ...

  8. IBatis.net动态SQL语句(六)

    在学习动态SQL语句之前,首先必须对条件查询有一定了解,先来学习如何向IBatis.Net的映射文件里传入参数. 一.条件查询 1.传递单个参数 如根据Id查询: <select id=&quo ...

  9. 打印Ibatis最终的SQL语句

    在项目开发时都大家都希望将SQL在后台打印出来,以帮助开发以及后续的bug修改.如果用JDBC那么可以方便的打印,可使用ibatis就不知道怎么办了,最近在网上找了一段log4j的配置可以很保姆的处理 ...

随机推荐

  1. 在IIS7以上导出所有应用程序池的方法批量域名绑定(网站绑定)

    在IIS7+上导出所有应用程序池的方法: %windir%/system32/inetsrv/appcmd list apppool /config /xml > c:/apppools.xml ...

  2. Data URL scheme 笔记

    0x01起因 今天做CTF的时候,发现一堆数据,大概是这样的 data:image/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAAIUAAACFCAYAAAB12js8AAA ...

  3. Java短路运算符和非短路运算符

    在Java中短路运算符指的是"&&"(与) 和"||"(或) ,非短路运算符指的是"&" 和"|" ...

  4. 7.使用mysql_export监控mysql

    ok,docker监控,宿主机CPU.磁盘.网络.内存监控我们都已讲过,是时候讲一波mysql监控了.本次mysql部署在客户端. 架构 客户端 MySql安装 ##下载mysql的repo源: [r ...

  5. 04、python的基础-->列表跟元组

    一.列表list 1.列表的新增元素(三种方法) >>>第1种方法(append 增加到最后): li = ['Peter','Henrry','Wode','鸭子','xiaoxi ...

  6. java部署:CentOS 7下Tomcat安装与配置教程(Tomcat开机启动)

    一.前言 1.本教程主要内容 Tomcat安装与基础配置 Tomcat开机启动配置 2.本教程适用范围与环境信息 适用范围 软件/工具 版本说明 CentOS CentOS 7 Tomcat Tomc ...

  7. go build报错cannot find package

    go env 关键数据是这样的 GOPATH="/home/zzy/goProject" GOROOT="/usr/local/go" 项目目录是这样的 goP ...

  8. sum - 计算文件的校验和,以及文件占用的块数

    总览 (SYNOPSIS) ../src/sum [OPTION]... [FILE]... 描述 (DESCRIPTION) 显示 每个 文件 FILE 的 校验和, 以及 他们 占用的 块数. - ...

  9. mysql-视图及索引简介

    一.视图的创建.作用及注意事项 1.创建:create view 视图名 as select 语句: 2.删除:drop view 视图名 3.作用: 数据库视图允许简化复杂查询 数据库视图有助于限制 ...

  10. robotframework+python3+selenium之web相关关键字---第二集

    1.F5可查看所有关键字,如图: 2.浏览器相关关键字: 2.1  Open Browser    https://www.baidu.com  chrome    # 打开浏览器,rf默认使用火狐浏 ...