移除无效的trigger
This commit is contained in:
+27
-27
@@ -46,7 +46,7 @@ public class SellTriggerServiceImpl implements TriggerService {
|
||||
public List<BSONObject> processBSONObjects(List<BSONObject> bSONDocList) {
|
||||
List<BSONObject> ret = new ArrayList<BSONObject>();
|
||||
// Map<DistrictKey, KnowbaseBo> districtKnowbaseMap = indexHelperService.getFromKnowBase(bSONDocList);
|
||||
Map<DistrictKey, Map<String, Object>> metroDistanceMap = indexHelperService.getMetroDistanceMap(bSONDocList);
|
||||
// Map<DistrictKey, Map<String, Object>> metroDistanceMap = indexHelperService.getMetroDistanceMap(bSONDocList);
|
||||
Map<DistrictKey, District> districtMap = indexHelperService.getDistricts(bSONDocList);
|
||||
// Map<DistrictKey, DistrictStatBo> districtStatMap =
|
||||
// indexHelperService.getDistrictStats(districtKnowbaseMap);
|
||||
@@ -70,12 +70,12 @@ public class SellTriggerServiceImpl implements TriggerService {
|
||||
for (BSONObject object : bSONDocList) {
|
||||
try {
|
||||
ServerArea city = ServerAreaData.getServerAreaByDisplayDefaultNull(String.valueOf(object.get("city")));
|
||||
DistrictKey districtKey = new DistrictKey((String) object.get("city"), (String) object.get("region"),
|
||||
(String) object.get("district_name"));
|
||||
District district = districtMap.get(districtKey);
|
||||
if (district != null && district.getName() != null) {
|
||||
districtKey = new DistrictKey(district.getCity(), district.getRegion(),district.getName());
|
||||
}
|
||||
// DistrictKey districtKey = new DistrictKey((String) object.get("city"), (String) object.get("region"),
|
||||
// (String) object.get("district_name"));
|
||||
// District district = districtMap.get(districtKey);
|
||||
// if (district != null && district.getName() != null) {
|
||||
// districtKey = new DistrictKey(district.getCity(), district.getRegion(),district.getName());
|
||||
// }
|
||||
|
||||
BSONObject newObj = new BasicBSONObject();
|
||||
|
||||
@@ -156,16 +156,16 @@ public class SellTriggerServiceImpl implements TriggerService {
|
||||
newObj.put("fitment", object.get("fitment"));
|
||||
newObj.put("contact_people", object.get("contact_people"));
|
||||
ScoreCalculatorInputData inputDate = new ScoreCalculatorInputData();
|
||||
if (district != null) {
|
||||
newObj.put("region", district.getRegion());
|
||||
if (StringUtils.isNotBlank(district.getBlock())) {
|
||||
newObj.put("block", district.getBlock());
|
||||
}
|
||||
if (district.getName() != null) {
|
||||
newObj.put("districtname_key", district.getName() + "_" + newObj.get("region") + "_" + object.get("city"));
|
||||
newObj.put("district_name", district.getName());
|
||||
}
|
||||
}
|
||||
// if (district != null) {
|
||||
// newObj.put("region", district.getRegion());
|
||||
// if (StringUtils.isNotBlank(district.getBlock())) {
|
||||
// newObj.put("block", district.getBlock());
|
||||
// }
|
||||
// if (district.getName() != null) {
|
||||
// newObj.put("districtname_key", district.getName() + "_" + newObj.get("region") + "_" + object.get("city"));
|
||||
// newObj.put("district_name", district.getName());
|
||||
// }
|
||||
// }
|
||||
|
||||
// newObj.put("if_school", 0);
|
||||
// if (districtSchoolMap != null && districtSchoolMap.containsKey(districtKey)) {
|
||||
@@ -248,16 +248,16 @@ public class SellTriggerServiceImpl implements TriggerService {
|
||||
newObj.put("visible", 1);
|
||||
}
|
||||
|
||||
// 地铁信息
|
||||
if (metroDistanceMap != null && metroDistanceMap.get(districtKey) != null) {
|
||||
newObj.put("metro", metroDistanceMap.get(districtKey).get("metro"));
|
||||
newObj.put("station", metroDistanceMap.get(districtKey).get("station"));
|
||||
newObj.put("metro_info", metroDistanceMap.get(districtKey).get("metro_info"));
|
||||
newObj.put("if_metro", metroDistanceMap.get(districtKey).get("if_metro"));
|
||||
} else {
|
||||
newObj.put("if_metro", 0);
|
||||
}
|
||||
|
||||
// // 地铁信息
|
||||
// if (metroDistanceMap != null && metroDistanceMap.get(districtKey) != null) {
|
||||
// newObj.put("metro", metroDistanceMap.get(districtKey).get("metro"));
|
||||
// newObj.put("station", metroDistanceMap.get(districtKey).get("station"));
|
||||
// newObj.put("metro_info", metroDistanceMap.get(districtKey).get("metro_info"));
|
||||
// newObj.put("if_metro", metroDistanceMap.get(districtKey).get("if_metro"));
|
||||
// } else {
|
||||
// newObj.put("if_metro", 0);
|
||||
// }
|
||||
//
|
||||
//2018-07-31新增字段 alert by jenis
|
||||
newObj.put("estate_type", object.get("estate_type"));//物业类型
|
||||
newObj.put("house_number", object.get("house_number"));//房屋编号
|
||||
|
||||
Reference in New Issue
Block a user