jk-GitHub-coder 4 anos atrás
pai
commit
ad7bc313ed

+ 2 - 3
YijiaRestful/src/main/java/com/platform/yijia/controller/StationController.java

@@ -39,7 +39,7 @@ public class StationController {
      */
     @RequestMapping(value = "/getStationInfoList", method = RequestMethod.GET)
     @ResponseBody
-     public String getStationInfoList(@RequestParam String stationLongitude,String stationLatitude,Integer pageNum,Integer pageSize){
+     public String getStationInfoList(@RequestParam String stationLongitude,String stationLatitude,Integer pageNum,Integer pageSize, String appId){
         Gson gson =new Gson();
         //返回结果集
         ResultData resultData=null;
@@ -50,8 +50,7 @@ public class StationController {
                 stationRequest.setStationLongitude(stationLongitude);
                 stationRequest.setPageNum(pageNum);
                 stationRequest.setPageSize(pageSize);
-//                , String appId
-//                stationRequest.setAppId(appId);
+                stationRequest.setAppId(appId);
                 //调用接口 根据坐标筛选距离最近的加油站
                 StationInfoVo stationInfoVo = stationService.stationInfoList(stationRequest);
                  resultData=ResultData.success(stationInfoVo);

+ 3 - 3
YijiaRestful/src/main/java/com/platform/yijia/service/impl/StationServiceImpl.java

@@ -30,9 +30,9 @@ public class StationServiceImpl implements StationService {
             example.or().andStationNameLike(stationRequest.getStationName());
 
         }
-//        if(StringUtils.isNotBlank(stationRequest.getAppId())){
-//            example.or().andAppIdEqualTo(stationRequest.getAppId());
-//        }
+        if(StringUtils.isNotBlank(stationRequest.getAppId())){
+            example.or().andAppIdEqualTo(stationRequest.getAppId());
+        }
         // 数据库查询门店数据
         List<StationInfo> stationInfolist = stationInfoMapper.selectByExample(example);
         // 入参坐标拼接