微信小程序首页列表接口
This commit is contained in:
parent
25bfcdaf10
commit
49203c0879
@ -196,8 +196,13 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
if(xhpcRateTime!=null){
|
if(xhpcRateTime!=null){
|
||||||
map.putAll(xhpcRateTime);
|
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);
|
map.put("serviceFacilities",label_type);
|
||||||
//桩(空闲和使用从redis获取)
|
//桩(空闲和使用从redis获取)
|
||||||
|
|
||||||
|
|||||||
@ -173,18 +173,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
name as name,
|
name as name,
|
||||||
parking_instructions as parkingInstructions,
|
parking_instructions as parkingInstructions,
|
||||||
detailed_address as detailedAddress,
|
detailed_address as detailedAddress,
|
||||||
|
service_facilities as serviceFacilities,
|
||||||
ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180 ) *SIN((latitude * 3.141593) / 180 ) +
|
ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180 ) *SIN((latitude * 3.141593) / 180 ) +
|
||||||
COS((#{latitude} * 3.141593) / 180 ) * COS((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
|
COS((#{longitude} * 3.141593) / 180 - (longitude * 3.141593) / 180 ) ) * 6370.9968,4)AS distance
|
||||||
from xhpc_charging_station
|
from xhpc_charging_station
|
||||||
where del_flag =0 and status =0
|
where del_flag =0 and status =0
|
||||||
|
and FIND_IN_SET(#{clientVisible},client_visible)>0
|
||||||
<if test="name !=null and name !=''">
|
<if test="name !=null and name !=''">
|
||||||
and name like CONCAT('%',#{name},'%')
|
and name like CONCAT('%',#{name},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="serviceFacilities !=null and serviceFacilities.size()>0 ">
|
<if test="serviceFacilities !=null and serviceFacilities.size()>0 ">
|
||||||
and service_facilities in
|
and
|
||||||
<foreach collection="serviceFacilities" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="serviceFacilities" item="item" index="index" open="(" close=")" separator="or">
|
||||||
#{item}
|
service_facilities like CONCAT('%',#{item},'%')
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="code !=null and code !=''">
|
<if test="code !=null and code !=''">
|
||||||
@ -198,9 +200,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from xhpc_dict_biz
|
from xhpc_dict_biz
|
||||||
where code = #{code} and parent_id > 0 and del_flag = 0
|
where code = #{code} and parent_id > 0 and del_flag = 0
|
||||||
<if test="serviceFacilities !=null and serviceFacilities.size()>0 ">
|
<if test="serviceFacilities !=null and serviceFacilities.size()>0 ">
|
||||||
and dict_biz_id in
|
and
|
||||||
<foreach collection="serviceFacilities" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="serviceFacilities" item="item" index="index" open="(" close=")" separator="or">
|
||||||
#{item}
|
dict_biz_id like CONCAT('%',#{item},'%')
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user