diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/ThardParthAnalyBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/ThardParthAnalyBatch.groovy index ee60d55b2..855403723 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/ThardParthAnalyBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/ThardParthAnalyBatch.groovy @@ -37,7 +37,7 @@ class ThardParthAnalyBatch extends BaseBatch{ def run(){ def fjwTotalCount = CommonDatautils.findAllCount("district") - def mdate = DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(), -2), "yyyy-MM-dd") + def mdate = DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(), -1), "yyyy-MM-dd") def sDate = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -2, "yyyyMM")); println "统计月份:"+sDate+" 查询更新时间:"+mdate @@ -120,7 +120,7 @@ class ThardParthAnalyBatch extends BaseBatch{ def findMatchSuccessDistCount(sDate){ def q = new BasicDBObject().append("s_date", sDate).append("avg_price", new BasicDBObject('$gt', 0)).append("status", 4) - def dbcursor = thirdPartyColl.count(q) + def dbcursor = thirdPartyColl.find(q) def set = new HashSet() for (def d : dbcursor) { set << d.city+"##"+d.region+"##"+d.name