<?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) &gt;=to_days(#minAawAddTime#)
</isNotEmpty>
<isNotEmpty property="maxAawAddTime" prepend=" and ">
to_days(raw_add_time) &lt;= to_days(#maxAawAddTime#)
</isNotEmpty>
<isNotEmpty property="startLatelyInvestTime" prepend=" and ">
to_days(now())-to_days(raw_add_time) &lt;= #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语句的更多相关文章

  1. Ibatis sql语句1

    <?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. FPGA前仿真后仿真

    前仿真 后仿真 时序(综合后)仿真 时序仿真将时延考虑进去,包括综合后产生的(与.或.非)门时延,还有布局布线产生的时延. 综合(Synthesize),就是将HDL语言设计输入翻译成由与.或.非门和 ...

  2. 常用内置模块(一)——time、os、sys、random、shutil、pickle、json

    常用内置模块 一.time模块 在python中,时间分为3种       1.时间戳: timestamp,从1970年1月1日到现在的秒数, 主要用于计算两个时间的差    2.localtime ...

  3. UVA11134_Fabled Rooks

    大概题意: 在n*n的棋盘上面放n个车,能否使他们互相不攻击(即不能在同一行一列),并且第i个车必须落在第i的矩形范围(xl,yl, xr,yr)之内 xy互相并不干扰,所以就可以把这个二维问题压缩成 ...

  4. 在idea 上springboot 1.5.6集成jsp页面

    第一步:新建一个项目 推荐使用这个,默认下一步就好, 填写自己的信息,next, , 选择使用的功能,也可以新建好之后再pom.xml里手动添加, 选择项目存放地址,一个springboot的项目就建 ...

  5. teb教程10 teb questions

    http://wiki.ros.org/teb_local_planner/Tutorials/Frequently%20Asked%20Questions

  6. C# 关于获取周,月,年时间大全

    DateTime now = DateTime.Now; DayOfWeek dayOfWeek = now.DayOfWeek; : (int)dayOfWeek; //本周第一天(此结果是周一,如 ...

  7. KMP 算法学习

    KMP算法是用来做字符串匹配的.关于字符串匹配,最简单最容易想到的方法是暴利查找,使用双重for循环处理. 该方法的时间复杂度为O((n-m+1)*m) (n为目标串T长度,m为模式串P长度, 从T中 ...

  8. jquery控件-实现自定义样式的弹出窗口和确认框(转)

    (function () { $.MsgBox = { Alert: function (title, msg) { GenerateHtml("alert", title, ms ...

  9. PHP-缺失的第一个正数

    给定一个未排序的整数数组,找出其中没有出现的最小的正整数. 示例 1: 输入: [1,2,0]输出: 3示例 2: 输入: [3,4,-1,1]输出: 2示例 3: 输入: [7,8,9,11,12] ...

  10. tcp/ip的通俗讲述(转)

    源地址:https://www.runoob.com/tcpip/tcpip-tutorial.html 对于我们来说网络世界丰富多彩,对于互联网来说也就是数据根据相应的规则在跑来跑去.(这些规则就是 ...