puhanshu
2021-12-03 3d029baf894daffa450f53ac476f60ff0e635dc4
房屋租赁修改
3个文件已修改
21 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseRegisterDao.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseRegisterServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseRegisterMapper.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/RentingHourseRegisterDao.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.rentingHouses.NearbyDTO;
import com.panzhihua.common.model.dtos.community.rentingHouses.PageRentingHouseRegisterDTO;
import com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO;
import org.apache.ibatis.annotations.Mapper;
@@ -34,12 +35,11 @@
     * @param maxX
     * @param minY
     * @param maxY
     * @param keyword
     * @param communityId
     * @param nearbyDTO
     * @return
     */
    List<RentingHouseRegisterVO> nearby(@Param("minX") Double minX, @Param("maxX") Double maxX, @Param("minY") Double minY,
                                        @Param("maxY") Double maxY, @Param("keyword") String keyword, @Param("communityId") Long communityId);
                                        @Param("maxY") Double maxY, @Param("nearbyDTO") NearbyDTO nearbyDTO);
    /**
     * 分页获取房源信息
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/RentingHourseRegisterServiceImpl.java
@@ -427,7 +427,7 @@
    public R nearby(NearbyDTO nearbyDTO) {
        Rectangle rectangle =new NearbyUtil().getRectangle(nearbyDTO.getDistance(), Double.parseDouble(nearbyDTO.getLongitude()), Double.parseDouble(nearbyDTO.getLatitude()));
        return R.ok(this.baseMapper.nearby(rectangle.getMinX(),rectangle.getMaxX(),
                rectangle.getMinY(),rectangle.getMaxY(),nearbyDTO.getKeyword(), nearbyDTO.getCommunityId()));
                rectangle.getMinY(),rectangle.getMaxY(), nearbyDTO));
    }
    @Override
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseRegisterMapper.xml
@@ -101,18 +101,19 @@
    <select id="nearby" resultType="com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO">
        select t.id,title, brn, construct_area, floor, orientation, decoration, label, address, monthly_rent_money,
               `status`, detail_status, auth_status,t1.url
               `status`, detail_status, auth_status,t1.url,
               (POWER(MOD(ABS(longitude - #{nearbyDTO.longitude}),360),2) + POWER(ABS(latitude - #{nearbyDTO.latitude}),2)) AS distance
        from   renting_hourse_register t
        LEFT JOIN (SELECT * FROM renting_hourse_file WHERE classification = 1 AND `type` = 1) t1 ON t.id = t1.ref_id
        WHERE t.community_id = #{communityId} and t.status=2 and t.detail_status=3
          <if test="keyword !=null and keyword!=''">
        WHERE t.community_id = #{nearbyDTO.communityId} and t.status=2 and t.detail_status=3
          <if test="nearbyDTO.keyword !=null and nearbyDTO.keyword!=''">
              AND (
              village_name LIKE CONCAT('%', #{keyword}, '%')
              OR address LIKE CONCAT('%', #{keyword}, '%')
              village_name LIKE CONCAT('%', #{nearbyDTO.keyword}, '%')
              OR address LIKE CONCAT('%', #{nearbyDTO.keyword}, '%')
              )
          </if>
          and (longitude BETWEEN ${minX} AND ${maxX})
          and (latitude BETWEEN ${minY} AND ${maxY}) group by t.id
          and (latitude BETWEEN ${minY} AND ${maxY}) group by t.id order by distance ASC
    </select>
    <select id="pageRentingHouseApplet"