mybatis多条件查询的物理分页
如何实现分页,请给出语句<select id="selectLikeDxx" parameterType="com.hrdz.model.bo.Dxx" resultMap="BaseResultMap">
select
mesid, sender, sendphone,
sendtime, sendcontext, sendtype,
receiver, recephone, recetime,
receunit, recedept, contexttype,
sendstatus, recestatus, ifcase,
casetype, ifsee, ifworked,
resulted, workpeople, worktime,
systime1, systime2, dxx1,
dxx2, dxx3, picture
from
Dxx
where
1=1
<if test="sender !=''">
and receiver like '%${sender}%'
</if>
<if test="sendphone !=''">
and sendphone like '%${sendphone}%'
</if>
<if test="ifcase!=''">
and ifcase = #{ifcase}
</if>
<if test="receiver!=''">
and receiver like '%${receiver}%'
</if>
<if test="recephone!=''">
and recephone like '%${recephone}%'
</if>
<if test="sendtime !='' " >
<if test="dxx3!=''">
and sendtime between #{sendtime} and #{dxx3}
</if>
<if test="dxx3==''">
and sendtime >= #{sendtime}
</if>
</if>
<if test="sendtime ==''">
<if test="dxx3!=''">
and sendtime <= #{dxx3}
</if>
</if>
order by sendtime desc
</select>
分页 MyBatis --------------------编程问答-------------------- 为何使用top后条件查询就不起作用了 --------------------编程问答-------------------- 除 --------------------编程问答-------------------- 你上面代码也没有top ,话说top 的话和检索条件关系。 --------------------编程问答-------------------- 写个易做图 implements Interceptor 吧,很多这样的例子
补充:Java , Java EE