lxw
2023-07-18 51a94a891c4e67be7dea329b62fb44acb9eef4f2
查询所有的站点修改
4个文件已修改
18 ■■■■ 已修改文件
src/main/java/com/whyc/controller/StationInfController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/StationInfMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/StationInfService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/StationInfMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/StationInfController.java
@@ -24,8 +24,10 @@
    public Response searchStationAll(@RequestParam int pageCurr, @RequestParam int pageSize
            , @RequestParam(required = false) String stationName1
            , @RequestParam(required = false) String stationName2
            , @RequestParam(required = false) String stationName5) {
        return service.searchStationAll(pageCurr, pageSize, stationName1, stationName2, stationName5);
            , @RequestParam(required = false) String stationName5
            , @RequestParam(required = false) String nodeStation
            , @RequestParam(required = false) String stationType) {
        return service.searchStationAll(pageCurr, pageSize, stationName1, stationName2, stationName5, nodeStation, stationType);
    }
    @ApiOperation(value = "添加站点")
src/main/java/com/whyc/mapper/StationInfMapper.java
@@ -29,7 +29,7 @@
    //穿梭框查询所有的站点
    List<StationInf> searchShuttle(long uId);
    List<StationInf> searchStationAll(String stationName1, String stationName2, String stationName5, String uId);
    List<StationInf> searchStationAll(String stationName1, String stationName2, String stationName5, String nodeStation, String stationType, String uId);
    //站点信息
    List<StationInf> getSateAnalysis(int userId);
src/main/java/com/whyc/service/StationInfService.java
@@ -212,7 +212,7 @@
    }
    //查询所有的站点
    public Response searchStationAll(int pageCurr, int pageSize, String stationName1, String stationName2, String stationName5) {
    public Response searchStationAll(int pageCurr, int pageSize, String stationName1, String stationName2, String stationName5, String nodeStation, String stationType) {
        PageHelper.startPage(pageCurr, pageSize);
       /* QueryWrapper wrapper = new QueryWrapper();
        if (!(stationName1 == null || stationName1.isEmpty())) {
@@ -226,7 +226,7 @@
        }
        List<StationInf> list = mapper.selectList(wrapper);*/
        String uId = ActionUtil.getUser().getUId().toString();
        List<StationInf> list = mapper.searchStationAll(stationName1, stationName2, stationName5, uId);
        List<StationInf> list = mapper.searchStationAll(stationName1, stationName2, stationName5, nodeStation, stationType, uId);
        PageInfo pageInfo = new PageInfo(list);
        return new Response().setII(1, list.size() > 0, pageInfo, "查询站点");
    }
src/main/resources/mapper/StationInfMapper.xml
@@ -231,6 +231,12 @@
            <if test="stationName5!=null&amp;&amp;stationName5!=''">
                and stationName5=#{stationName5}
            </if>
            <if test="stationType!=null&amp;&amp;stationType!=''">
                and stationType=#{stationType}
            </if>
            <if test="nodeStation!=null&amp;&amp;nodeStation!=''">
                and nodeStation=#{nodeStation}
            </if>
            and stationId in (
            select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId
            from db_user.tb_user_battgroup_baojigroup_battgroup