19年
This commit is contained in:
+3
-3
@@ -33,7 +33,7 @@ class UpdateHouseRegion {
|
|||||||
def run(){
|
def run(){
|
||||||
def city = "º¼ÖÝ"
|
def city = "º¼ÖÝ"
|
||||||
// findCount(city, 20210101);
|
// findCount(city, 20210101);
|
||||||
def rets = findHouseSource(city, 20200101, 20200731)
|
def rets = findHouseSource(city, 20190701, 20191231)
|
||||||
batchUpdate(city, rets);
|
batchUpdate(city, rets);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ class UpdateHouseRegion {
|
|||||||
|
|
||||||
def findHouseSource(def city, def startDate, def endDate){
|
def findHouseSource(def city, def startDate, def endDate){
|
||||||
final StringBuffer sqlBuffer = new StringBuffer()
|
final StringBuffer sqlBuffer = new StringBuffer()
|
||||||
sqlBuffer.append("SELECT * FROM \"seawater-2020\" WHERE 1=1")
|
sqlBuffer.append("SELECT * FROM \"seawater-2019\" WHERE 1=1")
|
||||||
sqlBuffer.append(" and city = '"+city+"'")
|
sqlBuffer.append(" and city = '"+city+"'")
|
||||||
sqlBuffer.append(" and cat = 'sell'")
|
sqlBuffer.append(" and cat = 'sell'")
|
||||||
sqlBuffer.append(" and p_date >="+startDate).append(" and p_date <"+endDate);
|
sqlBuffer.append(" and p_date >="+startDate).append(" and p_date <"+endDate);
|
||||||
@@ -109,7 +109,7 @@ class UpdateHouseRegion {
|
|||||||
def updateHouseRegion2(def url, def region){
|
def updateHouseRegion2(def url, def region){
|
||||||
def header = [:]
|
def header = [:]
|
||||||
header["Authorization"] = "Basic ${Base64.getEncoder().encodeToString("developer:5e8edd851d2fdfbd7415232c67367cc3".getBytes("UTF-8"))}".toString()
|
header["Authorization"] = "Basic ${Base64.getEncoder().encodeToString("developer:5e8edd851d2fdfbd7415232c67367cc3".getBytes("UTF-8"))}".toString()
|
||||||
String seawaterUrl = "http://192.168.0.206:9200/seawater-2020/_update_by_query?conflicts=proceed&scroll_size=1000&wait_for_completion=false"
|
String seawaterUrl = "http://192.168.0.206:9200/seawater-2019/_update_by_query?conflicts=proceed&scroll_size=1000&wait_for_completion=false"
|
||||||
def body = """
|
def body = """
|
||||||
{
|
{
|
||||||
"script": {
|
"script": {
|
||||||
|
|||||||
Reference in New Issue
Block a user