<?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. 一张图搞清楚Java异常机制

    下面是Java异常类的组织结构,红色区域的异常类表示是程序需要显示捕捉或者抛出的. Throwable Throwable是Java异常的顶级类,所有的异常都继承于这个类. Error,Excepti ...

  2. Spark on YARN--WordCount、TopK

    原文地址:http://blog.csdn.net/cklsoft/article/details/25568621 1.首先利用http://dongxicheng.org/framework-on ...

  3. 如何在Web项目中配置Spring MVC

    要使用Spring MVC需要在Web项目配置文件中web.xml中配置Spring MVC的前端控制器DispatchServlet <servlet> <servlet-name ...

  4. Android 中MediaPlayer播放音频

    1.播放/res/raw/目录下的音频资源 public class MainActivity extends Activity { MediaPlayer mediaPlayer; int posi ...

  5. Oracle如何杀同库不同实例的会话

    今天处理了一个生产上的问题,主要就是杀会话, 生产环境是Oracle11gR2 RAC:有同事开发报表,报表工具连接到数据库上特别嚣张,把内存pin住: Select s.INST_ID, s.Mac ...

  6. hbase报错: hbase.PleaseHoldException: Master is initializing

    查看hbase服务状态报错:   hbase(main)::> status ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master ...

  7. Linux主机通过windows虚拟机上网

    现在有些公司喜欢把网络接入和安全管理揉在一起管理,放着标准的协议不用,偏偏要采用某些厂商自己搞的所谓的"一整套解决方案".这些所谓的解决方案又常常只顾着windows.对非软件行业 ...

  8. vue搭建vue-cli脚手架项目

    一.Node.js 1.介绍 Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.Node.js是一个基于Ch ...

  9. 如何设置和使用MacOS上的Microsoft Office套件

    自30年前首次发布以来,Microsoft Office已成为全球最受欢迎的生产力套件之一.借助Word和Excel for Mac之类的程序,毫无疑问,MS Office套件在任何计算机上都是必须下 ...

  10. CentOS7.6 部署asp.net core2.2 应用

    1.安装.net Core SDK 在安装.NET之前,您需要注册Microsoft密钥,注册产品存储库并安装所需的依赖项.这只需要每台机器完成一次. 打开终端并运行以下命令: sudo rpm -U ...