新增接口

This commit is contained in:
2022-05-12 00:11:57 +08:00
parent 1ee39a3335
commit 816616484f
20 changed files with 635 additions and 10 deletions
@@ -0,0 +1,7 @@
package com.fangjia.dal.mongo.dao;
import com.fangjia.dal.MongoDao;
import com.fangjia.dal.mongo.model.BsEvaluation;
public interface BsEvaluationDao extends MongoDao<BsEvaluation> {
}
@@ -0,0 +1,8 @@
package com.fangjia.dal.mongo.dao;
import com.fangjia.dal.MongoDaoImpl;
import com.fangjia.dal.mongo.model.BsEvaluation;
public class BsEvaluationDaoImpl extends MongoDaoImpl<BsEvaluation> implements
BsEvaluationDao {
}
@@ -0,0 +1,184 @@
package com.fangjia.dal.mongo.model;
import com.fangjia.dal.MongoEntity;
import javax.persistence.*;
import java.util.Date;
@Entity
@Table(name = "business.evaluation")
public class BsEvaluation implements MongoEntity {
private String id;
private String fullAddress;
private String commid;
private String cityName;
private String distName;
private String commName;
private String address;
private Double buildArea;
private Integer floor;
private Integer floorcnt;
private Integer roomcnt;
private Integer livingroomcnt;
private String houseaspect;//ÄÏ
private String fitment;
private Date cDate;
private Integer unitPrice;
private Integer totalPrice;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "_id")
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
@Column(name = "full_address")
public String getFullAddress() {
return fullAddress;
}
public void setFullAddress(String fullAddress) {
this.fullAddress = fullAddress;
}
@Column(name = "commid")
public String getCommid() {
return commid;
}
public void setCommid(String commid) {
this.commid = commid;
}
@Column(name = "cityname")
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
@Column(name = "distname")
public String getDistName() {
return distName;
}
public void setDistName(String distName) {
this.distName = distName;
}
@Column(name = "commname")
public String getCommName() {
return commName;
}
public void setCommName(String commName) {
this.commName = commName;
}
@Column(name = "address")
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@Column(name = "buildarea")
public Double getBuildArea() {
return buildArea;
}
public void setBuildArea(Double buildArea) {
this.buildArea = buildArea;
}
@Column(name = "floor")
public Integer getFloor() {
return floor;
}
public void setFloor(Integer floor) {
this.floor = floor;
}
@Column(name = "floorcnt")
public Integer getFloorcnt() {
return floorcnt;
}
public void setFloorcnt(Integer floorcnt) {
this.floorcnt = floorcnt;
}
@Column(name = "roomcnt")
public Integer getRoomcnt() {
return roomcnt;
}
public void setRoomcnt(Integer roomcnt) {
this.roomcnt = roomcnt;
}
@Column(name = "livingroomcnt")
public Integer getLivingroomcnt() {
return livingroomcnt;
}
public void setLivingroomcnt(Integer livingroomcnt) {
this.livingroomcnt = livingroomcnt;
}
@Column(name = "houseaspect")
public String getHouseaspect() {
return houseaspect;
}
public void setHouseaspect(String houseaspect) {
this.houseaspect = houseaspect;
}
@Column(name = "fitment")
public String getFitment() {
return fitment;
}
public void setFitment(String fitment) {
this.fitment = fitment;
}
@Column(name = "c_date")
public Date getcDate() {
return cDate;
}
public void setcDate(Date cDate) {
this.cDate = cDate;
}
@Column(name = "unitprice")
public Integer getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(Integer unitPrice) {
this.unitPrice = unitPrice;
}
@Column(name = "totalprice")
public Integer getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(Integer totalPrice) {
this.totalPrice = totalPrice;
}
}
@@ -48,6 +48,11 @@ public class DealPrice implements MongoEntity {
private Integer floor;//当前楼层
private Long score;
private String matchId;
private String matchCity;
private String matchRegion;
private String matchName;
@Id
@GeneratedValue
@Column(name = "_id", unique = true, nullable = false)
@@ -296,4 +301,40 @@ public class DealPrice implements MongoEntity {
}
return true;
}
@Column(name = "match_id")
public String getMatchId() {
return matchId;
}
public void setMatchId(String matchId) {
this.matchId = matchId;
}
@Column(name = "match_city")
public String getMatchCity() {
return matchCity;
}
public void setMatchCity(String matchCity) {
this.matchCity = matchCity;
}
@Column(name = "match_region")
public String getMatchRegion() {
return matchRegion;
}
public void setMatchRegion(String matchRegion) {
this.matchRegion = matchRegion;
}
@Column(name = "match_name")
public String getMatchName() {
return matchName;
}
public void setMatchName(String matchName) {
this.matchName = matchName;
}
}
@@ -67,6 +67,13 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
must.add(addTerms("district_name", alias));
must.add(addMatch("cat", "sell"));
must.add(addRange("avg_price", minPrice, maxPrice));
JSONObject term = new JSONObject();
JSONObject match = new JSONObject();
match.put("p_date", 20210501);
term.put("match", match);
must.add(term);
bool.put("must", must);
query.put("bool", bool);
reqBody.put("query", query);
@@ -58,6 +58,8 @@ public class Seawater implements SeawaterEntity {
private String url;
private String root;
private Integer avgPrice;
private String purpose;
private String estateType;
@Id
@Column(name = "_id")
@@ -285,4 +287,22 @@ public class Seawater implements SeawaterEntity {
public void setAvgPrice(Integer avgPrice) {
this.avgPrice = avgPrice;
}
@Column(name = "purpose")
public String getPurpose() {
return purpose;
}
public void setPurpose(String purpose) {
this.purpose = purpose;
}
@Column(name = "estate_type")
public String getEstateType() {
return estateType;
}
public void setEstateType(String estateType) {
this.estateType = estateType;
}
}