小程序查询接口

This commit is contained in:
yuyang 2021-07-28 10:28:02 +08:00
parent fa8fd1965e
commit 2c10be71ba
5 changed files with 23 additions and 7 deletions

View File

@ -47,4 +47,12 @@ public interface XhpcChargingPileMapper {
* @return 电站
*/
XhpcChargingPile selectXhpcChargingPileById(Long chargingPileId);
/**
* 编辑
*
* @param xhpcChargingPile 终端
* @return 结果
*/
int updaeXhpcChargingPile(XhpcChargingPile xhpcChargingPile);
}

View File

@ -456,7 +456,10 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
//获取基本信息
Map<String, Object> map = xhpcChargingStationMapper.getWXXhpcChargingStationMessage(chargingStationId,longitude,latitude);
//桩空闲数量从redis获取
//空闲和使用从redis获取
map.put("free",10);
map.put("common",12);
//服务设施
List<String> serviceFacilitiesList =new ArrayList<>();
@ -468,11 +471,11 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
map.put("serviceFacilitiesList",service_facilities);
//周边设施
List<String> peripheryFacilities =new ArrayList<>();
if(map.get("peripheryFacilities") !=null && map.get("peripheryFacilities").toString() !=""){
String[] split = map.get("peripheryFacilities").toString().split(",");
peripheryFacilities=Arrays.asList(split);
}
// List<String> peripheryFacilities =new ArrayList<>();
// if(map.get("peripheryFacilities") !=null && map.get("peripheryFacilities").toString() !=""){
// String[] split = map.get("peripheryFacilities").toString().split(",");
// peripheryFacilities=Arrays.asList(split);
// }
List<Map<String, Object>> charging_periphery_facilities = xhpcChargingStationMapper.getCode("charging_periphery_facilities",peripheryFacilities);
map.put("peripheryFacilities",charging_periphery_facilities);

View File

@ -246,4 +246,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectXhpcChargingPileVo"/>
where charging_pile_id = #{chargingPileId}
</select>
<update id="updaeXhpcChargingPile" >
</update>
</mapper>

View File

@ -256,6 +256,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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 charging_station_id=#{chargingStationId} and del_flag=0 and status=0
</select>

View File

@ -22,7 +22,7 @@ public class XhpcDictBizController extends BaseController {
@Autowired
private IXhpcDictBizService xhpcDictBizService;
/**
* 根据code获取数据
* 根据code获取数据(通用接口)
*/
//@PreAuthorize(hasPermi = "system:station:remove")
//@Log(title = "电站", businessType = BusinessType.DELETE)