123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300 |
- <?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="xt_dmlb" >
- <resultMap id="ibatorgenerated_BaseResultMap" class="com.huimv.xt.dataobject.XtDmlb" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- <result column="LBID" property="lbid" jdbcType="INTEGER" />
- <result column="LBMC" property="lbmc" jdbcType="VARCHAR" />
- <result column="JC" property="jc" jdbcType="INTEGER" />
- <result column="SXH" property="sxh" jdbcType="INTEGER" />
- <result column="XGR" property="xgr" jdbcType="VARCHAR" />
- <result column="XGSJ" property="xgsj" jdbcType="TIMESTAMP" />
- <result column="ZFBZ" property="zfbz" jdbcType="INTEGER" />
- </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 May 30 10:23:18 CST 2014.
- -->
- <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.xt.dataobject.XtDmlbExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- select LBID, LBMC, JC, SXH, XGR, XGSJ, ZFBZ
- from xt_dmlb
- <isParameterPresent >
- <include refid="xt_dmlb.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.xt.dataobject.XtDmlb" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- select LBID, LBMC, JC, SXH, XGR, XGSJ, ZFBZ
- from xt_dmlb
- where LBID = #lbid:INTEGER#
- </select>
- <delete id="ibatorgenerated_deleteByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtDmlb" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- delete from xt_dmlb
- where LBID = #lbid:INTEGER#
- </delete>
- <delete id="ibatorgenerated_deleteByExample" parameterClass="com.huimv.xt.dataobject.XtDmlbExample" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- delete from xt_dmlb
- <include refid="xt_dmlb.ibatorgenerated_Example_Where_Clause" />
- </delete>
- <insert id="ibatorgenerated_insert" parameterClass="com.huimv.xt.dataobject.XtDmlb" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- insert into xt_dmlb (LBID, LBMC, JC, SXH, XGR, XGSJ, ZFBZ)
- values (#lbid:INTEGER#, #lbmc:VARCHAR#, #jc:INTEGER#, #sxh:INTEGER#, #xgr:VARCHAR#,
- #xgsj:TIMESTAMP#, #zfbz:INTEGER#)
- </insert>
- <insert id="ibatorgenerated_insertSelective" parameterClass="com.huimv.xt.dataobject.XtDmlb" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- insert into xt_dmlb
- <dynamic prepend="(" >
- <isNotNull prepend="," property="lbid" >
- LBID
- </isNotNull>
- <isNotNull prepend="," property="lbmc" >
- LBMC
- </isNotNull>
- <isNotNull prepend="," property="jc" >
- JC
- </isNotNull>
- <isNotNull prepend="," property="sxh" >
- SXH
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- XGR
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- XGSJ
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- ZFBZ
- </isNotNull>
- )
- </dynamic>
- values
- <dynamic prepend="(" >
- <isNotNull prepend="," property="lbid" >
- #lbid:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="lbmc" >
- #lbmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="jc" >
- #jc:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="sxh" >
- #sxh:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- #xgr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- #xgsj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- #zfbz:INTEGER#
- </isNotNull>
- )
- </dynamic>
- </insert>
- <select id="ibatorgenerated_countByExample" parameterClass="com.huimv.xt.dataobject.XtDmlbExample" resultClass="java.lang.Integer" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- select count(*) from xt_dmlb
- <include refid="xt_dmlb.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 May 30 10:23:18 CST 2014.
- -->
- update xt_dmlb
- <dynamic prepend="set" >
- <isNotNull prepend="," property="record.lbid" >
- LBID = #record.lbid:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.lbmc" >
- LBMC = #record.lbmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.jc" >
- JC = #record.jc:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.sxh" >
- SXH = #record.sxh:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="record.xgr" >
- XGR = #record.xgr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="record.xgsj" >
- XGSJ = #record.xgsj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="record.zfbz" >
- ZFBZ = #record.zfbz:INTEGER#
- </isNotNull>
- </dynamic>
- <isParameterPresent >
- <include refid="xt_dmlb.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 May 30 10:23:18 CST 2014.
- -->
- update xt_dmlb
- set LBID = #record.lbid:INTEGER#,
- LBMC = #record.lbmc:VARCHAR#,
- JC = #record.jc:INTEGER#,
- SXH = #record.sxh:INTEGER#,
- XGR = #record.xgr:VARCHAR#,
- XGSJ = #record.xgsj:TIMESTAMP#,
- ZFBZ = #record.zfbz:INTEGER#
- <isParameterPresent >
- <include refid="xt_dmlb.ibatorgenerated_Example_Where_Clause" />
- </isParameterPresent>
- </update>
- <update id="ibatorgenerated_updateByPrimaryKeySelective" parameterClass="com.huimv.xt.dataobject.XtDmlb" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- update xt_dmlb
- <dynamic prepend="set" >
- <isNotNull prepend="," property="lbmc" >
- LBMC = #lbmc:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="jc" >
- JC = #jc:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="sxh" >
- SXH = #sxh:INTEGER#
- </isNotNull>
- <isNotNull prepend="," property="xgr" >
- XGR = #xgr:VARCHAR#
- </isNotNull>
- <isNotNull prepend="," property="xgsj" >
- XGSJ = #xgsj:TIMESTAMP#
- </isNotNull>
- <isNotNull prepend="," property="zfbz" >
- ZFBZ = #zfbz:INTEGER#
- </isNotNull>
- </dynamic>
- where LBID = #lbid:INTEGER#
- </update>
- <update id="ibatorgenerated_updateByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtDmlb" >
- <!--
- WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
- This element was generated on Fri May 30 10:23:18 CST 2014.
- -->
- update xt_dmlb
- set LBMC = #lbmc:VARCHAR#,
- JC = #jc:INTEGER#,
- SXH = #sxh:INTEGER#,
- XGR = #xgr:VARCHAR#,
- XGSJ = #xgsj:TIMESTAMP#,
- ZFBZ = #zfbz:INTEGER#
- where LBID = #lbid:INTEGER#
- </update>
-
- <!-- dmlb的搜索条件 -->
- <sql id="xt.dmlb.where.cause">
- <dynamic>
- <isNotEmpty prepend="and" property="lbid">
- d.LBID = #lbid#
- </isNotEmpty>
- <isNotEmpty prepend="and" property="lbmc">
- d.LBMC like '%$lbmc$%'
- </isNotEmpty>
- <isNotEmpty prepend="and" property="jc">
- d.JC = #jc#
- </isNotEmpty>
- <isNotEmpty prepend="and" property="sxh">
- d.SXH = #sxh#
- </isNotEmpty>
- <isNotEmpty prepend="and" property="xgr">
- d.XGR = #xgr#
- </isNotEmpty>
- </dynamic>
- </sql>
-
- <!-- 根据指定条件搜索代码类别 -->
- <select id="select.dmlb.by.param" parameterClass="java.util.Map"
- resultClass="com.huimv.xt.dataobject.XtDmlb">
- select d.LBID,d.LBMC,d.JC,d.SXH,d.XGR,c.YHXM as XGRXM,d.XGSJ
- from xt_dmlb d
- LEFT JOIN xt_czyh c on d.XGR = c.ID and c.ZFBZ = 0
- where d.ZFBZ = 0
- <isParameterPresent>
- <include refid="xt.dmlb.where.cause" />
- </isParameterPresent>
- <dynamic prepend="order by">
- <isNotEmpty property="order">$order$</isNotEmpty>
- </dynamic>
- limit #startRecord#,#endRecord#
- </select>
-
- <!-- 根据指定条件搜索代码类别的条数 -->
- <select id="count.dmlb.by.param" parameterClass="java.util.Map"
- resultClass="java.lang.Integer">
- select count(*) from xt_dmlb d where d.ZFBZ = 0
- <isParameterPresent>
- <include refid="xt.dmlb.where.cause" />
- </isParameterPresent>
- </select>
- </sqlMap>
|