<select id=
"BCDAO.selectBCByQuery"
resultMap=
"BaseResultMap"
>
select
select
process_key,
status
from
bm_config
where
status != -1
<dynamic prepend= "" >
<isNotNull prepend= "and" property= "status" >
status = #status#
</isNotNull>
<isNotNull prepend= "and" property= "gmtCreateStartString" >
gmt_create >= str_to_date(#gmtCreateStartString#, '%Y-%m-%d %H:%i:%s')
</isNotNull>
<isNotNull prepend= "and" property= "gmtCreateEndString" >
gmt_create <= str_to_date(#gmtCreateEndString#, '%Y-%m-%d %H:%i:%s')
</isNotNull>
</dynamic>
order by gmt_create desc
limit #pageFristItem#,#pageSize#
</select>
from
bm_config
where
status != -1
<dynamic prepend= "" >
<isNotNull prepend= "and" property= "status" >
status = #status#
</isNotNull>
<isNotNull prepend= "and" property= "gmtCreateStartString" >
gmt_create >= str_to_date(#gmtCreateStartString#, '%Y-%m-%d %H:%i:%s')
</isNotNull>
<isNotNull prepend= "and" property= "gmtCreateEndString" >
gmt_create <= str_to_date(#gmtCreateEndString#, '%Y-%m-%d %H:%i:%s')
</isNotNull>
</dynamic>
order by gmt_create desc
limit #pageFristItem#,#pageSize#
</select>