Browse Source

no message

release/v1.0.0
zeb 4 years ago
parent
commit
0bd4bda02f
  1. 30
      air/src/main/java/com/air/enums/BlocksOriginStatusEnum.java
  2. 5
      air/src/main/java/com/air/housing/entity/Format.java
  3. 2
      air/src/main/java/com/air/housing/entity/HousingEstates.java
  4. 4
      air/src/main/java/com/air/housing/service/impl/HousingEstatesServiceImpl.java
  5. 23
      air/src/main/java/com/air/land/controller/AuctionRecordController.java

30
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;
}
}

5
air/src/main/java/com/air/housing/entity/Format.java

@ -1,5 +1,6 @@
package com.air.housing.entity; package com.air.housing.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
@ -7,6 +8,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -18,7 +20,7 @@ import java.time.LocalDateTime;
* @date 2021-06-09 09:13:16 * @date 2021-06-09 09:13:16
*/ */
@Data @Data
@TableName("format") @TableName("`format`")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "业态信息") @ApiModel(value = "业态信息")
public class Format extends Model<Format> { public class Format extends Model<Format> {
@ -34,6 +36,7 @@ private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "大业态") @ApiModelProperty(value = "大业态")
private String largeFormat; private String largeFormat;
@ApiModelProperty(value = "业态") @ApiModelProperty(value = "业态")
@TableField(value = "`format`")
private String format; private String format;
@ApiModelProperty(value = "拟售总价") @ApiModelProperty(value = "拟售总价")
private BigDecimal preTotalPrice; private BigDecimal preTotalPrice;

2
air/src/main/java/com/air/housing/entity/HousingEstates.java

@ -1,5 +1,6 @@
package com.air.housing.entity; package com.air.housing.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
@ -50,6 +51,7 @@ public class HousingEstates extends Model<HousingEstates> {
private String largeFormat; private String largeFormat;
@ApiModelProperty(value = "业态") @ApiModelProperty(value = "业态")
@TableField(value = "`format`")
private String format; private String format;
@ApiModelProperty(value = "拟售总价") @ApiModelProperty(value = "拟售总价")

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

@ -1,6 +1,7 @@
package com.air.housing.service.impl; package com.air.housing.service.impl;
import com.air.entity.Blocks; import com.air.entity.Blocks;
import com.air.enums.BlocksOriginStatusEnum;
import com.air.housing.entity.Format; import com.air.housing.entity.Format;
import com.air.housing.entity.Houses; import com.air.housing.entity.Houses;
import com.air.housing.dto.HousingDefine; import com.air.housing.dto.HousingDefine;
@ -88,6 +89,9 @@ public class HousingEstatesServiceImpl extends ServiceImpl<HousingEstatesMapper,
format.setFormat(housingDefine.getFormat()); format.setFormat(housingDefine.getFormat());
formatService.save(format); formatService.save(format);
} }
//origin更新为已处理
blocksOrigin.setStatusCd(BlocksOriginStatusEnum.HANDLED.getCode());
blocksOrigin.updateById();
return true; return true;
} }

23
air/src/main/java/com/air/land/controller/AuctionRecordController.java

@ -4,14 +4,18 @@ import cn.hutool.core.bean.BeanUtil;
import com.air.land.entity.AuctionRecord; import com.air.land.entity.AuctionRecord;
import com.air.land.service.AuctionRecordService; import com.air.land.service.AuctionRecordService;
import com.air.land.vo.AuctionRecordVo; import com.air.land.vo.AuctionRecordVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.cinderella.framework.common.core.util.R; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import sun.jvm.hotspot.debugger.Page;
import java.util.List; import java.util.List;
@ -24,8 +28,8 @@ import java.util.List;
*/ */
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/auctionrecord") @RequestMapping("/auction_record")
@Api(value = "auctionrecord", tags = "参拍记录表管理") @Api(value = "auction_record", tags = "参拍记录表管理")
public class AuctionRecordController { public class AuctionRecordController {
private final AuctionRecordService auctionRecordService; private final AuctionRecordService auctionRecordService;
@ -37,12 +41,15 @@ public class AuctionRecordController {
* @return * @return
*/ */
@ApiOperation(value = "查询参拍记录列表", notes = "查询参拍记录列表") @ApiOperation(value = "查询参拍记录列表", notes = "查询参拍记录列表")
@GetMapping("/list/{landListedId}") @GetMapping("/list")
public R<List<AuctionRecord>> getAuctionRecordPage(@PathVariable Long landListedId) { public R<IPage<AuctionRecord>> getAuctionRecordPage(QueryPage page, @RequestParam(required = false) Long landListedId) {
List<AuctionRecord> list = auctionRecordService.list(Wrappers.<AuctionRecord>query().lambda() LambdaQueryWrapper<AuctionRecord> lambda = Wrappers.<AuctionRecord>query().lambda();
.eq(AuctionRecord::getLandListedId, landListedId) if (landListedId != null) {
.orderByDesc(AuctionRecord::getUpdateDate)); lambda.eq(AuctionRecord::getLandListedId, landListedId);
return R.ok(list, "查询成功"); }
IPage<AuctionRecord> recordPage = auctionRecordService.page(page.toPage(),
lambda.orderByDesc(AuctionRecord::getUpdateDate));
return R.ok(recordPage, "查询成功");
} }
/** /**

Loading…
Cancel
Save