diff --git a/air/src/main/java/com/air/enums/BlocksOriginStatusEnum.java b/air/src/main/java/com/air/enums/BlocksOriginStatusEnum.java new file mode 100644 index 0000000..c5e147f --- /dev/null +++ b/air/src/main/java/com/air/enums/BlocksOriginStatusEnum.java @@ -0,0 +1,30 @@ +package com.air.enums; + +import lombok.Getter; + +/** + * 楼栋信息爬虫数据状态 + * + * @author peihao + * @date 2021-05-20 + **/ +@Getter +public enum BlocksOriginStatusEnum { + /** + * 待处理 + */ + READY_TO_HANDLE("0","待处理"), + /** + * 已处理 + */ + HANDLED("1","已处理"); + + private final String code; + private final String name; + + BlocksOriginStatusEnum(String code, String name) { + this.code = code; + this.name = name; + } + +} diff --git a/air/src/main/java/com/air/housing/entity/Format.java b/air/src/main/java/com/air/housing/entity/Format.java index aca671c..713d1cf 100644 --- a/air/src/main/java/com/air/housing/entity/Format.java +++ b/air/src/main/java/com/air/housing/entity/Format.java @@ -1,5 +1,6 @@ package com.air.housing.entity; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; @@ -7,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; + import java.math.BigDecimal; import java.io.Serializable; import java.time.LocalDateTime; @@ -18,63 +20,64 @@ import java.time.LocalDateTime; * @date 2021-06-09 09:13:16 */ @Data -@TableName("format") +@TableName("`format`") @EqualsAndHashCode(callSuper = true) @ApiModel(value = "业态信息") public class Format extends Model { -private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @TableId - @ApiModelProperty(value="主键,自增") + @TableId + @ApiModelProperty(value = "主键,自增") private Long formatId; - @ApiModelProperty(value="楼盘id") + @ApiModelProperty(value = "楼盘id") private Long housingEstateId; - @ApiModelProperty(value="物业类型") + @ApiModelProperty(value = "物业类型") private String propertyType; - @ApiModelProperty(value="大业态") + @ApiModelProperty(value = "大业态") private String largeFormat; - @ApiModelProperty(value="业态") + @ApiModelProperty(value = "业态") + @TableField(value = "`format`") private String format; - @ApiModelProperty(value="拟售总价") + @ApiModelProperty(value = "拟售总价") private BigDecimal preTotalPrice; - @ApiModelProperty(value="装修标准(字典标识)") + @ApiModelProperty(value = "装修标准(字典标识)") private String decorationStandard; - @ApiModelProperty(value="业态体量") + @ApiModelProperty(value = "业态体量") private BigDecimal formatSize; - @ApiModelProperty(value="业态首推时间") + @ApiModelProperty(value = "业态首推时间") private LocalDateTime firstPushDate; - @ApiModelProperty(value="供应套数") + @ApiModelProperty(value = "供应套数") private Integer supplyCount; - @ApiModelProperty(value="供应面积") + @ApiModelProperty(value = "供应面积") private BigDecimal supplyArea; - @ApiModelProperty(value="成交套数") + @ApiModelProperty(value = "成交套数") private Integer dealtCount; - @ApiModelProperty(value="成交面积") + @ApiModelProperty(value = "成交面积") private BigDecimal dealtArea; - @ApiModelProperty(value="狭义库存") + @ApiModelProperty(value = "狭义库存") private BigDecimal narrowSenseStock; - @ApiModelProperty(value="未推库存") + @ApiModelProperty(value = "未推库存") private BigDecimal unpushedStock; - @ApiModelProperty(value="广义库存") + @ApiModelProperty(value = "广义库存") private BigDecimal broadSenseStock; - @ApiModelProperty(value="最近6月月均成交量") + @ApiModelProperty(value = "最近6月月均成交量") private Integer lastSixMonDealtCount; - @ApiModelProperty(value="狭义去化周期") + @ApiModelProperty(value = "狭义去化周期") private Integer narrowSenseDec; - @ApiModelProperty(value="广义去化周期") + @ApiModelProperty(value = "广义去化周期") private Integer broadSenseDec; - @ApiModelProperty(value="状态") + @ApiModelProperty(value = "状态") private String statusCd; - @ApiModelProperty(value="状态时间") + @ApiModelProperty(value = "状态时间") private LocalDateTime statusDate; - @ApiModelProperty(value="创建人") + @ApiModelProperty(value = "创建人") private String createUserId; - @ApiModelProperty(value="创建时间") + @ApiModelProperty(value = "创建时间") private LocalDateTime createDate; - @ApiModelProperty(value="修改人") + @ApiModelProperty(value = "修改人") private String updateUserId; - @ApiModelProperty(value="修改时间") + @ApiModelProperty(value = "修改时间") private LocalDateTime updateDate; - @ApiModelProperty(value="备注") + @ApiModelProperty(value = "备注") private String remark; - } +} diff --git a/air/src/main/java/com/air/housing/entity/HousingEstates.java b/air/src/main/java/com/air/housing/entity/HousingEstates.java index 9138e4d..5a029a7 100644 --- a/air/src/main/java/com/air/housing/entity/HousingEstates.java +++ b/air/src/main/java/com/air/housing/entity/HousingEstates.java @@ -1,5 +1,6 @@ package com.air.housing.entity; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; @@ -50,6 +51,7 @@ public class HousingEstates extends Model { private String largeFormat; @ApiModelProperty(value = "业态") + @TableField(value = "`format`") private String format; @ApiModelProperty(value = "拟售总价") diff --git a/air/src/main/java/com/air/housing/service/impl/HousingEstatesServiceImpl.java b/air/src/main/java/com/air/housing/service/impl/HousingEstatesServiceImpl.java index 5be4f2f..dbcbfe8 100644 --- a/air/src/main/java/com/air/housing/service/impl/HousingEstatesServiceImpl.java +++ b/air/src/main/java/com/air/housing/service/impl/HousingEstatesServiceImpl.java @@ -1,6 +1,7 @@ package com.air.housing.service.impl; import com.air.entity.Blocks; +import com.air.enums.BlocksOriginStatusEnum; import com.air.housing.entity.Format; import com.air.housing.entity.Houses; import com.air.housing.dto.HousingDefine; @@ -88,6 +89,9 @@ public class HousingEstatesServiceImpl extends ServiceImpl> getAuctionRecordPage(@PathVariable Long landListedId) { - List list = auctionRecordService.list(Wrappers.query().lambda() - .eq(AuctionRecord::getLandListedId, landListedId) - .orderByDesc(AuctionRecord::getUpdateDate)); - return R.ok(list, "查询成功"); + @GetMapping("/list") + public R> getAuctionRecordPage(QueryPage page, @RequestParam(required = false) Long landListedId) { + LambdaQueryWrapper lambda = Wrappers.query().lambda(); + if (landListedId != null) { + lambda.eq(AuctionRecord::getLandListedId, landListedId); + } + IPage recordPage = auctionRecordService.page(page.toPage(), + lambda.orderByDesc(AuctionRecord::getUpdateDate)); + return R.ok(recordPage, "查询成功"); } /**