Ibatis sql语句
<?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 custom_sale_clew -->
<resultMap id="RM-CUSTOM-SALE-CLEW" class="com.yjf.borncrm.dal.dataobject.CustomSaleClewDO">
<result property="baseId" column="base_id" javaType="java.lang.String" jdbcType="VARCHAR" nullValue="0"/>
<result property="realName" column="real_name" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="gender" column="gender" javaType="int" jdbcType="INT" nullValue="0"/>
<result property="age" column="age" javaType="int" jdbcType="INT" nullValue="0"/>
<result property="referees" column="referees" 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="certNo" column="cert_no" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="qq" column="qq" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="rawAddTime" column="raw_add_time" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result property="rawUpdateTime" column="raw_update_time" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result property="userId" column="user_id" javaType="java.lang.String" jdbcType="VARCHAR" nullValue="0"/>
<result property="platformId" column="platform_id" javaType="long" jdbcType="BIGINT" nullValue="0"/>
<result property="inputPerson" column="input_person" javaType="java.lang.String" jdbcType="VARCHAR" nullValue=""/>
<result property="inputPersonName" column="input_person_name" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="salePerson" column="sale_person" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="salePersonName" column="sale_person_name" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="clewType" column="clew_type" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="status" column="status" javaType="java.lang.String" jdbcType="CHAR"/>
<result property="userName" column="user_name" javaType="java.lang.String" jdbcType="VARCHAR"/>
</resultMap>
<!-- ============================================= -->
<!-- mapped statements for IbatisCustomSaleClewDAO -->
<!-- ============================================= -->
<!-- mapped statement for IbatisCustomSaleClewDAO.insert -->
<insert id="MS-CUSTOM-SALE-CLEW-INSERT">
INSERT /*MS-BORNCRM-CUSTOM-SALE-CLEW-INSERT*/ INTO custom_sale_clew (base_id,real_name,gender,age,referees,mobile,mail,cert_no,qq,raw_add_time,user_id,platform_id,input_person,input_person_name,sale_person,sale_person_name,clew_type,status,user_name)
VALUES(#baseId#,#realName#,#gender#,#age#,#referees#,#mobile#,#mail#,#certNo#,#qq#,CURRENT_TIMESTAMP,#userId#,#platformId#,#inputPerson#,#inputPersonName#,#salePerson#,#salePersonName#,#clewType#,#status#,#userName#)
</insert>
<!-- mapped statement for IbatisCustomSaleClewDAO.update -->
<update id="MS-CUSTOM-SALE-CLEW-UPDATE">
UPDATE /*MS-BORNCRM-CUSTOM-SALE-CLEW-UPDATE*/ custom_sale_clew SET real_name=#realName#, gender=#gender#, age=#age#, referees=#referees#, mobile=#mobile#, mail=#mail#, cert_no=#certNo#, qq=#qq#, user_id=#userId#, platform_id=#platformId#,
input_person=#inputPerson#, input_person_name=#inputPersonName#, sale_person=#salePerson#, sale_person_name=#salePersonName#, clew_type=#clewType#, status=#status#, user_name=#userName# WHERE (base_id = #baseId#)
</update>
<update id="MS-CUSTOM-SALE-CLEW-UPDATE-SALE-PERSON">
UPDATE /*MS-CUSTOM-SALE-CLEW-UPDATE-SALE-PERSON*/ custom_sale_clew SET sale_person=#salePerson#, sale_person_name=#salePersonName# WHERE (base_id = #baseId#)
</update>
<!-- mapped statement for IbatisCustomSaleClewDAO.deleteBybaseId -->
<delete id="MS-CUSTOM-SALE-CLEW-DELETE-BYBASE-ID">
<![CDATA[
DELETE /*MS-BORNCRM-CUSTOM-SALE-CLEW-DELETE-BYBASE-ID*/ FROM custom_sale_clew WHERE (base_id = #value#)
]]>
</delete>
<!-- mapped statement for IbatisCustomSaleClewDAO.findByBaseId -->
<select id="MS-CUSTOM-SALE-CLEW-FIND-BY-BASE-ID" resultMap="RM-CUSTOM-SALE-CLEW">
SELECT /*MS-BORNCRM-CUSTOM-SALE-CLEW-FIND-BY-CONDITION*/ base_id ,real_name ,gender ,age ,referees ,mobile ,mail ,cert_no ,qq ,raw_add_time ,raw_update_time ,user_id ,platform_id ,input_person,input_person_name ,sale_person ,sale_person_name ,clew_type ,status ,user_name FROM custom_sale_clew WHERE status ='1' and (base_id = #baseId#)
</select>
<!-- mapped statement for IbatisCustomSaleClewDAO.SELECTCount -->
<select id="MS-CUSTOM-SALE-CLEW-SELECT-COUNT" resultClass="long">
<![CDATA[
SELECT /*MS-BORNCRM-CUSTOM-SALE-CLEW-SELECT-COUNT*/ COUNT(*) FROM custom_sale_clew where status='1'
]]>
</select>
<!-- mapped statement for IbatisCustomSaleClewDAO.findByCondition -->
<select id="MS-CUSTOM-SALE-CLEW-FIND-BY-CONDITION" resultMap="RM-CUSTOM-SALE-CLEW">
SELECT /*MS-BORNCRM-CUSTOM-SALE-CLEW-FIND-BY-CONDITION*/ base_id ,real_name ,gender ,age ,referees ,mobile ,mail ,cert_no ,qq ,raw_add_time ,raw_update_time ,user_id ,platform_id ,input_person,input_person_name ,sale_person ,sale_person_name ,clew_type ,status ,user_name FROM custom_sale_clew
where 1=1 and status='1'
<dynamic>
<isGreaterThan property="customSaleClew.baseId" compareValue="0" prepend=" and ">
base_id=#customSaleClew.baseId#
</isGreaterThan>
<isGreaterThan property="customSaleClew.platformId" compareValue="0" prepend=" and ">
platform_id=#customSaleClew.platformId#
</isGreaterThan>
<isGreaterThan property="customSaleClew.userId" compareValue="0" prepend=" and ">
user_id=#customSaleClew.userId#
</isGreaterThan>
<isNotEmpty property="customSaleClew.realName" prepend=" and ">
real_name=#customSaleClew.realName#
</isNotEmpty>
<isNotEmpty property="customSaleClew.mobile" prepend=" and ">
mobile=#customSaleClew.mobile#
</isNotEmpty>
<isNotEmpty property="customSaleClew.mail" prepend=" and ">
mail=#customSaleClew.mail#
</isNotEmpty>
<isNotEmpty property="customSaleClew.clewType" prepend=" and ">
clew_type=#customSaleClew.clewType#
</isNotEmpty>
<isNotEmpty property="customSaleClew.salePerson" prepend=" and ">
sale_person=#customSaleClew.salePerson#
</isNotEmpty>
</dynamic>
LIMIT #limitStart#,#pageSize#
</select>
<!-- mapped statement for IbatisCustomSaleClewDAO.findCountByCondition -->
<select id="MS-CUSTOM-SALE-CLEW-FIND-COUNT-BY-CONDITION" resultClass="long">
SELECT /*MS-BORNCRM-CUSTOM-SALE-CLEW-FIND-COUNT-BY-CONDITION*/ COUNT(*) FROM custom_sale_clew WHERE 1=1
<dynamic>
<isNotEmpty property="minAawAddTime" prepend=" and ">
to_days(raw_add_time) >=to_days(#minAawAddTime#)
</isNotEmpty>
<isNotEmpty property="maxAawAddTime" prepend=" and ">
to_days(raw_add_time) <= to_days(#maxAawAddTime#)
</isNotEmpty>
<isNotEmpty property="startLatelyInvestTime" prepend=" and ">
to_days(now())-to_days(raw_add_time) <= #days#
</isNotEmpty>
<isGreaterThan property="customSaleClew.baseId" compareValue="0" prepend=" and ">
base_id=#customSaleClew.baseId#
</isGreaterThan>
<isGreaterThan property="customSaleClew.platformId" compareValue="0" prepend=" and ">
platform_id=#customSaleClew.platformId#
</isGreaterThan>
<isGreaterThan property="customSaleClew.userId" compareValue="0" prepend=" and ">
user_id=#customSaleClew.userId#
</isGreaterThan>
<isNotEmpty property="customSaleClew.realName" prepend=" and ">
real_name=#customSaleClew.realName#
</isNotEmpty>
<isNotEmpty property="customSaleClew.mobile" prepend=" and ">
mobile=#customSaleClew.mobile#
</isNotEmpty>
<isNotEmpty property="customSaleClew.mail" prepend=" and ">
mail=#customSaleClew.mail#
</isNotEmpty>
<isNotEmpty property="customSaleClew.clewType" prepend=" and ">
clew_type=#customSaleClew.clewType#
</isNotEmpty>
<isNotEmpty property="customSaleClew.salePerson" prepend=" and ">
sale_person=#customSaleClew.salePerson#
</isNotEmpty>
</dynamic>
</select>
</sqlMap>
Ibatis sql语句的更多相关文章
- Ibatis sql语句1
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE sqlMap PUBLIC "-/ ...
- 转:ibatis常用16条SQL语句
1.输入参数为单个值 <delete id="com.fashionfree.stat.accesslog.deleteMemberAccessLogsBefore" par ...
- mybatis和ibatis控制台打印sql语句方法
#将ibatis log4j运行级别调到DEBUG可以在控制台打印出ibatis运行的sql语句 log4j.rootLogger=debug,stdout,logfile### 把日志信息输出到控制 ...
- ibatis mybatis sql语句配置 符号不兼容 大于号 小于号<!CDATA[ ]>
ibatis mybatis sql语句配置 符号不兼容 大于号 小于号<!CDATA[ ]> 因为这个是xml格式的,所以不允许出现类似">"这样的字符,但是都 ...
- IBatis.net动态SQL语句
在学习动态SQL语句之前,首先必须对条件查询有一定了解,先来学习如何向IBatis.Net的映射文件里传入参数. 一.条件查询 1.传递单个参数 如根据Id查询: <select id=&quo ...
- iBATIS.net获取运行时sql语句
[本文原创,第一次离首页如此之近.发在候选区攒攒rp,管理员看着不合适可以撤下.] 虽然只在iBatis的世界里小打小闹匆匆数月,却历经数次与领导和同事激辩,再通过不懈努力学习和开发积累,楼猪终于被它 ...
- IBatis.net 输出SQL语句(七)
一.IBatis.net输出SQL语句到控制台 输出IBatis.net生成的SQL语句到控制台,能够方便调试. 如果要想输出IBatis.net的SQL语句到控制台,那么只需要做如下配置即可: &l ...
- IBatis.net动态SQL语句(六)
在学习动态SQL语句之前,首先必须对条件查询有一定了解,先来学习如何向IBatis.Net的映射文件里传入参数. 一.条件查询 1.传递单个参数 如根据Id查询: <select id=&quo ...
- 打印Ibatis最终的SQL语句
在项目开发时都大家都希望将SQL在后台打印出来,以帮助开发以及后续的bug修改.如果用JDBC那么可以方便的打印,可使用ibatis就不知道怎么办了,最近在网上找了一段log4j的配置可以很保姆的处理 ...
随机推荐
- sed 对文件进行操作
首先我们想不进入一个文件 对文件进行操作 那么久需要用到sed了 在某个变量之前添加内容: sed -i 's/原内容/要添加内容/g' 文件名 sed -i 's/原内容/要添加内容&/' ...
- mysql与python连接学习
1 问题: pip install MySQLClient 遇到 error: Microsoft Visual C++ 14.0 is required. Get it with "Mi ...
- Java语言基础及java核心
一.Java语言特点 1. 简单 2. 面向对象 3. 分布式 4. 健壮 5. 安全 6. 中性架构跨平台 7. 超强的可移植性 8. 高性能 9. 多线程 二.java的环境变量 JAVA_HOM ...
- DNS域名解析服务以及Bind服务程序
一般来讲域名比IP地址更加的有含义.也更容易记住,所以通常用户更习惯输入域名来访问网络中的资源,但是计算机主机在互联网中只能通过IP识别对方主机,那么就需要DNS域名解析服务了. DNS域名解析服务( ...
- Python删除列表中的空格
list1 = ['122','2333','3444',' ','422',' ',' ','54',' '] list1=[x.strip() for x in list1 if x.strip( ...
- [已解决]报错: No module named pip
cmd中敲命令: python -m ensurepip 更新升级pip命令: python -m pip install --upgrade pip
- 清除浮动最有效的css写法
说起来呢,基本上只要你给容器div加了float的属性,就需要清除浮动来使页面显示正常,那么,到底有什么方法可以让浮动轻松清除呢? 可以用display:flex;替代,但是它对IE8,9支持不是很好 ...
- DPS首战鞍山
10月17日就即将飞机去鞍山了,不知不觉进入ACM的世界已经有一年了.虽然这一年我不够勤奋, 还是经常打LOL ,但是感觉自己真的学到了很多 . 在SCAU无数次选拔赛, 淘汰赛,个人排位赛 ,组队训 ...
- vue 使用pug(详细说明)
1.安装pug npm i -D pug pug-html-loader pug-plain-loader cli2.0脚手架修改build/webpack.base.conf.js文件 module ...
- 【JS学习】慕课网4-1编程挑战 函数
要求:小伙伴们,请编写"改变颜色"."改变宽高"."隐藏内容"."显示内容"."取消设置"的函数,点 ...