MyBatis-Spring-Boot icon indicating copy to clipboard operation
MyBatis-Spring-Boot copied to clipboard

通用分页有问题

Open liushunqiu opened this issue 7 years ago • 4 comments

<com.github.pagehelper.pagehelper-spring-boot-starter>1.2.3</com.github.pagehelper.pagehelper-spring-boot-starter> <tk.mybatis.mapper-spring-boot-starter>1.1.5</tk.mybatis.mapper-spring-boot-starter>

image 生成的sql不对~不知道还需要设置那里? SELECT id,create_time,status,system_order_id,actual_payment_amount,sub_order_number,sub_order_status,payment_amount,product_count,payment_method,buyer_user_id,seller_user_id,shop_title,seller_appkey,buyer_appkey,delivery_method,delivery_method_money,apply_account,invoice,invoice_type,invoice_title_type,personal_name,enterprise_name,enterprise_ein,invoice_content,buyer_message,payment_day,payment_money,payment_status,logistics_number FROM system_sub_order WHERE ( buyer_user_id = ? and sub_order_status = ? ) order by id desc LIMIT ?

56(Integer), 05(String), 10(Integer)

liushunqiu avatar Nov 21 '17 09:11 liushunqiu

专门看了看测试,没有发现问题。

现在唯一可能的问题就是你的数据是不是不够10条?并且开启了分页合理化?

abel533 avatar Nov 22 '17 12:11 abel533

_20171123091121

你好,这是配置,然后数据这块确实是不够10条。是不是如果数据不够10条这边分页就不会有作用?

liushunqiu avatar Nov 23 '17 01:11 liushunqiu

会有作用,之所以查到这个结果是因为你的配置。

resonable 配置去掉或者设置为 false,具体原因你看看文档。

abel533 avatar Nov 23 '17 13:11 abel533

好的,我试试,谢谢

liushunqiu avatar Nov 23 '17 13:11 liushunqiu