123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd" >
- <sqlMap namespace="xx_gttsjl" >
- <resultMap id="ibatorgenerated_BaseResultMap" class="com.huimv.xx.dataobject.XxGttsjl" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- <result column="id" property="id" jdbcType="INTEGER" />
- <result column="xxid" property="xxid" jdbcType="INTEGER" />
- <result column="taskid" property="taskid" jdbcType="VARCHAR" />
- <result column="tsfs" property="tsfs" jdbcType="INTEGER" />
- <result column="fsxxmc" property="fsxxmc" jdbcType="VARCHAR" />
- <result column="zxyhtotal" property="zxyhtotal" jdbcType="INTEGER" />
- <result column="lxyhtotal" property="lxyhtotal" jdbcType="INTEGER" />
- <result column="msgtotal" property="msgtotal" jdbcType="INTEGER" />
- <result column="msgprocess" property="msgprocess" jdbcType="INTEGER" />
- <result column="clicknum" property="clicknum" jdbcType="INTEGER" />
- <result column="content" property="content" jdbcType="VARCHAR" />
- <result column="fssj" property="fssj" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="ibatorgenerated_Example_Where_Clause" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- <iterate property="oredCriteria" conjunction="or" prepend="where" removeFirstPrepend="iterate" >
- <isEqual property="oredCriteria[].valid" compareValue="true" >
- (
- <iterate prepend="and" property="oredCriteria[].criteriaWithoutValue" conjunction="and" >
- $oredCriteria[].criteriaWithoutValue[]$
- </iterate>
- <iterate prepend="and" property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
- $oredCriteria[].criteriaWithSingleValue[].condition$
- #oredCriteria[].criteriaWithSingleValue[].value#
- </iterate>
- <iterate prepend="and" property="oredCriteria[].criteriaWithListValue" conjunction="and" >
- $oredCriteria[].criteriaWithListValue[].condition$
- <iterate property="oredCriteria[].criteriaWithListValue[].values" open="(" close=")" conjunction="," >
- #oredCriteria[].criteriaWithListValue[].values[]#
- </iterate>
- </iterate>
- <iterate prepend="and" property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
- $oredCriteria[].criteriaWithBetweenValue[].condition$
- #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
- #oredCriteria[].criteriaWithBetweenValue[].values[1]#
- </iterate>
- )
- </isEqual>
- </iterate>
- </sql>
- <select id="ibatorgenerated_selectByExample" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.xx.dataobject.XxGttsjlExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- select id, xxid, taskid, tsfs, fsxxmc, zxyhtotal, lxyhtotal, msgtotal, msgprocess, clicknum,
- content, fssj
- from xx_gttsjl
- <isParameterPresent >
- <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
- <isNotNull property="orderByClause" >
- order by $orderByClause$
- </isNotNull>
- <isGreaterEqual property="start" compareValue="0" >
- limit $start$ , $limit$
- </isGreaterEqual>
- </isParameterPresent>
- </select>
- <select id="ibatorgenerated_selectByPrimaryKey" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- select id, xxid, taskid, tsfs, fsxxmc, zxyhtotal, lxyhtotal, msgtotal, msgprocess, clicknum,
- content, fssj
- from xx_gttsjl
- where id = #id:INTEGER#
- </select>
- <delete id="ibatorgenerated_deleteByPrimaryKey" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- delete from xx_gttsjl
- where id = #id:INTEGER#
- </delete>
- <delete id="ibatorgenerated_deleteByExample" parameterClass="com.huimv.xx.dataobject.XxGttsjlExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- delete from xx_gttsjl
- <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
- </delete>
- <insert id="ibatorgenerated_insert" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- insert into xx_gttsjl (id, xxid, taskid, tsfs, fsxxmc, zxyhtotal, lxyhtotal, msgtotal,
- msgprocess, clicknum, content, fssj)
- values (#id:INTEGER#, #xxid:INTEGER#, #taskid:VARCHAR#, #tsfs:INTEGER#, #fsxxmc:VARCHAR#,
- #zxyhtotal:INTEGER#, #lxyhtotal:INTEGER#, #msgtotal:INTEGER#, #msgprocess:INTEGER#,
- #clicknum:INTEGER#, #content:VARCHAR#, #fssj:TIMESTAMP#)
- </insert>
- <insert id="ibatorgenerated_insertSelective" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- insert into xx_gttsjl
- <dynamic prepend="(" >
- <isNotNull prepend="," property="id" >
- id
- </isNotNull>
- <isNotNull prepend="," property="xxid" >
- xxid
- </isNotNull>
- <isNotNull prepend="," property="taskid" >
- taskid
- </isNotNull>
- <isNotNull prepend="," property="tsfs" >
- tsfs
- </isNotNull>
- <isNotNull prepend="," property="fsxxmc" >
- fsxxmc
- </isNotNull>
- <isNotNull prepend="," property="zxyhtotal" >
- zxyhtotal
- </isNotNull>
- <isNotNull prepend="," property="lxyhtotal" >
- lxyhtotal
- </isNotNull>
- <isNotNull prepend="," property="msgtotal" >
- msgtotal
- </isNotNull>
- <isNotNull prepend="," property="msgprocess" >
- msgprocess
- </isNotNull>
- <isNotNull prepend="," property="clicknum" >
- clicknum
- </isNotNull>
- <isNotNull prepend="," property="content" >
- content
- </isNotNull>
- <isNotNull prepend="," property="fssj" >
- fssj
- </isNotNull>
- )
- </dynamic>
- values
- <dynamic prepend="(" >
- <isNotNull prepend="," property="id" >
- #id:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="xxid" >
- #xxid:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="taskid" >
- #taskid:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="tsfs" >
- #tsfs:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="fsxxmc" >
- #fsxxmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="zxyhtotal" >
- #zxyhtotal:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="lxyhtotal" >
- #lxyhtotal:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="msgtotal" >
- #msgtotal:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="msgprocess" >
- #msgprocess:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="clicknum" >
- #clicknum:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="content" >
- #content:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="fssj" >
- #fssj:TIMESTAMP#
- </isNotNull>
- )
- </dynamic>
- </insert>
- <select id="ibatorgenerated_countByExample" parameterClass="com.huimv.xx.dataobject.XxGttsjlExample" resultClass="java.lang.Integer" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- select count(*) from xx_gttsjl
- <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
- </select>
- <update id="ibatorgenerated_updateByExampleSelective" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- update xx_gttsjl
- <dynamic prepend="set" >
- <isNotNull prepend="," property="record.id" >
- id = #record.id:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.xxid" >
- xxid = #record.xxid:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.taskid" >
- taskid = #record.taskid:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.tsfs" >
- tsfs = #record.tsfs:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.fsxxmc" >
- fsxxmc = #record.fsxxmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.zxyhtotal" >
- zxyhtotal = #record.zxyhtotal:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.lxyhtotal" >
- lxyhtotal = #record.lxyhtotal:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.msgtotal" >
- msgtotal = #record.msgtotal:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.msgprocess" >
- msgprocess = #record.msgprocess:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.clicknum" >
- clicknum = #record.clicknum:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.content" >
- content = #record.content:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.fssj" >
- fssj = #record.fssj:TIMESTAMP#
- </isNotNull>
- </dynamic>
- <isParameterPresent >
- <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
- </isParameterPresent>
- </update>
- <update id="ibatorgenerated_updateByExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- update xx_gttsjl
- set id = #record.id:INTEGER#,
- xxid = #record.xxid:INTEGER#,
- taskid = #record.taskid:VARCHAR#,
- tsfs = #record.tsfs:INTEGER#,
- fsxxmc = #record.fsxxmc:VARCHAR#,
- zxyhtotal = #record.zxyhtotal:INTEGER#,
- lxyhtotal = #record.lxyhtotal:INTEGER#,
- msgtotal = #record.msgtotal:INTEGER#,
- msgprocess = #record.msgprocess:INTEGER#,
- clicknum = #record.clicknum:INTEGER#,
- content = #record.content:VARCHAR#,
- fssj = #record.fssj:TIMESTAMP#
- <isParameterPresent >
- <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
- </isParameterPresent>
- </update>
- <update id="ibatorgenerated_updateByPrimaryKeySelective" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- update xx_gttsjl
- <dynamic prepend="set" >
- <isNotNull prepend="," property="xxid" >
- xxid = #xxid:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="taskid" >
- taskid = #taskid:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="tsfs" >
- tsfs = #tsfs:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="fsxxmc" >
- fsxxmc = #fsxxmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="zxyhtotal" >
- zxyhtotal = #zxyhtotal:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="lxyhtotal" >
- lxyhtotal = #lxyhtotal:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="msgtotal" >
- msgtotal = #msgtotal:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="msgprocess" >
- msgprocess = #msgprocess:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="clicknum" >
- clicknum = #clicknum:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="content" >
- content = #content:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="fssj" >
- fssj = #fssj:TIMESTAMP#
- </isNotNull>
- </dynamic>
- where id = #id:INTEGER#
- </update>
- <update id="ibatorgenerated_updateByPrimaryKey" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri Mar 18 11:07:01 CST 2016.
- -->
- update xx_gttsjl
- set xxid = #xxid:INTEGER#,
- taskid = #taskid:VARCHAR#,
- tsfs = #tsfs:INTEGER#,
- fsxxmc = #fsxxmc:VARCHAR#,
- zxyhtotal = #zxyhtotal:INTEGER#,
- lxyhtotal = #lxyhtotal:INTEGER#,
- msgtotal = #msgtotal:INTEGER#,
- msgprocess = #msgprocess:INTEGER#,
- clicknum = #clicknum:INTEGER#,
- content = #content:VARCHAR#,
- fssj = #fssj:TIMESTAMP#
- where id = #id:INTEGER#
- </update>
-
- <select id="count.gtts.by.param" parameterClass="java.util.HashMap" resultClass="java.lang.Integer">
- select count(1) from xx_gttsjl gt where
- (gt.clicknum <![CDATA[<]]> 1 or gt.clicknum is null) and EXISTS
- (select 1 from xx_xxts ts where ts.id = gt.xxid and exists
- (select 1 from da_mcda mc where ts.mcid = mc.id
- <isNotNull prepend="and" property="mcid">
- mc.id = #mcid#
- </isNotNull>
- <isNotNull prepend="and" property="qyid">
- mc.qyid = #qyid#
- </isNotNull>
- )
- and ts.fbsj > date_add(now(), INTERVAL -3 day)
- <isNotNull prepend="and" property="xxfl">
- $xxfl$
- </isNotNull>
- )
- </select>
-
- <update id="update.clicknum.by.xxid" parameterClass="java.lang.Integer">
- update xx_gttsjl set clicknum = case when clicknum is null then 0 else clicknum end + 1 where xxid = #xxid#
- </update>
- </sqlMap>
|