From 15cf0f776fb3408e4b24d340684695f0b806af3b Mon Sep 17 00:00:00 2001 From: gaojuan Date: Thu, 22 Apr 2021 18:46:28 +0800 Subject: [PATCH 01/22] update --- .../geluke/src/main/webapp/WEB-INF/web.xml | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/projects/geluke/src/main/webapp/WEB-INF/web.xml b/projects/geluke/src/main/webapp/WEB-INF/web.xml index a9ea8b65f..77c4b9237 100644 --- a/projects/geluke/src/main/webapp/WEB-INF/web.xml +++ b/projects/geluke/src/main/webapp/WEB-INF/web.xml @@ -25,12 +25,12 @@ - - AccessLogFilter - - com.fangjia.geluke.filters.AccessLogFilter - - + + + + + + SpiderValidateFilter @@ -47,20 +47,20 @@ - - AnalyticsFilter - - org.springframework.web.filter.DelegatingFilterProxy - - - targetBeanName - analyticsFilter - - - targetFilterLifecycle - true - - + + + + + + + + + + + + + + sothis @@ -80,21 +80,21 @@ /* REQUEST - - AccessLogFilter - /* - REQUEST - + + + + + SpiderValidateFilter /* REQUEST - - AnalyticsFilter - /* - REQUEST - + + + + + sothis /* From df137224355cac2e7362cb5ad25894078c3912a3 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Thu, 22 Apr 2021 18:56:11 +0800 Subject: [PATCH 02/22] update --- .../geluke/src/main/resources/geluke.properties | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/projects/geluke/src/main/resources/geluke.properties b/projects/geluke/src/main/resources/geluke.properties index 5b0aeb064..f8141e46b 100644 --- a/projects/geluke/src/main/resources/geluke.properties +++ b/projects/geluke/src/main/resources/geluke.properties @@ -17,16 +17,30 @@ fangjia.auto.url=${fangjia.auto.host}:${fangjia.auto.port}/ fangjia.file.mongo.host=fs.mongo.db.fangjia.com fangjia.file.mongo.port=27017 +#fangjia.log.mongo.host=log.mongo.db.fangjia.com +#fangjia.log.mongo.port=27017 + fangjia.log.mongo.host=log.mongo.db.fangjia.com -fangjia.log.mongo.port=27017 +fangjia.log.mongo.port=52002 +fangjia.log.mongodb.mongoUri=mongodb://${fangjia.log.mongo.host}:${fangjia.log.mongo.port}/ fangjia.mongo.host=mongo.db.fangjia.com fangjia.mongo.port=27017 +fangjia.mongodb.mongoUri=mongodb://${fangjia.mongo.host}:${fangjia.mongo.port},${fangjia.secondary.mongo.host}:${fangjia.secondary.mongo.port}/ + + +fangjia.fs.mongo.host=fs.mongo.db.fangjia.com +fangjia.fs.mongo.port=27017 +fangjia.fs.mongodb.mongoUri=mongodb://${fangjia.fs.mongo.host}:${fangjia.fs.mongo.port}/ + +fangjia.seabird.mongodb.mongoUri=mongodb://developer:G00IDCDEV12385@${fangjia.mongo.host}:${fangjia.mongo.port},${fangjia.secondary.mongo.host}:${fangjia.secondary.mongo.port}/ + fangjia.knowbase.host=knowbase.db.fangjia.com fangjia.knowbase.port=7180 fangjia.knowbase.url=${fangjia.knowbase.host}:${fangjia.knowbase.port}/ + fangjia.environment=development #fangjia.environment=production From d02097c7dc0ff6b5d93c6956db4096b892089367 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 19:21:42 +0800 Subject: [PATCH 03/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9POM=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliverables/geluke/pom.xml | 1 + deliverables/script/test/src/Test.java | 63 ------------------- .../com/fangjia/script/gj/LogStat.groovy | 20 +++--- projects/fangjia-static/pom.xml | 2 +- projects/geluke/pom.xml | 2 +- 5 files changed, 13 insertions(+), 75 deletions(-) delete mode 100644 deliverables/script/test/src/Test.java diff --git a/deliverables/geluke/pom.xml b/deliverables/geluke/pom.xml index 8d4554eac..6e3fc3c85 100644 --- a/deliverables/geluke/pom.xml +++ b/deliverables/geluke/pom.xml @@ -19,6 +19,7 @@ ../../projects/fangjia-core ../../projects/fangjia-dal + ../../projects/chafangtong-dal ../../projects/fangjia-service ../../projects/geluke-dal ../../projects/geluke-service diff --git a/deliverables/script/test/src/Test.java b/deliverables/script/test/src/Test.java deleted file mode 100644 index 9d88b45cf..000000000 --- a/deliverables/script/test/src/Test.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Created by Administrator on 2017/5/9. - */ -import com.sun.org.apache.xerces.internal.impl.io.UTF8Reader; -import com.sun.xml.internal.txw2.Document; -import sun.nio.cs.ext.GB18030; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.URL; -import java.net.URLConnection; -public class Test { - String fixture_Date = null; - String area = null; - String unit_Price = null; - String transaction_Price = null; - static String sendGet(String url) { - String result = ""; - // 定义一个缓冲字符输入流 - BufferedReader in = null; - try { - // 将string转成url对象 - URL realUrl = new URL(url); - // 初始化一个链接到那个url的连接 - URLConnection connection = realUrl.openConnection(); - // 开始实际的连接 - connection.connect(); - // 初始化 BufferedReader输入流来读取URL的响应 - in = new BufferedReader(new InputStreamReader(connection.getInputStream(),"gbk")); - // 用来临时存储抓取到的每一行的数据 - String line; - while ((line = in.readLine()) != null) - { // 遍历抓取到的每一行并将其存储到result里面 - result += line; - } - Document document = Jsoup.parse(result, url); - - parseListPage(document); - - - } catch (Exception e) { - System.out.println("发送GET请求出现异常!" + e); - e.printStackTrace(); } - // 使用finally来关闭输入流 - finally { - try { - if (in != null) { - in.close(); } - } catch (Exception e2) { - e2.printStackTrace(); - } - } - return result; - } - public static void main(String[] args) { - // 定义即将访问的链接 - String url = "http://dl.goufang.com/xq/1062/6"; - // 访问链接并获取页面内容 - String result = sendGet(url); - System.out.println(result); - } -} - diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/LogStat.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/LogStat.groovy index 6305d35b9..239d7ca4d 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/LogStat.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/LogStat.groovy @@ -15,19 +15,19 @@ class LogStat { } def run(){ - ExcelUtils.multiThreadingModify("D:\\data\\建行匹配小区2(1).xlsx",{ d -> - def calDate = DateUtil.parseDate(d['M'], "yyyy-MM-dd") - def weekend = DateUtils.getFirstDayOfWeek(calDate) - def dbo = CommonDatautils.queryDistrictPrice(d['N'], d['O'], d['P'], weekend) - if(dbo){ - d['E'] = dbo.avg_price - } + ExcelUtils.multiThreadingModify("C:\\Users\\wenyan\\Desktop\\建行匹配小区4.xlsx",{ d -> +// def calDate = DateUtil.parseDate(d['M'], "yyyy-MM-dd") +// def weekend = DateUtils.getFirstDayOfWeek(calDate) +// def dbo = CommonDatautils.queryDistrictPrice(d['N'], d['O'], d['P'], weekend) +// if(dbo){ +// d['E'] = dbo.avg_price +// } def district = CommonDatautils.findDistrict(d['N'], d['O'], d['P'], "district") if(district){ def startDate = DateUtil.addMonth(new Date(), -6) def start = startDate.replace("-","").toInteger() - def end = DateUtil.formatByPattern(calDate,"yyyyMMdd").toInteger() +// def end = DateUtil.formatByPattern(calDate,"yyyyMMdd").toInteger() def alias = [] if(district.alias){ if(!district.alias.contains(district.name)){ @@ -37,8 +37,8 @@ class LogStat { }else{ alias << district.name } - def count = findHouses(d['N'], d['O'], d['P'], alias, start, end) - d['G'] = count + def count = findHouses(d['N'], d['O'], d['P'], alias, start, null) + d['S'] = count println(d) } },0) diff --git a/projects/fangjia-static/pom.xml b/projects/fangjia-static/pom.xml index 6a048340d..7be7f7dae 100644 --- a/projects/fangjia-static/pom.xml +++ b/projects/fangjia-static/pom.xml @@ -29,7 +29,7 @@ org.sothis sothis-core - 0.2.0-SNAPSHOT + 0.2.0 com.fangjia diff --git a/projects/geluke/pom.xml b/projects/geluke/pom.xml index c168bf1c6..62875968c 100644 --- a/projects/geluke/pom.xml +++ b/projects/geluke/pom.xml @@ -51,7 +51,7 @@ org.sothis sothis-web - 0.2.0-SNAPSHOT + 0.2.0 org.springframework From 79ee2d3fd1a3afa057e7792ec05ef30f1feaf016 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 19:30:40 +0800 Subject: [PATCH 04/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9POM=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/geluke/src/main/resources/geluke.properties | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/geluke/src/main/resources/geluke.properties b/projects/geluke/src/main/resources/geluke.properties index f8141e46b..f19395452 100644 --- a/projects/geluke/src/main/resources/geluke.properties +++ b/projects/geluke/src/main/resources/geluke.properties @@ -25,7 +25,9 @@ fangjia.log.mongo.port=52002 fangjia.log.mongodb.mongoUri=mongodb://${fangjia.log.mongo.host}:${fangjia.log.mongo.port}/ fangjia.mongo.host=mongo.db.fangjia.com -fangjia.mongo.port=27017 +fangjia.mongo.port=28017 +fangjia.secondary.mongo.host=secondary.mongo.db.fangjia.com +fangjia.secondary.mongo.port=28017 fangjia.mongodb.mongoUri=mongodb://${fangjia.mongo.host}:${fangjia.mongo.port},${fangjia.secondary.mongo.host}:${fangjia.secondary.mongo.port}/ From c21d65dc1875b85e43991cbba501bb26dd22eab6 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 19:41:13 +0800 Subject: [PATCH 05/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/geluke/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 projects/geluke/Dockerfile diff --git a/projects/geluke/Dockerfile b/projects/geluke/Dockerfile new file mode 100644 index 000000000..d0b8e61a1 --- /dev/null +++ b/projects/geluke/Dockerfile @@ -0,0 +1,2 @@ +FROM 192.168.0.19:9012/tomcat6:latest +COPY target/*.war /home/goojia/webapps/ROOT.war \ No newline at end of file From db1abff1715d69f1154435c359c13c91c6425a49 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 19:44:37 +0800 Subject: [PATCH 06/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliverables/k8s/geluke.yaml | 95 ++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 deliverables/k8s/geluke.yaml diff --git a/deliverables/k8s/geluke.yaml b/deliverables/k8s/geluke.yaml new file mode 100644 index 000000000..91095de12 --- /dev/null +++ b/deliverables/k8s/geluke.yaml @@ -0,0 +1,95 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: geluke + namespace: fangjia +spec: + replicas: 1 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + revisionHistoryLimit: 5 + selector: + matchLabels: + project: geluke + app: fangjia + template: + metadata: + labels: + project: geluke + app: fangjia + spec: + imagePullSecrets: + - name: nexus-registry-secret + nodeSelector: + app: fangjia + containers: + - name: geluke + image: 192.168.0.19:9012/geluke:latest + imagePullPolicy: Always + resources: + limits: + memory: "3Gi" + requests: + memory: "2Gi" + env: + - name: JAVA_OPTS + value: "-Xmx3072m -XX:MaxPermSize=256m + -Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml + -Dfangjia.overridePropertiesLocation=/home/goojia/goojiaconfig/geluke.properties" + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 10 + periodSeconds: 5 + ports: + - containerPort: 8080 + name: web + protocol: TCP + volumeMounts: + - name: host-time + mountPath: /etc/localtime + - name: goojiaconfig + mountPath: /home/goojia/goojiaconfig + + volumes: + - name: host-time + hostPath: + path: /etc/localtime + - name: goojiaconfig + cephfs: + monitors: + - 192.168.0.208:6789 + - 192.168.0.209:6789 + - 192.168.0.210:6789 + user: admin + path: /k8s/goojiaconfig + secretRef: + name: ceph-secret + readOnly: false + +--- +apiVersion: v1 +kind: Service +metadata: + name: geluke + namespace: fangjia + labels: + project: geluke + app: fangjia +spec: + type: NodePort + selector: + project: geluke + app: fangjia + ports: + - port: 8080 + targetPort: 8080 + nodePort: 30008 \ No newline at end of file From ebffa71278f22803d14b979a0d3c546213bf52a8 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 19:52:08 +0800 Subject: [PATCH 07/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliverables/k8s/geluke.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deliverables/k8s/geluke.yaml b/deliverables/k8s/geluke.yaml index 91095de12..8d3cbb737 100644 --- a/deliverables/k8s/geluke.yaml +++ b/deliverables/k8s/geluke.yaml @@ -92,4 +92,4 @@ spec: ports: - port: 8080 targetPort: 8080 - nodePort: 30008 \ No newline at end of file + nodePort: 30009 \ No newline at end of file From 9f8e2ad6d8d858fcc05e13accccec0577c092edd Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 19:56:17 +0800 Subject: [PATCH 08/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliverables/k8s/geluke.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deliverables/k8s/geluke.yaml b/deliverables/k8s/geluke.yaml index 8d3cbb737..d43501cd6 100644 --- a/deliverables/k8s/geluke.yaml +++ b/deliverables/k8s/geluke.yaml @@ -92,4 +92,4 @@ spec: ports: - port: 8080 targetPort: 8080 - nodePort: 30009 \ No newline at end of file + nodePort: 30010 \ No newline at end of file From 2ce50954bd39223f175e2b87fbda2dc2c3c17716 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 20:07:11 +0800 Subject: [PATCH 09/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/spring-context.xml | 40 +++++++++++++------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/projects/geluke/src/main/resources/spring-context.xml b/projects/geluke/src/main/resources/spring-context.xml index 6c59dd2d3..20d2cf31f 100644 --- a/projects/geluke/src/main/resources/spring-context.xml +++ b/projects/geluke/src/main/resources/spring-context.xml @@ -18,8 +18,15 @@ - - + + + + + + + + + @@ -29,20 +36,27 @@ - - - - + + + + + + - - - + + + - - - - + + + + + + + + + Date: Thu, 22 Apr 2021 20:24:57 +0800 Subject: [PATCH 10/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fangjia/geluke/model/BaseModel.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/geluke/src/main/java/com/fangjia/geluke/model/BaseModel.java b/projects/geluke/src/main/java/com/fangjia/geluke/model/BaseModel.java index 5a4d1e6d6..3f52fa63b 100644 --- a/projects/geluke/src/main/java/com/fangjia/geluke/model/BaseModel.java +++ b/projects/geluke/src/main/java/com/fangjia/geluke/model/BaseModel.java @@ -155,11 +155,11 @@ public class BaseModel extends ModelAndViewSupport { } public final String getRoot() { - return (CONFIG.isDevelopmentEnvironment() ? "/geluke" : ""); + return "http://geluke.fangjia.com"; } public final String getWwwUrl() { - return WWW_URL; + return "http://geluke.fangjia.com"; } public final Date getNow() { @@ -270,7 +270,7 @@ public class BaseModel extends ModelAndViewSupport { } public final String getCityUrl() { - return CONFIG.getCityDomainName() + getRoot(); + return "http://geluke.fangjia.com"; } public final String getDomain() { From c23a9a10fcbbb915e6e3cf0e55bea1d01fff761a Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 20:47:32 +0800 Subject: [PATCH 11/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliverables/k8s/geluke.yaml | 2 +- .../controllers/DistrictController.java | 2 +- .../src/main/webapp/header/change_city.ftl | 65 +++++++++---------- 3 files changed, 33 insertions(+), 36 deletions(-) diff --git a/deliverables/k8s/geluke.yaml b/deliverables/k8s/geluke.yaml index d43501cd6..93c1e1f10 100644 --- a/deliverables/k8s/geluke.yaml +++ b/deliverables/k8s/geluke.yaml @@ -42,7 +42,7 @@ spec: readinessProbe: tcpSocket: port: 8080 - initialDelaySeconds: 5 + initialDelaySeconds: 10 periodSeconds: 10 livenessProbe: tcpSocket: diff --git a/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java b/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java index 7f0f840b6..0a63502c3 100644 --- a/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java +++ b/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java @@ -27,7 +27,7 @@ public class DistrictController { List regions = districtService.getRegionByCity(model.getCityName()); Map> map = openSearchService.parseResult(content, regions, model.getKeywords()); if(map.size() == 0){ - List districts = districtService.findNewDistrict(model.getCityName(), model.getKeywords()); + List districts = districtService.findByKeyword(model.getCityName(), model.getKeywords()); map = openSearchService.createResult(districts); } JsonModel ret = new JsonModel(); diff --git a/projects/geluke/src/main/webapp/header/change_city.ftl b/projects/geluke/src/main/webapp/header/change_city.ftl index 565630c82..b2c9fc902 100644 --- a/projects/geluke/src/main/webapp/header/change_city.ftl +++ b/projects/geluke/src/main/webapp/header/change_city.ftl @@ -23,58 +23,55 @@ id="changecity">
  • 鍗庝笢鍩庡競
  • 鍗庡寳涓滃寳
  • 鍗庡崡鍗庝腑
  • 瑗块儴鍩庡競
  • - -
  • <#--鍦板浘鍩庡競鍒囨崲 end--> \ No newline at end of file From aa5593d836909a1258402756a50ed7a865807649 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 20:56:28 +0800 Subject: [PATCH 12/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/webapp/header/change_city.ftl | 62 +++++++++---------- .../src/main/webapp/header/header_map.ftl | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/projects/geluke/src/main/webapp/header/change_city.ftl b/projects/geluke/src/main/webapp/header/change_city.ftl index b2c9fc902..c0b59e53c 100644 --- a/projects/geluke/src/main/webapp/header/change_city.ftl +++ b/projects/geluke/src/main/webapp/header/change_city.ftl @@ -23,53 +23,53 @@ id="changecity">
  • 鍗庝笢鍩庡競
  • 鍗庡寳涓滃寳
  • 鍗庡崡鍗庝腑
  • 瑗块儴鍩庡競
  • diff --git a/projects/geluke/src/main/webapp/header/header_map.ftl b/projects/geluke/src/main/webapp/header/header_map.ftl index e6dc0d09f..19925acd2 100644 --- a/projects/geluke/src/main/webapp/header/header_map.ftl +++ b/projects/geluke/src/main/webapp/header/header_map.ftl @@ -28,7 +28,7 @@ $(document).ready(function(){ $("#_h_logout").click(function(){ jQuery.ajax({ type: "get", - url: "http://" + location.host + "${root}/user/logout", + url: "http://geluke.fangjia.com/user/logout", dataType:'json', success: function(msg){ location.href = '${cityUrl}'; From c9fb520929daaf41d51b4e88eba607adf6a1464d Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 21:08:01 +0800 Subject: [PATCH 13/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/DistrictController.java | 2 +- .../geluke/src/main/webapp/map/cityNavi.ftl | 20 +------------------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java b/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java index 0a63502c3..ba42a82b5 100644 --- a/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java +++ b/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java @@ -27,7 +27,7 @@ public class DistrictController { List regions = districtService.getRegionByCity(model.getCityName()); Map> map = openSearchService.parseResult(content, regions, model.getKeywords()); if(map.size() == 0){ - List districts = districtService.findByKeyword(model.getCityName(), model.getKeywords()); + List districts = districtService.findByKeyword(model.getCityName(), model.getKeywords(), "district"); map = openSearchService.createResult(districts); } JsonModel ret = new JsonModel(); diff --git a/projects/geluke/src/main/webapp/map/cityNavi.ftl b/projects/geluke/src/main/webapp/map/cityNavi.ftl index f4d08c9b5..7e8a3197c 100644 --- a/projects/geluke/src/main/webapp/map/cityNavi.ftl +++ b/projects/geluke/src/main/webapp/map/cityNavi.ftl @@ -200,27 +200,9 @@ From 21786f57fa44be882d0b21da66778b3abc38a42c Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 21:18:00 +0800 Subject: [PATCH 14/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fangjia/geluke/controllers/DistrictController.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java b/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java index ba42a82b5..cbc446e97 100644 --- a/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java +++ b/projects/geluke/src/main/java/com/fangjia/geluke/controllers/DistrictController.java @@ -22,14 +22,8 @@ public class DistrictController { private DistrictService districtService; public Object loadDistrictAction(DistrictModel model, HttpServletRequest request){ - String url = openSearchService.createQueryUrl(model.getCityName(), model.getKeywords(), false); - String content = openSearchService.findResultByUrl(url); - List regions = districtService.getRegionByCity(model.getCityName()); - Map> map = openSearchService.parseResult(content, regions, model.getKeywords()); - if(map.size() == 0){ - List districts = districtService.findByKeyword(model.getCityName(), model.getKeywords(), "district"); - map = openSearchService.createResult(districts); - } + List districts = districtService.findDistrictByKeyword(model.getCityName(), model.getKeywords(), 10); + Map> map = openSearchService.createResult(districts); JsonModel ret = new JsonModel(); ret.setJsonModel(map); return ret; From ca80547d9b88b64dbc7755f59836e9c7e2f0116d Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 21:24:30 +0800 Subject: [PATCH 15/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fangjia/service/datastore/DistrictServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/DistrictServiceImpl.java b/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/DistrictServiceImpl.java index 19e45d136..bea9e7589 100644 --- a/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/DistrictServiceImpl.java +++ b/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/DistrictServiceImpl.java @@ -2495,10 +2495,12 @@ public class DistrictServiceImpl implements DistrictService { params.add(new QueryParam("visible", 0)); params.add(new QueryParam("city", city)); params.add(new QueryParam("category", "district")); - params.add(new QueryParam("keyword", keyword)); - Query query = boostQueryDistrictPolicy.create(ServiceUtil.removeAndGetKeyword(params)); - if (query != null) { - params.add(new QueryParam(QueryParam.SR_PARAM_NAME, new SrQuery(query))); + if (StringUtils.isNotBlank(keyword)) { + BooleanQuery query = new BooleanQuery(); + Query q1 = new TermQuery(new Term("keyword", keyword)); + q1.setBoost(0.99f); + query.add(q1, Occur.SHOULD); + params.add(new QueryParam("$sr", new SrQuery(query))); } return districtDao.findAllByParams(params, limit); } From f5bfc5570710c45f0ebd77c19f4f0a34f64530cb Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 21:37:09 +0800 Subject: [PATCH 16/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/geluke/src/main/webapp/map/index.ftl | 1533 +++++++++-------- 1 file changed, 767 insertions(+), 766 deletions(-) diff --git a/projects/geluke/src/main/webapp/map/index.ftl b/projects/geluke/src/main/webapp/map/index.ftl index 43e39e199..10a0d3ba4 100644 --- a/projects/geluke/src/main/webapp/map/index.ftl +++ b/projects/geluke/src/main/webapp/map/index.ftl @@ -1,766 +1,767 @@ -<#ftl attributes={"content_type":"text/html; charset=UTF-8"}> -<#compress> - - - - -geluke - - - - - - - - - -
    - -

    鏁憡鐢ㄦ埛锛�

    - 鎮ㄥ綋鍓嶇殑娴忚鍣ㄥ彲鑳芥棤娉曡緝濂界殑鏀寔鏈郴缁燂紝璇蜂娇鐢‵ireFox锛堢伀鐙愶級 鎴� Chrome锛堣胺姝岋級娴忚鍣ㄤ互杈惧埌瀹岀編浣撻獙锛� -
    - -<#include "/header/top.ftl" /> -
    -
    - -
    - -
    - -
    -
    - ${cityName!} - [閫夋嫨鍩庡競] -
    - -
    - - <#--
    - ${name!} 閫�鍑� -
    --> -
    -
    - - <#include "../header/header_map.ftl" /> - - - - - -
    -
    -
    - - -
    -
    - -
    -
    - - - -
    - - - <#--
    - <#if (otherShops??&&otherShops?size>0)> - <#list otherShops as shopName> -

    - - -
    --> - -
    -
    - 娓╅Θ鎻愮ず锛� -
    鐢变簬鏁版嵁杈冨锛屾暟鎹皢鍦ㄥ湴鍥炬斁澶у埌涓�瀹氱殑绾у埆鍚庢樉绀�
    -
    - -
    -
    - - -
    -
    -
    0绫�
    -
    - - - - -
    - -
    -
    -
      -
    - -
      -
    • - - - - -
    • - -
    - -
      -
    • - - - - -
    • -
    -
    -
    -
    -
    -
    -
    - - -
    - <#----> -
    - - 姝e湪鍔姏鍔犺浇鏁版嵁锛岃绋嶅��...... -
    -
    - 鍔犺浇鏁版嵁澶锛岃鏀惧ぇ鍦板浘...... -
    - <#-- -
    -
    - --> -
    - <#--
    --> - <#--
    --> - <#if (supportAuto==1)> -
    鑷姩鍟嗗湀
    - - -
    - 浜哄彛灞曠ず -
    -
      -
    • -
    • -
    • -
    • -
    -
    -
    -
    - 鑱氬鐐瑰睍绀� -
    -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • - <#if (supportHot==1)> -
    • - -
    -
    -
    - -
    淇濆瓨鍟嗗湀
    - -
    - 灞呮皯鎴锋暟锛�-鎴� - 灏忓尯鍧囦环锛�-鍏� - 鍔炲叕浜烘暟锛�-浜� - -
    - - -
    -
    -
    -
      -
    • 鏂版潙
    • -
    • 鏅�氬晢鍝佹埧
    • -
    • 楂樼骇鍟嗗搧鎴�
    • -
    • 鍐欏瓧妤�
    • -
    -
    -
    -
      -
    •  
    • -
    • 鍦ㄥ缓鏅�氬晢鍝佹埧
    • -
    • 鍦ㄥ缓楂樼骇鍟嗗搧鎴�
    • -
    • 鍦ㄥ缓鍐欏瓧妤�
    • -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    鐑害浣�
    -
    鐑害楂�
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    鏃�
    -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    鏃�
    -
    -
    - - - -
    -
    -
    -
    -
    - - -
    - - 璇峰厛纭畾闂ㄥ簵浣嶇疆 -
    - -
    -
    X
    -
    璇风偣鍑� 纭鍦板潃 鎴� 鎷栨嫿 鍒版偍闇�瑕佺殑鍦板潃鐒跺悗纭畾
    -
    - - -
    - 寮�鍚儹鍔涘浘 -
    -
      -
    • -
    • -
    • - <#--
    • --> - <#--
    • --> -
    -
    -
    - -
    - 寮�鍚綉鏍煎浘 - -
    -
      -
    • -
    • -
    • -
    -
    -
    - - - -
    -
    - -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - -

    -
    - - - - - - - - - - - - - - - - - - - - - +<#ftl attributes={"content_type":"text/html; charset=UTF-8"}> +<#compress> + + + + +geluke + + + + + + + + + +
    + +

    鏁憡鐢ㄦ埛锛�

    + 鎮ㄥ綋鍓嶇殑娴忚鍣ㄥ彲鑳芥棤娉曡緝濂界殑鏀寔鏈郴缁燂紝璇蜂娇鐢‵ireFox锛堢伀鐙愶級 鎴� Chrome锛堣胺姝岋級娴忚鍣ㄤ互杈惧埌瀹岀編浣撻獙锛� +
    + +<#include "/header/top.ftl" /> +
    +
    + +
    + +
    + +
    +
    + ${cityName!} + [閫夋嫨鍩庡競] +
    + +
    + + <#--
    + ${name!} 閫�鍑� +
    --> +
    +
    + + <#include "../header/header_map.ftl" /> + + + + + +
    +
    +
    + + +
    +
    + +
    +
    + + + +
    + + + <#--
    + <#if (otherShops??&&otherShops?size>0)> + <#list otherShops as shopName> +

    + + +
    --> + +
    +
    + 娓╅Θ鎻愮ず锛� +
    鐢变簬鏁版嵁杈冨锛屾暟鎹皢鍦ㄥ湴鍥炬斁澶у埌涓�瀹氱殑绾у埆鍚庢樉绀�
    +
    + +
    +
    + + +
    +
    +
    0绫�
    +
    + + + + +
    + +
    +
    +
      +
    + +
      +
    • + + + + +
    • + +
    + +
      +
    • + + + + +
    • +
    +
    +
    +
    +
    +
    +
    + + +
    + <#----> +
    + + 姝e湪鍔姏鍔犺浇鏁版嵁锛岃绋嶅��...... +
    +
    + 鍔犺浇鏁版嵁澶锛岃鏀惧ぇ鍦板浘...... +
    + <#-- +
    +
    + --> +
    + <#--
    --> + <#--
    --> + <#if (supportAuto==1)> +
    鑷姩鍟嗗湀
    + + +
    + 浜哄彛灞曠ず +
    +
      +
    • +
    • +
    • +
    • +
    +
    +
    +
    + 鑱氬鐐瑰睍绀� +
    +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • + <#if (supportHot==1)> +
    • + +
    +
    +
    + +
    淇濆瓨鍟嗗湀
    + +
    + 灞呮皯鎴锋暟锛�-鎴� + 灏忓尯鍧囦环锛�-鍏� + 鍔炲叕浜烘暟锛�-浜� + +
    + + +
    +
    +
    +
      +
    • 鏂版潙
    • +
    • 鏅�氬晢鍝佹埧
    • +
    • 楂樼骇鍟嗗搧鎴�
    • +
    • 鍐欏瓧妤�
    • +
    +
    +
    +
      +
    •  
    • +
    • 鍦ㄥ缓鏅�氬晢鍝佹埧
    • +
    • 鍦ㄥ缓楂樼骇鍟嗗搧鎴�
    • +
    • 鍦ㄥ缓鍐欏瓧妤�
    • +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    鐑害浣�
    +
    鐑害楂�
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    鏃�
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    鏃�
    +
    +
    + + + +
    +
    +
    +
    +
    + + +
    + + 璇峰厛纭畾闂ㄥ簵浣嶇疆 +
    + +
    +
    X
    +
    璇风偣鍑� 纭鍦板潃 鎴� 鎷栨嫿 鍒版偍闇�瑕佺殑鍦板潃鐒跺悗纭畾
    +
    + + +
    + 寮�鍚儹鍔涘浘 +
    +
      +
    • +
    • +
    • + <#--
    • --> + <#--
    • --> +
    +
    +
    + +
    + 寮�鍚綉鏍煎浘 + +
    +
      +
    • +
    • +
    • +
    +
    +
    + + + +
    +
    + +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + +

    +
    + + + + + + + + + + + + + + + + + + + + + From 0fe2e47e163b18e3b843125235fdd12c8b0fc40b Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Thu, 22 Apr 2021 21:47:51 +0800 Subject: [PATCH 17/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockers=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/geluke/src/main/webapp/map/index.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/geluke/src/main/webapp/map/index.ftl b/projects/geluke/src/main/webapp/map/index.ftl index 10a0d3ba4..5dc9aa1eb 100644 --- a/projects/geluke/src/main/webapp/map/index.ftl +++ b/projects/geluke/src/main/webapp/map/index.ftl @@ -492,7 +492,7 @@ body, html{width: 100%;height: 100%;overflow: hidden;margin:0;} -