MyBatis-Spring-Boot
MyBatis-Spring-Boot copied to clipboard
通用分页有问题
<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>
生成的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)
专门看了看测试,没有发现问题。
现在唯一可能的问题就是你的数据是不是不够10条?并且开启了分页合理化?
你好,这是配置,然后数据这块确实是不够10条。是不是如果数据不够10条这边分页就不会有作用?
会有作用,之所以查到这个结果是因为你的配置。
把 resonable
配置去掉或者设置为 false
,具体原因你看看文档。
好的,我试试,谢谢