首先这是 数据库查询,能正常
在xml文件 查询的时候 数据为空
<select id="statist" resultType="org.jeecg.modules.member.bean.MemberOrderStatisticsBean">
SELECT t.* FROM
(
SELECT m.pin,`name`,m.shop_type shopType, phone,extend_memo extendMemo ,
grade,SUM(actual_pay)scmMoney, count(DISTINCT order_code)scmCounts,seller_addr,
m.first_shopping_time firstShoppingTime, m.lately_buy_date latelyBuyDate
FROM member m,sc_order so
WHERE so.pin = m.pin AND refund_amount is NULL
<if test=" bean.phone != '' and bean.phone !=null ">
AND phone like CONCAT('%', #{bean.phone}, '%')
</if>
GROUP BY m.pin
) t WHERE 1=1
<if test=" bean.scmMoney_begin != '' and bean.scmMoney_begin !=null and
bean.scmMoney_end != '' and bean.scmMoney_end !=null ">
AND scmMoney BETWEEN #{bean.scmMoney_begin} AND #{bean.scmMoney_end}
</if>
ORDER BY scmMoney DESC
<if test=" bean.top_begin != 0 and bean.top_end != 0 ">
limit ${bean.top_begin -1 } , ${bean.top_end - (bean.top_begin -1)}
</if>
</select>
修改后 :
把 limit 查询 放到虚表的里面即可