微信小程序首页列表接口
This commit is contained in:
parent
25bfcdaf10
commit
49203c0879
@ -196,8 +196,13 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
if(xhpcRateTime!=null){
|
||||
map.putAll(xhpcRateTime);
|
||||
}
|
||||
List<String> serviceFacilitiesList =new ArrayList<>();
|
||||
if(map.get("serviceFacilities") !=null && map.get("serviceFacilities").toString() !=""){
|
||||
String[] split = map.get("serviceFacilities").toString().split(",");
|
||||
serviceFacilitiesList=Arrays.asList(split);
|
||||
}
|
||||
//获取标签
|
||||
List<Map<String, Object>> label_type = xhpcChargingStationMapper.getCode("label_type",stringList);
|
||||
List<Map<String, Object>> label_type = xhpcChargingStationMapper.getCode("label_type",serviceFacilitiesList);
|
||||
map.put("serviceFacilities",label_type);
|
||||
//桩(空闲和使用从redis获取)
|
||||
|
||||
|
||||
@ -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
|
||||
<if test="name !=null and name !=''">
|
||||
and name like CONCAT('%',#{name},'%')
|
||||
</if>
|
||||
<if test="serviceFacilities !=null and serviceFacilities.size()>0 ">
|
||||
and service_facilities in
|
||||
<foreach collection="serviceFacilities" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
and
|
||||
<foreach collection="serviceFacilities" item="item" index="index" open="(" close=")" separator="or">
|
||||
service_facilities like CONCAT('%',#{item},'%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="code !=null and code !=''">
|
||||
@ -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
|
||||
<if test="serviceFacilities !=null and serviceFacilities.size()>0 ">
|
||||
and dict_biz_id in
|
||||
<foreach collection="serviceFacilities" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
and
|
||||
<foreach collection="serviceFacilities" item="item" index="index" open="(" close=")" separator="or">
|
||||
dict_biz_id like CONCAT('%',#{item},'%')
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user