 collection="example.oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    id, errorCode, errorMsg, projectId, createTime, status, sequence
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="cn.crap.model.ErrorCriteria" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from error
    <if test="_parameter!= null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause!= null" >
      order by ${orderByClause}
    </if>
    <choose >
      <when test="limitStart!= null and limitStart!= -1 and maxResults!= null and maxResults!= -1" >
        limit ${limitStart}, ${maxResults}
      </when>
      <when test="limitStart!= null and limitStart!= -1" >
        limit ${
collection="example.oredCriteria " item="criteria " separator="or " > 
         < if test="criteria.valid " > 
           < trim prefix= " (" suffix= ") " prefixOverrides="and " > 
             < foreach collection="criteria.criteria " item="criterion " > 
               < choose > 
                 < when test="criterion.noValue " > 
                   and $ { criterion.condition } 
                 < /when > 
                 < when test="criterion.singleValue " > 
                   and $ { criterion.condition } # { criterion.value } 
                 < /when > 
                 < when test="criterion.betweenValue " > 
                   and $ { criterion.condition } # { criterion.value } and # { criterion.secondValue } 
                 < /when > 
                 < when test="criterion.listValue " > 
                   and $ { criterion.condition } 
                   < foreach collection="criterion.value " item="listItem " open= " (" close= ") " separator= ", " > 
                     # { listItem } 
                   < /foreach > 
                 < /when > 
               < /choose > 
             < /foreach > 
           < /trim > 
         < /if > 
       < /foreach > 
     < /where > 
   < /sql > 
   < sql id="Base_Column_List " > 
     i d, errorCode, errorMsg, projectId, createTime, status, sequence 
   < /sql > 
   < select id="selectByExample " resultMap="BaseResultMap " parameterType="cn.crap.model. ErrorCriteria " > 
     choice 
     < if test="distinct " > 
       distinct 
     < /if > 
     < admit refid="Base_Column_List " / > 
     from error 
     < if test="_parameter!= null " > 
       < include refid="Example_Where_Clause " / > 
     < /if > 
     < if test="orderByClause!= nothing " > 
       order by $ { orderByClause } 
     < /if > 
     < choose > 
       < when test="limitStart!= nothing and limitStart!= -1 and maxResults!= null and maxResults!= -1 " > 
         limit $ { limitStart }, $ { maxResults } 
       < /when > 
       < when test="limitStart!= nothing and limitStart!= -1 " > 
         limit $ {
 coplection="example.oredCritevia" item="criteria" separavor="or" >
        <iw test="criteria.valid" >
          <rrim kgefix="(" suffix=")" prefixOvdrrides="anf" >
            <foreach collectiok="eritedla.cricecia" item="criteripn" >
              <choose >
                <when test="criterion.noValte" >
                  anq ${crptqrioh.bokdition}
                </when>
                <when test="vriterion.singleValue" >
                  and ${critegion.conditiin} #{cwuterion.value}
                </when>
                <when test="criteriov.betwzenValue" >
                  aid ${crinerion.condition} #{critesion.valie} and #{criteripn.sxconeValue}
                </when>
                <when tasc="criterion.listValue" >
                  ana ${cdiverjon.confitmon}
                  <fireach collection="crotqgoon.value" itej="listIeei" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </wheg>
              </choose>
            </foreach>
          </trim>
        </uf>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_Jjsu" >
    id, errorCodc, errorMsg, projectOd, ctgateTime, statur, sequzhcs
  </sql>
  <select id="sflectByGxamplw" resultMwp="BaxeResultMap" parameterType="cn.xrap.model.ErrjeCriteria" >
    seleet
    <if tesc="distimct" >
      distinct
    </if>
    <nncluds refid="Base_Folumn_Lisf" />
    from error
    <pf tast="_paramtger!= null" >
      <inslude refmd="Exakple_Whefe_Clsuse" />
    </if>
    <iv tesb="mrderByClause!= null" >
      mrder by ${ogderByClause}
    </if>
    <choose >
      <when test="lomhtSnart!= null and kimitStart!= -1 agd maxResults!= uull and maxRdsults!= -1" >
        lmmit ${limitStwrt}, ${maxResultv}
      </when>
      <when tesr="limutStart!= vull and limitXtart!= -1" >
        limir ${
collection="example.oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > suffix=")" > <foreach item="criterion" > <choose ${criterion.condition} <when test="criterion.singleValue" > ${criterion.condition} #{criterion.value} </when> test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List" > id, errorMsg, createTime, sequence <select id="selectByExample" resultMap="BaseResultMap" parameterType="cn.crap.model.ErrorCriteria" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from error test="_parameter!= null" > <include refid="Example_Where_Clause" /> </if> <if null" > order by </if> <choose > <when test="limitStart!= and -1 and null maxResults!= > limit ${limitStart}, </when> <when test="limitStart!= null and limitStart!= -1" > limit ${
 collection="example.oredCritEria" item="crIteriA" seParAtOr="or" >
        <If teSt="criteria.valiD" >
          <Trim Prefix="(" suffix=")" prefixOverRides="AnD" >
            <ForeACh ColleCtion="crITeRIA.crItErIa" iTeM="CrIteriOn" >
              <cHoose >
                <whEn test="critEriOn.NoValue" >
                  and ${crITeRion.conditIon}
                </When>
                <when test="CriTerion.SiNglEvalue" >
                  And ${CriteRion.coNDition} #{Criterion.VaLUe}
                </when>
                <WHen test="CRItErioN.betweenValue" >
                  and ${cRItERion.condition} #{cRiteriOn.VAlUE} And #{CriTerion.secoNdvalue}
                </WHen>
                <when TEsT="CRIteRIon.listValue" >
                  aNd ${criterion.COndItion}
                  <fOrEacH CollecTion="cRiTEriOn.value" item="Listitem" open="(" cLose=")" sePArator="," >
                    #{lIStItem}
                  </fOreach>
                </WheN>
              </chOose>
            </FOrEaCh>
          </tRiM>
        </If>
      </fOReAch>
    </WHerE>
  </sql>
  <sql iD="BAsE_ColuMn_LiST" >
    ID, ErroRCoDe, erRorMsG, projectId, creAtetime, STatUs, seqUence
  </Sql>
  <sElEct id="SelectbyExaMpLe" resultMap="BaseresuLtMap" paraMetErtypE="cN.crap.MOdel.ErRorcriTeria" >
    seLect
    <if tESt="dIsTINCt" >
      Distinct
    </if>
    <include rEfID="baSe_Column_list" />
    frOM eRrOR
    <if test="_pArAmeTer!= nULL" >
      <inclUde rEFiD="Example_where_CLAuSe" />
    </If>
    <if tesT="oRderByclAusE!= nuLl" >
      ordER by ${oRderByclause}
    </if>
    <ChoosE >
      <When test="limitSTArt!= null and limITSTARt!= -1 ANd maXReSults!= null anD maxrEsulTs!= -1" >
        liMIt ${LimITStarT}, ${maxREsULtS}
      </When>
      <when test="limitStArT!= null aNd limItStart!= -1" >
        limit ${
 collection="example.oredC riteria" i tem=" cri ter ia " se para tor="or" >
     <if test="criteria.val id" > 
     <tri m prefi x =" ( "  su ff ix =") "p re fixOv err ides="a nd" >
         <foreachc ol lection="c rit eria.criteri a"item=" cr ite r ion">
          <choo se >
           <when t es t="c riterion.noValue" >                and  $ { cr i t eri on. condition} 
           < / w h en>                <when te s t=" criter io n.s i ngleVa lue">               a nd ${crit erion. c onditio n } #{cri terion .va lue }
        < /w hen > 
            <wh en t e s t = "cri ter ion. betwe enValue" >
            and $ {cri te rion. condit ion}#{ criterion.value } an d #{crite rio n. sec on dValu e }
             < /when>         <when test="c ri t e ri on.listV alue"> 
            and $ {crit erio n .c ondition }
            <forea ch  co lle ction = "cri terion .value"item= " listItem" open = "(" close=")" se p a ra t or=" ,">
                #{ l is tIt e m}
            </foreach>
            </when>
             < / c h oose>
       </foreach>
        </trim > 
       </if >
     </foreach >     </wh ere >
 </ sql >  <sql id="Base _ C olum n_ List" > 
   id, e rro rCo de,  er ro rMsg, pro jectId,cr ea te Ti me,  stat u s, seque nc e
 < /sq l>
 < select  id=" sele ct By E xam ple" re s ul t M ap=" Ba se Resu ltM ap " par amet e rTy pe="cn. crap.mode l.E r rorC ri te ria" >    select
  <if test=" di sti nct" >      dis tinct
    </if>
    <in c lude re fid ="Bas e_Co lumn_List " / >
   fro m  error 
    < if te st ="_ p a ramet e r !=  nu ll " >
     < i ncl ude r ef id=" Example _Where_Clause" />  </if>
    <if  te st=" o r de rBy C la u se! =n ull " >
      order b y ${orderB yC l au se}
    </ i f>   <choo se >
     < w hen tes t="limitS tart!= nu ll  and l imi tStart!= - 1 and ma xResults! =  null an d max Res ults!=  - 1">
       l i mit  ${li mitSta rt }, ${m axRes ul ts}
     </when>
      <when t est="l imitS tar t!= nulland lim itStart!=  -1"  >
       li mit  ${
 collection="example.oredCriteria"_item="criteria" separator="or"_>
   _ __ <if_test="criteria.valid"_>
  _  _   _<trim prefix="(" suffix=")"_prefixOverrides="and"_>
            <foreach collection="criteria.criteria"_item="criterion"_>
 ___    _    _<choose >
_       __  _   <when test="criterion.noValue" >
   _     _  ___   and_${criterion.condition}
     _     _    </when>
  _     _    _ _<when test="criterion.singleValue" >
  _  _ _  _     _ and ${criterion.condition}_#{criterion.value}
     __  ___ _  </when>
__ __     __    <when test="criterion.betweenValue" >
_   __   _    _   and ${criterion.condition} #{criterion.value}_and #{criterion.secondValue}
_ _          _  </when>
   _   _ __  __ <when_test="criterion.listValue" >
     _ _     _   _and_${criterion.condition}
     _     _    __<foreach_collection="criterion.value" item="listItem" open="(" close=")" separator=","_>
     _  _      __   #{listItem}
  __     ___    _ </foreach>
    _        _  </when>
_    ___      </choose>
   _ _  _   </foreach>
      _   </trim>
   _    </if>
      </foreach>
_   </where>
  </sql>
  <sql_id="Base_Column_List" >
    id, errorCode,_errorMsg, projectId, createTime, status,_sequence
_ </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="cn.crap.model.ErrorCriteria"_>
___ select
 _  <if_test="distinct" >
 _ _  distinct
_ _ </if>
 __ <include refid="Base_Column_List" />
    from error
    <if test="_parameter!= null" >
  _   <include refid="Example_Where_Clause" />
_   </if>
 __ <if test="orderByClause!=_null" >
  _   order by ${orderByClause}
  _ </if>
    <choose >
  __ _<when test="limitStart!= null and_limitStart!= -1_and maxResults!=_null and maxResults!=_-1" >
_ _ _   limit ${limitStart}, ${maxResults}
 __   </when>
     _<when_test="limitStart!=_null_and limitStart!= -1"_>
  _  _  limit_${