3 changed files with 115 additions and 6 deletions
@ -0,0 +1,101 @@
|
||||
package com.air.applets.controller; |
||||
|
||||
import cn.hutool.core.util.StrUtil; |
||||
import com.air.applets.dto.LandDto; |
||||
import com.air.applets.vo.LandVo; |
||||
import com.air.enums.LandListStatusEnum; |
||||
import com.air.land.dto.LandListedDto; |
||||
import com.air.land.dto.LandListedStatisticsDto; |
||||
import com.air.land.entity.LandListed; |
||||
import com.air.land.service.LandListedService; |
||||
import com.air.land.service.LandToListService; |
||||
import com.air.land.vo.LandListedAppletsVo; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.cinderella.framework.common.core.util.R; |
||||
import com.cinderella.framework.common.data.mybatis.QueryPage; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.time.LocalDate; |
||||
import java.util.List; |
||||
|
||||
|
||||
/** |
||||
* 小程序地图显示。 |
||||
* |
||||
* @author peihao |
||||
* @date 2021-05-18 09:39:59 |
||||
*/ |
||||
@RequestMapping("/applets/map") |
||||
@Api(value = "appletsMap", tags = "小程序地图显示") |
||||
public class AppletsMapController { |
||||
|
||||
@Autowired |
||||
private LandListedService landListedService; |
||||
|
||||
@Autowired |
||||
private LandToListService landToListService; |
||||
|
||||
/** |
||||
* 根据定位经纬度范围行政区数据 |
||||
* |
||||
* @param queryPage 分页对象 |
||||
* @param landVo 查询参数 |
||||
* @return |
||||
*/ |
||||
@ApiOperation(value = "根据定位经纬度范围行政区数据", notes = "根据定位经纬度范围行政区数据") |
||||
@GetMapping("getRegionByLocation") |
||||
public R<Page<LandDto>> getRegionByLocation(QueryPage queryPage, LandVo landVo) { |
||||
List<LandDto> landDtos; |
||||
Page<LandDto> page = queryPage.toPage(); |
||||
if (LandListStatusEnum.TO_BE_LISTED.getCode().equals(landVo.getTransactionStatus())) { |
||||
if (StrUtil.isNotEmpty(landVo.getStartDate()) || StrUtil.isNotEmpty(landVo.getEndDate())) { |
||||
return R.ok(); |
||||
} |
||||
//交易状态为 待挂牌时,查询拟挂牌地块数据
|
||||
landDtos = landToListService.appletsLandToList(page, landVo); |
||||
} else { |
||||
landDtos = landListedService.appletsLandListed(page, landVo); |
||||
} |
||||
return R.ok(page.setRecords(landDtos), "查询成功"); |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in new issue