update
This commit is contained in:
+13
@@ -30,6 +30,11 @@ public class DistrictDetail {
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 物业类型
|
||||
*/
|
||||
private String estateType;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@@ -516,6 +521,14 @@ public class DistrictDetail {
|
||||
public void setRank(String rank) {
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public String getEstateType() {
|
||||
return estateType;
|
||||
}
|
||||
|
||||
public void setEstateType(String estateType) {
|
||||
this.estateType = estateType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+6
-1
@@ -55,7 +55,7 @@ public class DistrictInfoJob implements SimpleJob{
|
||||
final FshApiRemoteService fshApiRemoteService = RestApiCallUtils.getRestClient(FshApiRemoteService.class, openApiUrl);
|
||||
DBCollection collection = seaweedMongoTemplate.getCollection("seaweed");
|
||||
DBCursor cursor = collection.find(new BasicDBObject("cat", "district").append("status", 0),
|
||||
new BasicDBObject("city", 1).append("region", 1).append("name", 1)).addOption(Bytes.QUERYOPTION_NOTIMEOUT);
|
||||
new BasicDBObject("city", 1).append("region", 1).append("name", 1).append("estate_type2", 1)).addOption(Bytes.QUERYOPTION_NOTIMEOUT);
|
||||
final Semaphore semaphore = new Semaphore(10);
|
||||
while (cursor.hasNext()) {
|
||||
final DBObject data = cursor.next();
|
||||
@@ -90,9 +90,14 @@ public class DistrictInfoJob implements SimpleJob{
|
||||
if (id != null) {
|
||||
districtDetail.setId(id);
|
||||
}
|
||||
String estateType = "";
|
||||
if(data.containsKey("estate_type2")){
|
||||
estateType = (String) data.get("estate_type2");
|
||||
}
|
||||
districtDetail.setCity(city);
|
||||
districtDetail.setRegion(region);
|
||||
districtDetail.setName(name);
|
||||
districtDetail.setEstateType(estateType);
|
||||
districtDetail.setModifyTime(new Date());
|
||||
mongoTemplate.save(districtDetail);
|
||||
}catch(Exception e) {
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
<!-- 有房小区详情信息汇总 每周一0点10分执行-->
|
||||
<job:simple id="districtInfoJob" class="com.fangjia.job.youfang.job.DistrictInfoJob" registry-center-ref="regCenter"
|
||||
sharding-total-count="1" cron="0 10 0 ? * 2" sharding-item-parameters=""
|
||||
sharding-total-count="1" cron="0 46 16 ? * 2" sharding-item-parameters=""
|
||||
failover="true" description="【有房】 有房小区详情信息汇总"
|
||||
overwrite="true" event-trace-rdb-data-source="elasticJobLog" job-exception-handler="com.fangjia.job.youfang.handler.CustomJobExceptionHandler">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user