101captain
2022-07-22 27ce47813f711b1ce833a7f8735b5b3fe53176fd
bug修改
7个文件已修改
36 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunitySwitchApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/switchs/SearchCommunityDTO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunitySwitchApi.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunitySwitchApi.java
@@ -27,13 +27,13 @@
    @ApiOperation(value = "查询所有社区", response = StreetAllAppletsVO.class)
    @GetMapping("/list/noToken")
    public R list() {
        return communityService.communitySwitchList(this.getAreaCode());
        return communityService.communitySwitchList(this.getAppId());
    }
    @ApiOperation(value = "根据名字搜索社区", response = CommunitySwitchAllAppletsVO.class)
    @GetMapping("/search/noToken")
    public R search(@RequestParam(value = "name") String name) {
        return communityService.communitySwitchSearchList(name,this.getAreaCode());
        return communityService.communitySwitchSearchList(name,this.getAppId());
    }
    @ApiOperation(value = "根据距离搜索社区", response = CommunitySwitchAllAppletsVO.class)
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/switchs/SearchCommunityDTO.java
@@ -18,4 +18,6 @@
    private Integer distance;
    private String areaCode;
    private String appId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -5540,7 +5540,7 @@
     * @return 社区列表
     */
    @GetMapping("/switch/community/all/list")
    R communitySwitchList(@RequestParam("areaCode") String areaCode);
    R communitySwitchList(@RequestParam("appId") String appId);
    /**
     * 根据名字查询所有社区列表
@@ -5550,7 +5550,7 @@
     * @return 社区列表
     */
    @GetMapping("/switch/community/search/list")
    R communitySwitchSearchList(@RequestParam(value = "name") String name,@RequestParam(value = "areaCode") String areaCode);
    R communitySwitchSearchList(@RequestParam(value = "name") String name,@RequestParam(value = "appId") String appId);
    /**
     * 根据经纬度以及距离搜索附近社区列表
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunitySwitchApi.java
@@ -24,8 +24,8 @@
     * @return 社区列表
     */
    @GetMapping("/community/all/list")
    public R getCommunityAllList(@RequestParam("areaCode") String areaCode) {
        return comActService.getCommunityAllList(areaCode);
    public R getCommunityAllList(@RequestParam("appId") String appId) {
        return comActService.getCommunityAllList(appId);
    }
    /**
@@ -36,8 +36,8 @@
     * @return 社区列表
     */
    @GetMapping("/community/search/list")
    public R communitySwitchSearchList(@RequestParam(value = "name") String name,@RequestParam(value = "areaCode") String areaCode) {
        return comActService.communitySwitchSearchList(name,areaCode);
    public R communitySwitchSearchList(@RequestParam(value = "name") String name,@RequestParam(value = "appId") String appId) {
        return comActService.communitySwitchSearchList(name,appId);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java
@@ -73,8 +73,8 @@
        + "left join com_street as cs on cs.street_id = ca.street_id\n" + "where ca.community_id = ${communityId}")
    ComPopulationActVO getPopulationActById(@Param("communityId") Long communityId);
    @Select("select `name`,street_id from com_street where area_code = #{areaCode}")
    List<StreetAllAppletsVO> getStreetList(String areaCode);
    @Select("select `name`,street_id from com_street where app_id = #{appId}")
    List<StreetAllAppletsVO> getStreetList(String appId);
    @Select("select ca.`name`,ca.street_id,ca.community_id,cs.`name` as streetName from com_act as ca left join com_street as cs on cs.street_id = ca.street_id where ca.state = 0 and ca.street_id = #{streetId}")
    List<CommunitySwitchAllAppletsVO> getCommunityListByStreetId(@Param("streetId") Long streetId);
@@ -82,8 +82,8 @@
    @Select("<script> select ca.`name`,ca.street_id,ca.community_id,cs.`name` as streetName " +
            "from com_act as ca " +
            "left join com_street as cs on cs.street_id = ca.street_id " +
            "where ca.state = 0 and ca.name like concat('%',#{name},'%') <if test='areaCode !=null and areaCode !=&quot;&quot;'> and cs.area_code = #{areaCode} </if> </script> ")
    List<CommunitySwitchAllAppletsVO> getCommunityListByName(@Param("name") String name,@Param("areaCode") String areaCode);
            "where ca.state = 0 and ca.name like concat('%',#{name},'%') <if test='appId !=null and appId !=&quot;&quot;'> and cs.app_id = #{appId} </if> </script> ")
    List<CommunitySwitchAllAppletsVO> getCommunityListByName(@Param("name") String name,@Param("appId") String appId);
    @Select("SELECT   c.community_id,    c.`name`,    c.street_id,    cs.`name` as streetName," +
            "round( ST_Distance_Sphere ( Point ( #{communityDTO.longitude}, #{communityDTO.latitude} ), Point ( c.lng, c.lat ) )/ 1000, 2 ) AS distance  " +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActService.java
@@ -92,7 +92,7 @@
     * 
     * @return 社区列表
     */
    R getCommunityAllList(String areaCode);
    R getCommunityAllList(String appId);
    /**
     * 根据名字查询所有社区列表
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -238,9 +238,9 @@
     * @return 社区列表
     */
    @Override
    public R getCommunityAllList(String areaCode) {
    public R getCommunityAllList(String appId) {
        // 查询街道列表
        List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(areaCode);
        List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(appId);
        streetList.forEach(street -> {
            // 查询街道下社区列表
            List<CommunitySwitchAllAppletsVO> communityList =
@@ -263,8 +263,8 @@
     * @return 社区列表
     */
    @Override
    public R communitySwitchSearchList(String name,String areaCode) {
        return R.ok(this.comActDAO.getCommunityListByName(name,areaCode));
    public R communitySwitchSearchList(String name,String appId) {
        return R.ok(this.comActDAO.getCommunityListByName(name,appId));
    }
    /**