分页方法好像不支持 ..... order by case when .... 这样的写法.数据库是可以正常执行
order by otr.urgeRemarkFlag,CASE WHEN otr.urgeRemarkFlag=0 THEN minuteNum ELSE minuteNum2 END desc,otr.orderIdx
错误:
com.jfinal.plugin.activerecord.ActiveRecordException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHEN otr.urgeRemarkFlag=0 THEN minuteNum ELSE minuteNum2 END desc,otr.orderIdx ' at line 19
at com.jfinal.plugin.activerecord.DbPro.doPaginate(DbPro.java:566)
at com.jfinal.plugin.activerecord.DbPro.paginate(DbPro.java:1361)
at com.jfinal.plugin.activerecord.Db.paginate(Db.java:725)
at org.flmall.member.service.WhatsAppService.paginateOrder(WhatsAppService.java:1193)
分享内容在: https://jfinal.com/share/2533
或者使用手册里面介绍的 https://jfinal.com/doc/5-6
第 "5、常见问题解决" 内容有介绍如何处理