@@ -6,6 +6,7 @@ import java.util.List;
|
||||
public class SeawaterQuery {
|
||||
|
||||
private String id;
|
||||
private List<String> ids;
|
||||
private String cat;
|
||||
private String region;
|
||||
private String districtName;
|
||||
@@ -287,4 +288,12 @@ public class SeawaterQuery {
|
||||
public void setTags(List<String> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public List<String> getIds() {
|
||||
return ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +150,10 @@ public class Evaluation implements MongoEntity {
|
||||
* 查询范围
|
||||
*/
|
||||
private Integer radius;
|
||||
/**
|
||||
* 样本IDS
|
||||
*/
|
||||
private String sampleIds;
|
||||
/**
|
||||
* 商铺标签
|
||||
*/
|
||||
@@ -1092,4 +1096,13 @@ public class Evaluation implements MongoEntity {
|
||||
public void setTags(String tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
@Column(name = "sample_ids")
|
||||
public String getSampleIds() {
|
||||
return sampleIds;
|
||||
}
|
||||
|
||||
public void setSampleIds(String sampleIds) {
|
||||
this.sampleIds = sampleIds;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -642,6 +642,13 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
||||
temp.put("term", param);
|
||||
jsonList.add(temp);
|
||||
}
|
||||
if(query.getIds() != null){
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("_id", query.getIds());
|
||||
JSONObject temp = new JSONObject();
|
||||
temp.put("terms", param);
|
||||
jsonList.add(temp);
|
||||
}
|
||||
if (StringUtils.isNotBlank(query.getCat())) {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("cat", query.getCat());
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.fangjia.dal.seawater.model;
|
||||
|
||||
public class SeawaterDto {
|
||||
|
||||
private String id;
|
||||
private String city;
|
||||
private String district;
|
||||
private String name;
|
||||
@@ -143,4 +144,12 @@ public class SeawaterDto {
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,6 +463,7 @@ public class ShopController {
|
||||
evaluation.setCreationDate(new Date());
|
||||
evaluation.setModificationDate(new Date());
|
||||
evaluation.setClientNo(model.getClientNo());
|
||||
evaluation.setSampleIds(model.getSampleIds());
|
||||
if (0 != model.getAge()) {
|
||||
evaluation.setAge(model.getAge());
|
||||
}
|
||||
|
||||
+1
-1
@@ -445,7 +445,7 @@ public class ShopSellController {
|
||||
evaluation.setLevel(model.getLevel());
|
||||
evaluation.setFitment(model.getFitment());
|
||||
evaluation.setType(model.getType());
|
||||
|
||||
evaluation.setSampleIds(model.getSampleIds());
|
||||
evaluation.setCity(model.getCity());
|
||||
evaluation.setRegion(model.getRegion());
|
||||
evaluation.setDistrictName(model.getName());
|
||||
|
||||
+10
@@ -294,6 +294,8 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
|
||||
|
||||
private String tags;
|
||||
|
||||
private String sampleIds;
|
||||
|
||||
public void setDecorationAge(int decorationAge) {
|
||||
this.decorationAge = decorationAge;
|
||||
}
|
||||
@@ -952,4 +954,12 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
|
||||
public void setTags(String tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public void setSampleIds(String sampleIds) {
|
||||
this.sampleIds = sampleIds;
|
||||
}
|
||||
|
||||
public String getSampleIds() {
|
||||
return sampleIds;
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -208,6 +208,7 @@ public class AiShopServiceImpl implements AiShopService {
|
||||
private static SeawaterDto getSeawaterDto(Seawater seawater, String cat) {
|
||||
SeawaterDto seawaterDto = new SeawaterDto();
|
||||
seawaterDto.setCity(seawater.getCity());
|
||||
seawaterDto.setId(seawater.getId());
|
||||
seawaterDto.setDistrict(seawater.getRegion());
|
||||
seawaterDto.setName(seawater.getName());
|
||||
seawaterDto.setArea(seawater.getArea());
|
||||
@@ -332,6 +333,9 @@ public class AiShopServiceImpl implements AiShopService {
|
||||
if (StringUtils.isNotBlank(evaluation.getTags())) {
|
||||
query.setTags(Arrays.asList(evaluation.getTags().split(",")));
|
||||
}
|
||||
if(StringUtils.isNotBlank(evaluation.getSampleIds())){
|
||||
query.setIds(Arrays.asList(evaluation.getSampleIds().split(",")));
|
||||
}
|
||||
// 查询近一年样本
|
||||
query.setStartDate(Integer.parseInt(DateUtil.formatByPattern(DateUtil.addMonthToDate(new Date(), -12), "yyyyMMdd")));
|
||||
query.setEndDate(Integer.parseInt(DateUtil.formatByPattern(new Date(), "yyyyMMdd")));
|
||||
@@ -395,6 +399,9 @@ public class AiShopServiceImpl implements AiShopService {
|
||||
if (StringUtils.isNotBlank(evaluation.getTags())) {
|
||||
query.setTags(Arrays.asList(evaluation.getTags().split(",")));
|
||||
}
|
||||
if(StringUtils.isNotBlank(evaluation.getSampleIds())){
|
||||
query.setIds(Arrays.asList(evaluation.getSampleIds().split(",")));
|
||||
}
|
||||
// 查询近一年样本
|
||||
query.setStartDate(Integer.parseInt(DateUtil.formatByPattern(DateUtil.addMonthToDate(new Date(), -12), "yyyyMMdd")));
|
||||
query.setEndDate(Integer.parseInt(DateUtil.formatByPattern(new Date(), "yyyyMMdd")));
|
||||
|
||||
Reference in New Issue
Block a user