Merge branch 'script_gj' into 'master'

空值判断

See merge request !965
This commit is contained in:
2024-09-29 14:04:35 +08:00
@@ -20,15 +20,20 @@ class AddCityRegionPrice {
for(def r : regions){
def startObj = CommonDatautils.queryCityOrRegionPrice(c, r, 1)
def endObj = CommonDatautils.queryCityOrRegionPrice(c, r, -1)
def betweenDates = DateUtil.getWeekendBetweenDates(startObj.weekend, endObj.weekend);
for(def weekend : betweenDates ){
def price = CommonDatautils.findCityOrRegionPrice(c, r, weekend)
if(!price){
add++
insertBatch.saveCityCalcCommand(c,r,null, weekend, "fangjia-priceanalysis-0")
println "[add] ${add} "+c+" "+r+" "+DateUtil.formatByPattern(weekend, "yyyy-MM-dd")
if(startObj && endObj){
def betweenDates = DateUtil.getWeekendBetweenDates(startObj.weekend, endObj.weekend);
for(def weekend : betweenDates ){
def price = CommonDatautils.findCityOrRegionPrice(c, r, weekend)
if(!price){
add++
insertBatch.saveCityCalcCommand(c,r,null, weekend, "fangjia-priceanalysis-0")
println "[add] ${add} "+c+" "+r+" "+DateUtil.formatByPattern(weekend, "yyyy-MM-dd")
}
}
}else{
println c+" "+r+" ÓпÕÖµ"
}
}
}