<?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. PHP面试 MySQL数据库基础

    MySQL数据库基础 MySQL数据类型 整数类型:TINYINT   SMALLINT   MEDIUMINT   INT   BIGINT 属性:UNSIGNED 长度:可以为整数类型指定宽度,列 ...

  2. gradle打成jar包报错 "错误: 找不到或无法加载主类 App"(已经配置过主类)

    文章目录 将gradle打成jar包(包括依赖) 运行jar包 报错 原因(src自己手动创建的) 解决(添加src目录) 将gradle打成jar包(包括依赖) jar { manifest { a ...

  3. Micro SQL Server2016

    Microsoft  SQL Server 2016 序列号(中英文通用) SQL Server 2016 企业版: MDCJV-3YX8N-WG89M-KV443-G8249SQL Server 2 ...

  4. 12. MySQL简单使用

    关于MySQL的使用,大家可以去网上看相关教程,但是为了保证阅读的连贯性,这里会做简单介绍. 创建数据库 我们双击刚刚新建的数据库,然后双击mysql,点击新建查询,可以在编辑器里面输入一些mysql ...

  5. jsonp协议 java服务端、JQuery客户端 简单实现原理

    原文链接:https://blog.csdn.net/Activity_Time/article/details/96440806 1. 概述 Jsonp(JSON with Padding) 是 j ...

  6. 【react】---react中key值的作用

    一.React中key值得作用 react中的key属性,它是一个特殊的属性,它是出现不是给开发者用的,而是给React自己使用,有了key属性后,就可以与组件建立了一种对应关系,简单说,react利 ...

  7. spring data jpa 关联设计

    MAP关联实体 // @ElementCollection @OneToMany(cascade = {CascadeType.ALL})// @JoinColumn(name = "the ...

  8. python调用tushare的pro_bar通用行情接口

    接口名称:pro_bar 更新时间:股票和指数通常在15点-17点之间,数字货币实时更新,具体请参考各接口文档明细. 描述:目前整合了股票(未复权.前复权.后复权).指数.数字货币.ETF基金.期货. ...

  9. uoj#186 【UR #13】Yist

    题目 orz myy 首先注意到答案有单调性,于是我们可以考虑二分一个\(x\),之后去判断一下每次只使用长度为\(x\)的区间能否删出目标序列 显然我们应该贪心地删除需要删除元素中最小的那一个,感性 ...

  10. ArcGis 创建含孔洞面要素AO C#

    IGeometryCollection geometryCollection = new PolygonClass(); IPointCollection pointCollection_Exteri ...