3.2K Star 8.8K Fork 3.6K

GVPJFinal / JFinal

 / 详情

paginate()对order by 后的语句replaceAll("")不友好-解决

待办的
创建于  
2017-12-16 14:42
select a.id,a.top,a.notice,a.elite,a.position,a.longitude,a.latitude,a.transpondNum,a.content,a.userId,a.saveTime,b.name,b.photo,c.content as transpondContent,a.transpondId,d.id as transpondUserId,d.name as transpondName from copying_circle_art as a inner join total_user as b on a.userId = b.id left join copying_circle_art as c on a.transpondId = c.id left join total_user as d on c.userId = d.id where a.longitude > 115.340000 and a.longitude < 117.340000 and a.latitude > 36.550000 and a.latitude < 38.550000 order by ACOS(SIN((37.550000 * 3.1415) / 180 ) * SIN((a.latitude * 3.1415) / 180 ) + COS((37.550000 * 3.1415) / 180 )* COS((a.latitude * 3.1415) / 180 ) * COS((116.340000* 3.1415) / 180 - (a.longitude * 3.1415) / 180 )) * 6380 asc

上面的这个语句用find就可以 使用paginate()只把 order by ACOS(SIN((37.550000匹配为空了

评论 (2)

梦里蓝天 创建了任务

paginate()结果

Sql: select count(*) from copying_circle_art as a inner join total_user as b on a.userId = b.id left join copying_circle_art as c on a.transpondId = c.id left join total_user as d on c.userId = d.id where a.longitude > 115.340000 and a.longitude < 117.340000 and a.latitude > 36.550000 and a.latitude < 38.550000  * 3.1415) / 180 ) * SIN((a.latitude * 3.1415) / 180 ) + COS((37.550000 * 3.1415) / 180 )* COS((a.latitude * 3.1415) / 180 ) * COS((116.340000* 3.1415) / 180 - (a.longitude * 3.1415) / 180 )) * 6380 asc

去除 order by 后面条件的空格可以了

梦里蓝天 更新了任务

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
Java
1
https://gitee.com/jfinal/jfinal.git
git@gitee.com:jfinal/jfinal.git
jfinal
jfinal
JFinal

搜索帮助