diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java index f81e0e1d..79a3822e 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java @@ -196,8 +196,13 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi if(xhpcRateTime!=null){ map.putAll(xhpcRateTime); } + List serviceFacilitiesList =new ArrayList<>(); + if(map.get("serviceFacilities") !=null && map.get("serviceFacilities").toString() !=""){ + String[] split = map.get("serviceFacilities").toString().split(","); + serviceFacilitiesList=Arrays.asList(split); + } //获取标签 - List> label_type = xhpcChargingStationMapper.getCode("label_type",stringList); + List> label_type = xhpcChargingStationMapper.getCode("label_type",serviceFacilitiesList); map.put("serviceFacilities",label_type); //桩(空闲和使用从redis获取) diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml index d0dba82b..db7b95db 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml @@ -173,18 +173,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" name as name, parking_instructions as parkingInstructions, detailed_address as detailedAddress, + service_facilities as serviceFacilities, ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180 ) *SIN((latitude * 3.141593) / 180 ) + COS((#{latitude} * 3.141593) / 180 ) * COS((latitude * 3.141593) / 180 ) * COS((#{longitude} * 3.141593) / 180 - (longitude * 3.141593) / 180 ) ) * 6370.9968,4)AS distance from xhpc_charging_station where del_flag =0 and status =0 + and FIND_IN_SET(#{clientVisible},client_visible)>0 and name like CONCAT('%',#{name},'%') - and service_facilities in - - #{item} + and + + service_facilities like CONCAT('%',#{item},'%') @@ -198,9 +200,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from xhpc_dict_biz where code = #{code} and parent_id > 0 and del_flag = 0 - and dict_biz_id in - - #{item} + and + + dict_biz_id like CONCAT('%',#{item},'%')