SQL Group问题

This commit is contained in:
wanggeng 2022-11-23 18:51:44 +08:00
parent a4e04fb19e
commit 1f5b67b4f5
3 changed files with 102 additions and 90 deletions

View File

@ -277,8 +277,6 @@ public class VenuesInfoServiceImpl extends DefaultBaseService implements IVenues
// end
orderKye = orderKye.trim();
Point myPoint = setPoint(params);
//如果传入的定位来自于腾讯地图需要转换否则会导致距离计算出现1公里左右偏差
String selfLocation = params.get("selfLocation") == null ? "" : params.get("selfLocation").toString();
@ -290,8 +288,6 @@ public class VenuesInfoServiceImpl extends DefaultBaseService implements IVenues
myPoint = util.map_tx2bd(myPoint);
}
//按热度查询
if (VENUE_SEARCH_HOT.equals(orderKye)) {
//TODO 访问量功能实现后添加
@ -396,6 +392,7 @@ public class VenuesInfoServiceImpl extends DefaultBaseService implements IVenues
/**
* 计算距离
*
* @param list
*/
private void formatPosition(Point myPoint, List<VenuesInfoDTO> list) {
@ -426,6 +423,7 @@ public class VenuesInfoServiceImpl extends DefaultBaseService implements IVenues
/**
* 距离排序
*
* @param list
*/
private void pointListCompareToAse(List<VenuesInfoDTO> list) {
@ -443,10 +441,12 @@ public class VenuesInfoServiceImpl extends DefaultBaseService implements IVenues
}
private Point setPoint(Map<String, Object> params) {
double longitude = NO_POINT.equals(params.get(VENUE_SEARCH_LONGITUDE).toString()) ?
0 : Double.parseDouble(params.get(VENUE_SEARCH_LONGITUDE).toString());
double latitude = NO_POINT.equals(params.get(VENUE_SEARCH_LATITUDE).toString()) ?
0 : Double.parseDouble(params.get(VENUE_SEARCH_LATITUDE).toString());
Object longitudeObj = params.get(VENUE_SEARCH_LONGITUDE);
Object latitudeObj = params.get(VENUE_SEARCH_LATITUDE);
double longitude = longitudeObj == null || NO_POINT.equals(longitudeObj.toString()) ?
0 : Double.parseDouble(longitudeObj.toString());
double latitude = latitudeObj == null || NO_POINT.equals(latitudeObj.toString()) ?
0 : Double.parseDouble(latitudeObj.toString());
Point Point = new Point();
Point.setX(latitude);
Point.setY(longitude);
@ -456,6 +456,7 @@ public class VenuesInfoServiceImpl extends DefaultBaseService implements IVenues
/**
* 后台-场馆zTree
* 有数据权限校验
*
* @return 返回场馆zTree集合
*/
@Override

View File

@ -482,12 +482,21 @@
t1.is_delete = 0
AND t1.venues_info_id = #{venuesInfoId}
GROUP BY
t1.venues_info_id,
t1.venue_charge,
t1.venue_panorama,
t1.venue_plan,
t1.venue_name,
t1.venue_position,
t1.longitude,
t1.latitude,
t1.venue_telephone,
t1.venue_route,
t1.venue_other_service
t1.venue_position,
t2.dictionary_name,
t1.venue_other_service,
t1.venue_description,
t1.business_hours,
t1.booking_tips
</select>
</mapper>

View File

@ -270,7 +270,9 @@
t1.venues_project_id,
t1.venue_id,
t1.project_category,
t2.data_name,
t1.business_hours,
t1.project_description
t1.project_description,
t3.data_name
</select>
</mapper>