Browse Source

1

release/v1.0.0
yueminglinxia 4 years ago
parent
commit
4c97bbf0fa
  1. 14
      air/src/main/java/com/air/housing/controller/BlocksController.java
  2. 12
      air/src/main/java/com/air/housing/controller/HousesController.java
  3. 17
      air/src/main/java/com/air/housing/controller/HousingEstatesController.java
  4. 20
      air/src/main/java/com/air/housing/dto/BlockListDto.java
  5. 2
      air/src/main/java/com/air/housing/entity/Blocks.java
  6. 30
      air/src/main/java/com/air/housing/mapper/BlocksMapper.java
  7. 22
      air/src/main/java/com/air/housing/service/BlocksService.java
  8. 10
      air/src/main/java/com/air/housing/service/HousingEstatesService.java
  9. 29
      air/src/main/java/com/air/housing/service/impl/BlocksServiceImpl.java
  10. 31
      air/src/main/java/com/air/housing/service/impl/HousingEstatesServiceImpl.java
  11. 23
      air/src/main/java/com/air/housing/vo/HousingEstatesDetail.java
  12. 2
      air/src/main/java/com/air/macro/service/impl/MacroDataServiceImpl.java
  13. 14
      air/src/main/java/com/air/mapper/BlocksMapper.java
  14. 14
      air/src/main/java/com/air/service/BlocksService.java
  15. 18
      air/src/main/java/com/air/service/impl/BlocksServiceImpl.java
  16. 6
      air/src/main/resources/mapper/BlocksMapper.xml

14
air/src/main/java/com/air/controller/BlocksController.java → air/src/main/java/com/air/housing/controller/BlocksController.java

@ -1,7 +1,8 @@
package com.air.controller;
package com.air.housing.controller;
import com.air.entity.Blocks;
import com.air.service.BlocksService;
import com.air.housing.dto.BlockListDto;
import com.air.housing.entity.Blocks;
import com.air.housing.service.BlocksService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cinderella.framework.common.core.util.R;
@ -39,7 +40,11 @@ public class BlocksController {
return R.ok(blocksService.page(page, Wrappers.query(blocks)));
}
@ApiOperation(value = "分页查询", notes = "分页查询")
@GetMapping("/page")
public R getBlocksPageByHousingEstatesId(Page page, BlockListDto blocks) {
return R.ok(blocksService.getBlocksPageByHousingEstatesId(page,blocks));
}
/**
* 通过id查询楼栋信息
*
@ -52,6 +57,7 @@ public class BlocksController {
return R.ok(blocksService.getById(blockId));
}
/**
* 新增楼栋信息
*

12
air/src/main/java/com/air/housing/controller/HousesController.java

@ -2,6 +2,7 @@ package com.air.housing.controller;
import com.air.housing.entity.Houses;
import com.air.housing.service.HousesService;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cinderella.framework.common.core.util.R;
@ -52,6 +53,17 @@ public class HousesController {
return R.ok(housesService.getById(houseId));
}
/**
* 通过楼栋id查询房屋信息
*
* @param blockId
* @return R
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{blockId}")
public R getByBlockId(Page page,@PathVariable("blockId") Long blockId) {
return R.ok(housesService.page(page,Wrappers.<Houses>lambdaQuery().eq(Houses::getBlockId,blockId)));
}
/**
* 新增房屋信息
*

17
air/src/main/java/com/air/housing/controller/HousingEstatesController.java

@ -1,10 +1,17 @@
package com.air.housing.controller;
import cn.hutool.core.util.StrUtil;
import com.air.housing.dto.HousingDefine;
import com.air.housing.entity.Format;
import com.air.housing.entity.HousingEstates;
import com.air.housing.service.FormatService;
import com.air.housing.service.HousingEstatesService;
import com.air.housing.vo.HousingEstatesDetail;
import com.air.housing.vo.HousingEstatesName;
import com.air.land.entity.LandListed;
import com.air.land.service.LandListedService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.cinderella.framework.common.core.util.R;
import com.cinderella.framework.common.data.mybatis.QueryPage;
@ -29,6 +36,11 @@ public class HousingEstatesController {
private final HousingEstatesService housingEstatesService;
private final FormatService formatService;
private final LandListedService landListedService;
/**
* 分页查询
*
@ -63,8 +75,9 @@ public class HousingEstatesController {
*/
@ApiOperation(value = "通过id查询", notes = "通过id查询")
@GetMapping("/{housingEstatesId}")
public R getById(@PathVariable("housingEstatesId") Long housingEstatesId) {
return R.ok(housingEstatesService.getById(housingEstatesId));
public R getById(@PathVariable("housingEstatesId") Long housingEstatesId,Long blockId) {
HousingEstatesDetail housingEstates = housingEstatesService.getHousingEstatesDetail(housingEstatesId,blockId);
return R.ok(housingEstates);
}
/**

20
air/src/main/java/com/air/housing/dto/BlockListDto.java

@ -0,0 +1,20 @@
package com.air.housing.dto;
import io.swagger.annotations.ApiModelProperty;
/**
* @ClassName BlockListDto
* @Author Lenovo 102306
* @Date 2021/6/9 10:40
*/
public class BlockListDto {
@ApiModelProperty(value = "楼盘id")
Long housingEstatesId;
@ApiModelProperty(value = "大业态")
String largeFormat;
@ApiModelProperty(value = "小业态")
String format;
}

2
air/src/main/java/com/air/entity/Blocks.java → air/src/main/java/com/air/housing/entity/Blocks.java

@ -1,4 +1,4 @@
package com.air.entity;
package com.air.housing.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

30
air/src/main/java/com/air/housing/mapper/BlocksMapper.java

@ -0,0 +1,30 @@
package com.air.housing.mapper;
import com.air.housing.dto.BlockListDto;
import com.air.housing.entity.Blocks;
import com.air.housing.vo.HousingEstatesName;
import com.air.sysMessage.entity.SysMessage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import java.util.List;
/**
* 楼栋信息
*
* @author peihao
* @date 2021-05-18 09:39:45
*/
public interface BlocksMapper extends BaseMapper<Blocks> {
/**
* 根据楼盘id,大业态小业态筛选楼栋信息
* @param page
* @param blockListDto
* @return
*/
Page<Blocks> getBlocksPageByHousingEstatesId(Page page, @Param("Blocks")BlockListDto blockListDto);
}

22
air/src/main/java/com/air/housing/service/BlocksService.java

@ -0,0 +1,22 @@
package com.air.housing.service;
import com.air.housing.dto.BlockListDto;
import com.air.housing.entity.Blocks;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 楼栋信息
*
* @author peihao
* @date 2021-05-18 09:39:45
*/
public interface BlocksService extends IService<Blocks> {
/**
* 根据楼盘id,大业态小业态查询楼栋分页信息
* @param blockListDto
* @return
*/
Page<Blocks> getBlocksPageByHousingEstatesId(Page page,BlockListDto blockListDto);
}

10
air/src/main/java/com/air/housing/service/HousingEstatesService.java

@ -2,10 +2,10 @@ package com.air.housing.service;
import com.air.housing.dto.HousingDefine;
import com.air.housing.entity.HousingEstates;
import com.air.housing.vo.HousingEstatesDetail;
import com.air.housing.vo.HousingEstatesName;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cinderella.framework.common.data.mybatis.QueryPage;
/**
* 楼盘小区
@ -32,4 +32,12 @@ public interface HousingEstatesService extends IService<HousingEstates> {
* @return true
*/
boolean createFromOrigin(HousingDefine housingDefine);
/**
* 根据楼盘id查询楼盘信息和相关的地块信息如果楼栋个id不为空再查询业态信息
* @param estateId
* @param blockId
* @return
*/
HousingEstatesDetail getHousingEstatesDetail(Long estateId,Long blockId);
}

29
air/src/main/java/com/air/housing/service/impl/BlocksServiceImpl.java

@ -0,0 +1,29 @@
package com.air.housing.service.impl;
import com.air.housing.dto.BlockListDto;
import com.air.housing.entity.Blocks;
import com.air.housing.mapper.BlocksMapper;
import com.air.housing.service.BlocksService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 楼栋信息
*
* @author peihao
* @date 2021-05-18 09:39:45
*/
@Service
public class BlocksServiceImpl extends ServiceImpl<BlocksMapper, Blocks> implements BlocksService {
@Resource
private BlocksMapper blocksMapper;
@Override
public Page<Blocks> getBlocksPageByHousingEstatesId(Page page,BlockListDto blockListDto) {
return null;
}
}

31
air/src/main/java/com/air/housing/service/impl/HousingEstatesServiceImpl.java

@ -1,17 +1,23 @@
package com.air.housing.service.impl;
import com.air.entity.Blocks;
import cn.hutool.core.util.ObjectUtil;
import com.air.housing.entity.Blocks;
import com.air.housing.entity.Format;
import com.air.housing.entity.Houses;
import com.air.housing.dto.HousingDefine;
import com.air.housing.entity.HousingEstates;
import com.air.housing.mapper.HousingEstatesMapper;
import com.air.housing.service.FormatService;
import com.air.housing.service.HousingEstatesService;
import com.air.housing.vo.HousingEstatesDetail;
import com.air.housing.vo.HousingEstatesName;
import com.air.land.entity.LandListed;
import com.air.land.service.LandListedService;
import com.air.origin.entity.BlocksOrigin;
import com.air.origin.entity.HousesOrigin;
import com.air.origin.service.BlocksOriginService;
import com.air.origin.service.HousesOriginService;
import com.air.service.BlocksService;
import com.air.housing.service.BlocksService;
import com.air.housing.service.HousesService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -43,7 +49,12 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper,
private HousesOriginService housesOriginService;
@Autowired
private HousesService housesService;
@Autowired
private HousingEstatesMapper housingEstatesMapper;
@Autowired
private LandListedService landListedService;
@Autowired
private FormatService formatService;
@Override
public IPage<HousingEstatesName> getHousingEstatesNamePage(IPage<HousingEstatesName> page, String name) {
@ -76,6 +87,20 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper,
return true;
}
@Override
public HousingEstatesDetail getHousingEstatesDetail(Long HousingEstateId, Long blockId) {
HousingEstates housingEstates = housingEstatesMapper.selectById(HousingEstateId);
LandListed landListed = landListedService.getOne(Wrappers.<LandListed>lambdaQuery().eq(LandListed::getAnnoId,housingEstates.getAnnoId()));
HousingEstatesDetail detail = new HousingEstatesDetail();
detail.setHousingEstates(housingEstates);
detail.setLandListed(landListed);
if(ObjectUtil.isNotNull(blockId)){
Format format = formatService.getOne(Wrappers.<Format>lambdaQuery().eq(Format::getHousingEstateId,HousingEstateId));
detail.setFormat(format);
}
return detail;
}
private void copyBlocksOriginToBlocks(BlocksOrigin blocksOrigin, HousingDefine housingDefine) {
Blocks blocks = new Blocks();
blocks.setHousingEstatesId(housingDefine.getHousingEstatesId());

23
air/src/main/java/com/air/housing/vo/HousingEstatesDetail.java

@ -0,0 +1,23 @@
package com.air.housing.vo;
import com.air.housing.entity.Format;
import com.air.housing.entity.HousingEstates;
import com.air.land.entity.LandListed;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @ClassName HousingEstatesDetail
* @Author Lenovo 102306
* @Date 2021/6/9 9:44
*/
@Data
@EqualsAndHashCode
public class HousingEstatesDetail {
HousingEstates housingEstates;
Format format;
LandListed landListed;
}

2
air/src/main/java/com/air/macro/service/impl/MacroDataServiceImpl.java

@ -31,7 +31,7 @@ public class MacroDataServiceImpl extends ServiceImpl<MacroDataMapper, MacroData
@Override
public Page getMacroDataPage(Page page, MacroData macroData) {
Page<MacroData> p = macroDataMapper.selectPage(page,Wrappers.<MacroData>lambdaQuery().eq(MacroData::getStatusCd, CommonStatusEnum.SYS_MESSAGE_STATUS_1000.getCode()));
Page p = macroDataMapper.selectPage(page,Wrappers.<MacroData>lambdaQuery().eq(MacroData::getStatusCd, CommonStatusEnum.SYS_MESSAGE_STATUS_1000.getCode()));
return p;
}

14
air/src/main/java/com/air/mapper/BlocksMapper.java

@ -1,14 +0,0 @@
package com.air.mapper;
import com.air.entity.Blocks;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 楼栋信息
*
* @author peihao
* @date 2021-05-18 09:39:45
*/
public interface BlocksMapper extends BaseMapper<Blocks> {
}

14
air/src/main/java/com/air/service/BlocksService.java

@ -1,14 +0,0 @@
package com.air.service;
import com.air.entity.Blocks;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 楼栋信息
*
* @author peihao
* @date 2021-05-18 09:39:45
*/
public interface BlocksService extends IService<Blocks> {
}

18
air/src/main/java/com/air/service/impl/BlocksServiceImpl.java

@ -1,18 +0,0 @@
package com.air.service.impl;
import com.air.entity.Blocks;
import com.air.mapper.BlocksMapper;
import com.air.service.BlocksService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* 楼栋信息
*
* @author peihao
* @date 2021-05-18 09:39:45
*/
@Service
public class BlocksServiceImpl extends ServiceImpl<BlocksMapper, Blocks> implements BlocksService {
}

6
air/src/main/resources/mapper/BlocksMapper.xml

@ -2,6 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.air.mapper.BlocksMapper">
<mapper namespace="com.air.housing.mapper.BlocksMapper">
<select id="getBlocksPageByHousingEstatesId" parameterType="com.air.housing.dto.BlockListDto" resultType="com.air.housing.entity.Blocks">
select
</select>
</mapper>

Loading…
Cancel
Save