diff --git a/deliverables/script/pom.xml b/deliverables/script/pom.xml
index ada5f00bf..dd64b628e 100644
--- a/deliverables/script/pom.xml
+++ b/deliverables/script/pom.xml
@@ -7,7 +7,7 @@
0.0.1-SNAPSHOT
script
- GBK
+ UTF-8
script
diff --git a/projects/Selenium/src/test/java/FetchPageToDB.java b/projects/Selenium/src/test/java/FetchPageToDB.java
index b25a871a0..1ff6affa0 100644
--- a/projects/Selenium/src/test/java/FetchPageToDB.java
+++ b/projects/Selenium/src/test/java/FetchPageToDB.java
@@ -24,18 +24,18 @@ public class FetchPageToDB {
private StringBuffer verificationErrors = new StringBuffer();
private Set URLset = new HashSet();
- private String baseUrl = "http://bol.szhome.com/";//基础url
- private String firstEndUrl = "/search.aspx";//用基础url拼接成进入页面第一个URl
- private String detailStartUrl = "";//把它作为前置Url拼接A标记的href,
- static final String CITY = "深圳";//城市
- static final String SITE_NAME = "深圳房地产信息网";//网站名称
- static final String PAGE_NAME = "详细信息";//页面类型
+ private String baseUrl = "http://bol.szhome.com/";//鍩虹url
+ private String firstEndUrl = "/search.aspx";//鐢ㄥ熀纭�url鎷兼帴鎴愯繘鍏ラ〉闈㈢涓�涓猆Rl
+ private String detailStartUrl = "";//鎶婂畠浣滀负鍓嶇疆Url鎷兼帴A鏍囪鐨刪ref锛�
+ static final String CITY = "娣卞湷";//鍩庡競
+ static final String SITE_NAME = "娣卞湷鎴垮湴浜т俊鎭綉";//缃戠珯鍚嶇О
+ static final String PAGE_NAME = "璇︾粏淇℃伅";//椤甸潰绫诲瀷
static final String CATEGORY = "district";
- static final String charset = "utf-8";//编码格式utf-8
- static final String nextPageStr = ">";//下一页按钮的文本内容一般为:“下一页”or">"
- static final int BreakPointpageCount = 1; //断点位置页数(即为开始页)
- static final int pageCount = 200; //分页总数
- static final String selectAeleStr = ".imgdiv a";//每页内容中选择到详细页面url标记
+ static final String charset = "utf-8";//缂栫爜鏍煎紡utf-8
+ static final String nextPageStr = ">";//涓嬩竴椤垫寜閽殑鏂囨湰鍐呭涓�鑸负锛氣�滀笅涓�椤碘�漮r">"
+ static final int BreakPointpageCount = 1; //鏂偣浣嶇疆椤垫暟锛堝嵆涓哄紑濮嬮〉锛�
+ static final int pageCount = 200; //鍒嗛〉鎬绘暟
+ static final String selectAeleStr = ".imgdiv a";//姣忛〉鍐呭涓�夋嫨鍒拌缁嗛〉闈rl鏍囪
@Before
public void setUp() throws Exception {
@@ -50,25 +50,25 @@ public class FetchPageToDB {
driver.get(baseUrl + firstEndUrl);
- dryRun(driver,BreakPointpageCount);//空跑到断点页面
- fetchDetail(driver);//获取第一个页面的内容
+ dryRun(driver,BreakPointpageCount);//绌鸿窇鍒版柇鐐归〉闈�
+ fetchDetail(driver);//鑾峰彇绗竴涓〉闈㈢殑鍐呭
- System.out.printf("处理完成第%d页\r\n",BreakPointpageCount);
+ System.out.printf("澶勭悊瀹屾垚绗�%d椤礬r\n",BreakPointpageCount);
- for(int i=BreakPointpageCount+1;i<=pageCount;i++) { //循环分页处理页面内容
+ for(int i=BreakPointpageCount+1;i<=pageCount;i++) { //寰幆鍒嗛〉澶勭悊椤甸潰鍐呭
Thread.sleep(500);
WebDriverWait webDriverWait = new WebDriverWait(driver, 10);
webDriverWait.until(ExpectedConditions.presenceOfElementLocated(By.linkText(nextPageStr))).click();
fetchDetail(driver);
- System.out.printf("处理完成第%d页\r\n",i);
+ System.out.printf("澶勭悊瀹屾垚绗�%d椤礬r\n",i);
}
}
/**
- * 空跑到上一个发生错误的页面
+ * 绌鸿窇鍒颁笂涓�涓彂鐢熼敊璇殑椤甸潰
* @param driver
* @param BreakPointpageCount
* @throws InterruptedException
@@ -87,7 +87,7 @@ public class FetchPageToDB {
}
/**
- * 获取页面详细内容保存到数据库
+ * 鑾峰彇椤甸潰璇︾粏鍐呭淇濆瓨鍒版暟鎹簱
* @param driver
*/
public void fetchDetail(WebDriver driver){
@@ -101,7 +101,7 @@ public class FetchPageToDB {
}
String detailContent = InvokeHttpRequest.get(detailUrl, charset,null);
URLset.add(detailUrl);
- SaveToWebpage.DataSaveToWebpage(CITY, SITE_NAME, PAGE_NAME, CATEGORY, detailUrl, detailContent);//保存数据
+ SaveToWebpage.DataSaveToWebpage(CITY, SITE_NAME, PAGE_NAME, CATEGORY, detailUrl, detailContent);//淇濆瓨鏁版嵁
}
}
@After
diff --git a/projects/Selenium/src/test/java/FetchPageUtil.java b/projects/Selenium/src/test/java/FetchPageUtil.java
index d6cead1b4..da823ce6e 100644
--- a/projects/Selenium/src/test/java/FetchPageUtil.java
+++ b/projects/Selenium/src/test/java/FetchPageUtil.java
@@ -22,7 +22,7 @@ public class FetchPageUtil {
/**
- * 打印传入页面渲染后的源码
+ * 鎵撳嵃浼犲叆椤甸潰娓叉煋鍚庣殑婧愮爜
* @param url
* @throws InterruptedException
*/
@@ -33,7 +33,7 @@ public class FetchPageUtil {
driver.quit();
}
/**
- * 打印页面源码和选择器匹配后的结果
+ * 鎵撳嵃椤甸潰婧愮爜鍜岄�夋嫨鍣ㄥ尮閰嶅悗鐨勭粨鏋�
* @param url
* @param selectStr
* @throws InterruptedException
@@ -46,7 +46,7 @@ public class FetchPageUtil {
driver.quit();
}
/**
- * 测试分页是否正常运行
+ * 娴嬭瘯鍒嗛〉鏄惁姝e父杩愯
* @param url
* @param nextStr
* @throws InterruptedException
@@ -75,8 +75,8 @@ public class FetchPageUtil {
}
@Test
public void runMain() throws InterruptedException{
- //printPageSource("http://bol.szhome.com/search.aspx");//第一步,查看分页的渲染后源码
- printselects("http://bol.szhome.com/search.aspx",".imgdiv a");//根据源码写出选择器String
- //TestNext("http://bol.szhome.com/search.aspx",">");//测试分页
+ //printPageSource("http://bol.szhome.com/search.aspx");//绗竴姝ワ紝鏌ョ湅鍒嗛〉鐨勬覆鏌撳悗婧愮爜
+ printselects("http://bol.szhome.com/search.aspx",".imgdiv a");//鏍规嵁婧愮爜鍐欏嚭閫夋嫨鍣⊿tring
+ //TestNext("http://bol.szhome.com/search.aspx",">");//娴嬭瘯鍒嗛〉
}
}
diff --git a/projects/Selenium/src/test/java/JQueryUtils.java b/projects/Selenium/src/test/java/JQueryUtils.java
index f7d9091fd..63a5c8317 100644
--- a/projects/Selenium/src/test/java/JQueryUtils.java
+++ b/projects/Selenium/src/test/java/JQueryUtils.java
@@ -46,7 +46,7 @@ public class JQueryUtils {
try{
if(repeatTimes>0){
Thread.sleep(1000);
- System.out.println( "准备尝试第"+(repeatTimes+1)+"次请求:$url");
+ System.out.println( "鍑嗗灏濊瘯绗�"+(repeatTimes+1)+"娆¤姹�:$url");
}
doc = Jsoup.parse(new URL(url), 5*1000);
if(doc != null){
@@ -58,7 +58,7 @@ public class JQueryUtils {
}
if(doc==null){
- System.out.println("检测到不可访问链接:$url");
+ System.out.println("妫�娴嬪埌涓嶅彲璁块棶閾炬帴:$url");
}
return doc;
}
@@ -69,7 +69,7 @@ public class JQueryUtils {
try{
if(repeatTimes>0){
Thread.sleep(1000);
- System.out.println("准备尝试第"+(repeatTimes+1)+"次请求:$url");
+ System.out.println("鍑嗗灏濊瘯绗�"+(repeatTimes+1)+"娆¤姹�:$url");
}
URL _url = new URL(url);
input = _url.openStream();
@@ -92,7 +92,7 @@ public class JQueryUtils {
}
if(doc==null){
- System.out.println("检测到不可访问链接:$url");
+ System.out.println("妫�娴嬪埌涓嶅彲璁块棶閾炬帴:$url");
}
return doc;
}
diff --git a/projects/Selenium/src/test/java/SaveToWebpage.java b/projects/Selenium/src/test/java/SaveToWebpage.java
index 8a370dea3..c7e79c19f 100644
--- a/projects/Selenium/src/test/java/SaveToWebpage.java
+++ b/projects/Selenium/src/test/java/SaveToWebpage.java
@@ -70,7 +70,7 @@ public class SaveToWebpage {
}
/**
- * 压缩
+ * 鍘嬬缉
*
* @param content
* @return
diff --git a/projects/chafangtong-dal/pom.xml b/projects/chafangtong-dal/pom.xml
index afed2c105..67a90e17a 100644
--- a/projects/chafangtong-dal/pom.xml
+++ b/projects/chafangtong-dal/pom.xml
@@ -7,7 +7,7 @@
0.0.1-SNAPSHOT
chafangtong-dal
- GBK
+ UTF-8
chafangtong-dal
@@ -19,7 +19,7 @@
1.6
1.6
- GBK
+ UTF-8
diff --git a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkApplyCount.java b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkApplyCount.java
index 596b70edd..9217c3cc8 100644
--- a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkApplyCount.java
+++ b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkApplyCount.java
@@ -10,7 +10,7 @@ import javax.persistence.Table;
import com.fangjia.dal.MongoEntity;
/**
- * 房评卡用户反馈表
+ * 鎴胯瘎鍗$敤鎴峰弽棣堣〃
*
*/
@Entity
diff --git a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkDownload.java b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkDownload.java
index ba403c2b2..b1cd97784 100644
--- a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkDownload.java
+++ b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkDownload.java
@@ -11,7 +11,7 @@ import javax.persistence.Table;
import com.fangjia.dal.MongoEntity;
/**
- * 房评卡报告下载记录表
+ * 鎴胯瘎鍗℃姤鍛婁笅杞借褰曡〃
*
*/
@Entity
@@ -25,9 +25,9 @@ public class FpkDownload implements MongoEntity {
private String city;
private String region;
private String districtName;
- private int actionType;//1:住宅 2:商铺
- private int valid; //0:有效 1:无效
- // TODO 按需求加字段 如:报告的一些信息
+ private int actionType;//1:浣忓畢 2锛氬晢閾�
+ private int valid; //0锛氭湁鏁� 1锛氭棤鏁�
+ // TODO 鎸夐渶姹傚姞瀛楁 濡傦細鎶ュ憡鐨勪竴浜涗俊鎭�
private Date downloadDate;
private String userName;
private String roleName;
diff --git a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkFeedback.java b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkFeedback.java
index 6b04a11fa..9a2e9c21c 100644
--- a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkFeedback.java
+++ b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkFeedback.java
@@ -11,7 +11,7 @@ import javax.persistence.Table;
import com.fangjia.dal.MongoEntity;
/**
- * 房评卡用户反馈表
+ * 鎴胯瘎鍗$敤鎴峰弽棣堣〃
*
*/
@Entity
diff --git a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkMenu.java b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkMenu.java
index 694925e40..b47b4b112 100644
--- a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkMenu.java
+++ b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkMenu.java
@@ -11,7 +11,7 @@ import javax.persistence.Table;
import com.fangjia.dal.MongoEntity;
/**
- * 房评卡菜单表
+ * 鎴胯瘎鍗¤彍鍗曡〃
*
*/
@Entity
@@ -20,10 +20,10 @@ public class FpkMenu implements MongoEntity {
private static final long serialVersionUID = -6309545731097038246L;
private String id;
- private String name; // 名称
- private String type; // 类型 目前分住宅、商铺
- private String uri; // 访问地址 如:/local/shop
- private int sn; // 序号 从小到大排序
+ private String name; // 鍚嶇О
+ private String type; // 绫诲瀷 鐩墠鍒嗕綇瀹呫�佸晢閾�
+ private String uri; // 璁块棶鍦板潃 濡傦細/local/shop
+ private int sn; // 搴忓彿 浠庡皬鍒板ぇ鎺掑簭
private Date creationDate;
private Date modificationDate;
diff --git a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkRole.java b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkRole.java
index 685e9d664..21204cc49 100644
--- a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkRole.java
+++ b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkRole.java
@@ -12,7 +12,7 @@ import javax.persistence.Table;
import com.fangjia.dal.MongoEntity;
/**
- * 角色
+ * 瑙掕壊
*
*/
@Entity
@@ -21,9 +21,9 @@ public class FpkRole implements MongoEntity {
private static final long serialVersionUID = 6346725824282407782L;
private String id;
- private String name; // 名称
- private String desc; // 描述
- private List menuStrs; // 权限菜单 有序
+ private String name; // 鍚嶇О
+ private String desc; // 鎻忚堪
+ private List menuStrs; // 鏉冮檺鑿滃崟 鏈夊簭
private Date creationDate;
private Date modificationDate;
diff --git a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkUsers.java b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkUsers.java
index 3b42b3f88..3299e59a1 100644
--- a/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkUsers.java
+++ b/projects/chafangtong-dal/src/main/java/com/fangjia/chafangtong/dal/mongo/model/FpkUsers.java
@@ -12,7 +12,7 @@ import javax.persistence.Table;
import com.fangjia.dal.MongoEntity;
/**
- * 房评卡用户表
+ * 鎴胯瘎鍗$敤鎴疯〃
*
*/
@Entity
@@ -26,10 +26,10 @@ public class FpkUsers implements MongoEntity {
private String name;
private String password;
private boolean enabled;
- private String role; // 用户类型
- private Date creationDate; // 创建日期
- private Date modificationDate; // 修改日期
- private Date expiryDate; // 有效期(截至日期)
+ private String role; // 鐢ㄦ埛绫诲瀷
+ private Date creationDate; // 鍒涘缓鏃ユ湡
+ private Date modificationDate; // 淇敼鏃ユ湡
+ private Date expiryDate; // 鏈夋晥鏈燂紙鎴嚦鏃ユ湡锛�
private int fangpingApplyAdd;
private int fangpingApplyCount;
private int fangpingDownloadCount;
@@ -37,8 +37,8 @@ public class FpkUsers implements MongoEntity {
private int shopApplyCount;
private int shopDownloadCount;
private String company;
- private List propertySupportCitys; // 住宅开通城市
- private List shopSupportCitys; //商铺开通城市
+ private List propertySupportCitys; // 浣忓畢寮�閫氬煄甯�
+ private List shopSupportCitys; //鍟嗛摵寮�閫氬煄甯�
private String email;
private String defaultCity;
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/ChafangtongContextLoaderListener.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/ChafangtongContextLoaderListener.java
index 0daa1db19..4255162ee 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/ChafangtongContextLoaderListener.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/ChafangtongContextLoaderListener.java
@@ -32,7 +32,7 @@ public class ChafangtongContextLoaderListener extends ContextLoaderListener {
}
super.contextInitialized(event);
- // 预热
+ // 棰勭儹
if (LOGGER.isInfoEnabled()) {
LOGGER.info("warm up keyword links...");
}
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/AroundController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/AroundController.java
index d10585db8..659a50633 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/AroundController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/AroundController.java
@@ -30,7 +30,7 @@ import com.fangjia.dal.seaweed.model.District;
import com.fangjia.service.mongo.fangjia.BusStationService;
/**
- * 环境指数
+ * 鐜鎸囨暟
* @author yk
*
*/
@@ -54,13 +54,13 @@ public class AroundController extends BaseController {
double lng = district.getLng2()/10000000000d;
double radius = getRadius();
Map> stationMap = busStationService.getNearByStations(city, lat, lng, radius);
- model.setMetroStations(stationMap.get("地铁"));
- model.setBusStations(stationMap.get("公交"));
+ model.setMetroStations(stationMap.get("鍦伴搧"));
+ model.setBusStations(stationMap.get("鍏氦"));
- String[] ks = new String[] { "医院", "学校", "写字楼", "银行", "ATM", "超市", "停车场", "公园", "机场", "网吧" };
+ String[] ks = new String[] { "鍖婚櫌", "瀛︽牎", "鍐欏瓧妤�", "閾惰", "ATM", "瓒呭競", "鍋滆溅鍦�", "鍏洯", "鏈哄満", "缃戝惂" };
- //厌恶设施
- String[] keys = new String[]{"发电厂","变电站","垃圾焚烧厂","化工厂"};
+ //鍘屾伓璁炬柦
+ String[] keys = new String[]{"鍙戠數鍘�","鍙樼數绔�","鍨冨溇鐒氱儳鍘�","鍖栧伐鍘�"};
Map countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
@@ -71,24 +71,24 @@ public class AroundController extends BaseController {
JSONObject json = baiduApiService.searchNearby(keys[i], lat, lng, 1000, model.getBaiduMapKey());
countMap.put(keys[i], getTotal(json));
}
- countMap.put("地铁站", null == model.getMetroStations() ? null : model.getMetroStations().size());
- countMap.put("公交点", null == model.getBusStations() ? null : model.getBusStations().size());
+ countMap.put("鍦伴搧绔�", null == model.getMetroStations() ? null : model.getMetroStations().size());
+ countMap.put("鍏氦鐐�", null == model.getBusStations() ? null : model.getBusStations().size());
- // 虹桥机场 121.352578,31.200062
- // 浦东机场 121.807085,31.160702
+ // 铏规ˉ鏈哄満 121.352578,31.200062
+ // 娴︿笢鏈哄満 121.807085,31.160702
double dis = GeoUtils.calculateDistance(lng, lat, 121.352578, 31.200062);
if (dis <= radius) {
- model.setAirPort("虹桥机场");
+ model.setAirPort("铏规ˉ鏈哄満");
model.setAirPortLat(31.200062);
model.setAirPortLng(121.352578);
- countMap.put("机场", 1);
+ countMap.put("鏈哄満", 1);
} else {
dis = GeoUtils.calculateDistance(lng, lat, 121.807085, 31.160702);
if (dis <= radius) {
- model.setAirPort("浦东机场");
+ model.setAirPort("娴︿笢鏈哄満");
model.setAirPortLat(31.160702);
model.setAirPortLng(121.807085);
- countMap.put("机场", 1);
+ countMap.put("鏈哄満", 1);
}
}
@@ -120,22 +120,22 @@ public class AroundController extends BaseController {
double lng = mall.getLng2()/10000000000d;
double radius = getRadius();
Map> stationMap = busStationService.getNearByStations(city, lat, lng, radius);
- model.setMetroStations(stationMap.get("地铁"));
- model.setBusStations(stationMap.get("公交"));
+ model.setMetroStations(stationMap.get("鍦伴搧"));
+ model.setBusStations(stationMap.get("鍏氦"));
- String[] ks = new String[] { "医院", "公园", "学校", "体育馆" };
+ String[] ks = new String[] { "鍖婚櫌", "鍏洯", "瀛︽牎", "浣撹偛棣�" };
Map countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
JSONObject json = baiduApiService.searchNearby(ks[i], lat, lng, radius, model.getBaiduMapKey());
countMap.put(ks[i], getTotal(json));
}
- countMap.put("地铁站", null == model.getMetroStations() ? null : model.getMetroStations().size());
- countMap.put("公交点", null == model.getBusStations() ? null : model.getBusStations().size());
+ countMap.put("鍦伴搧绔�", null == model.getMetroStations() ? null : model.getMetroStations().size());
+ countMap.put("鍏氦鐐�", null == model.getBusStations() ? null : model.getBusStations().size());
double score1 = ShopScoreUtil.aroundScore1(countMap);
model.setScore1(score1);
- ks = new String[] { "银行", "商场", "大型超市", "餐饮" };
+ ks = new String[] { "閾惰", "鍟嗗満", "澶у瀷瓒呭競", "椁愰ギ" };
countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
JSONObject json = baiduApiService.searchNearby(ks[i], lat, lng, radius, model.getBaiduMapKey());
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/AutocompleteController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/AutocompleteController.java
index 0ef933fc8..f29098afa 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/AutocompleteController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/AutocompleteController.java
@@ -123,7 +123,7 @@ public class AutocompleteController {
//nameQuery.add(new TermQuery(new Term("address", keyword)), Occur.SHOULD);
//nameQuery.add(new TermQuery(new Term("addr_alias_std", keyword)), Occur.SHOULD);
nameQuery.add(new TermQuery(new Term("keyword", keyword)), Occur.SHOULD);
- //nameQuery.add(new TermQuery(new Term("keyword_cjk", keyword)), Occur.SHOULD);//这个重要,因seaweed不支持模糊搜索,当输入"中远两"需用此进行搜索
+ //nameQuery.add(new TermQuery(new Term("keyword_cjk", keyword)), Occur.SHOULD);//杩欎釜閲嶈锛屽洜seaweed涓嶆敮鎸佹ā绯婃悳绱紝褰撹緭鍏�"涓繙涓�"闇�鐢ㄦ杩涜鎼滅储
srQuery1.add(nameQuery, Occur.SHOULD);
params.add(new QueryParam("$sr", new SrQuery(srQuery1)));
List districts = districtService.findAllByParams(params, 0, limit, new String[] { "region", "name","address", "addrAlias" });
@@ -138,7 +138,7 @@ public class AutocompleteController {
bo.setRegion(district.getRegion());
ret.add(bo);
}
- //对自动完成出来的结果按长短排序
+ //瀵硅嚜鍔ㄥ畬鎴愬嚭鏉ョ殑缁撴灉鎸夐暱鐭帓搴�
if(ret.size() > 0){
Collections.sort(ret, new Comparator() {
public int compare(AutoCompleteBo o1, AutoCompleteBo o2) {
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/BaseController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/BaseController.java
index a2301ae88..b6cac40a2 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/BaseController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/BaseController.java
@@ -104,16 +104,16 @@ public abstract class BaseController {
}
/**
- * 根据cookie或者用户输入关键字,填充经纬度、mall信息到cookie和model
+ * 鏍规嵁cookie鎴栬�呯敤鎴疯緭鍏ュ叧閿瓧锛屽~鍏呯粡绾害銆乵all淇℃伅鍒癱ookie鍜宮odel
*/
protected void fillShop2CookieModel(ChafangtongModel model) {
- // TODO 不用每次都去seaweed查询mall,可根据是否是新提交表单、存下的mallid来查,优化性能
+ // TODO 涓嶇敤姣忔閮藉幓seaweed鏌ヨmall锛屽彲鏍规嵁鏄惁鏄柊鎻愪氦琛ㄥ崟銆佸瓨涓嬬殑mallid鏉ユ煡锛屼紭鍖栨�ц兘
HttpServletResponse response = ActionContext.getContext().getResponse();
String keyword = model.getQ();
if (StringUtils.isNotBlank(keyword)) {
Shop mall = null;
- // open地址匹配
+ // open鍦板潃鍖归厤
Map resMap = addressService.parse(model.getCityName(), keyword, "shop", false);
if (MapUtils.isNotEmpty(resMap)) {
if (resMap.containsKey("status") && (Integer) resMap.get("status") == 0 && resMap.containsKey("precise")
@@ -124,14 +124,14 @@ public abstract class BaseController {
}
if ("general".equals(model.getControllerName())) {
- // 记录用户搜索词open匹配结果
+ // 璁板綍鐢ㄦ埛鎼滅储璇峯pen鍖归厤缁撴灉
HttpServletRequest request = ActionContext.getContext().getRequest();
AddressMatchLog addressMatchLog = new AddressMatchLog();
addressMatchLog.setCity(model.getCityName());
addressMatchLog.setInput(model.getQ());
addressMatchLog.setIp(AnalyticsUtil.getIpAddress(request));
addressMatchLog.setUid(cookieContext.getCookieValue(request, "fpk_uid"));
- addressMatchLog.setSource("房评卡");
+ addressMatchLog.setSource("鎴胯瘎鍗�");
addressMatchLog.setUserName(cookieContext.getCookieValue(request, "fpk_name"));
addressMatchLog.setCreationDate(new Date());
addressMatchLog.setModificationDate(new Date());
@@ -203,7 +203,7 @@ public abstract class BaseController {
}
protected void fillDistrict2CookieModel(ChafangtongModel model) {
- // TODO 不用每次都去seaweed查询district,可根据是否是新提交表单、存下的districtid来查,优化性能
+ // TODO 涓嶇敤姣忔閮藉幓seaweed鏌ヨdistrict锛屽彲鏍规嵁鏄惁鏄柊鎻愪氦琛ㄥ崟銆佸瓨涓嬬殑districtid鏉ユ煡锛屼紭鍖栨�ц兘
HttpServletResponse response = ActionContext.getContext().getResponse();
String keyword = model.getQ();
if (StringUtils.isNotBlank(keyword)) {
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ConsumController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ConsumController.java
index 053b172fe..977bd31be 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ConsumController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ConsumController.java
@@ -31,7 +31,7 @@ import com.fangjia.dal.seaweed.model.District;
import com.fangjia.service.mongo.fangjia.BizShopService;
/**
- * 消费指数
+ * 娑堣垂鎸囨暟
* @author yk
*
*/
@@ -54,7 +54,7 @@ public class ConsumController extends BaseController {
double lat = district.getLat2()/10000000000d;
double lng = district.getLng2()/10000000000d;
double radius = getRadius();
- model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "美食"));
+ model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "缇庨"));
double cityConsumMin = model.getCityConsumMin()!=null?model.getCityConsumMin():15;
double cityConsumMax = model.getCityConsumMax()!=null?model.getCityConsumMax():150;
@@ -62,7 +62,7 @@ public class ConsumController extends BaseController {
model.setHigher((model.getAvgConsumption() - cityConsumMin) * 100.0 / (cityConsumMax - cityConsumMin));
}
- String[] ks = new String[] { "KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店","大型超市", "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴" };
+ String[] ks = new String[] { "KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵","澶у瀷瓒呭競", "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡" };
Map result = baiduApiService.searchNearBy(Arrays.asList(ks), lat, lng, 1000, model.getBaiduMapKey());
Map countMap = new HashMap(ks.length);
for (String k : ks) {
@@ -87,13 +87,13 @@ public class ConsumController extends BaseController {
// model.setAroundSell(aroundMarkers);
// }
double radius = getRadius();
- model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "餐厅"));
+ model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "椁愬巺"));
double cityConsumMin = model.getCityConsumMin();
double cityConsumMax = model.getCityConsumMax();
if (null != model.getAvgConsumption()) {
model.setHigher((model.getAvgConsumption() - cityConsumMin) * 100.0 / (cityConsumMax - cityConsumMin));
}
- String[] ks = new String[] { "KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店", "大型超市", "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴" };
+ String[] ks = new String[] { "KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵", "澶у瀷瓒呭競", "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡" };
Map result = baiduApiService.searchNearBy(Arrays.asList(ks), lat, lng, 1000, model.getBaiduMapKey());
Map countMap = new HashMap(ks.length);
for (String k : ks) {
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/FeedbackController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/FeedbackController.java
index 59d992c2a..840fec409 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/FeedbackController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/FeedbackController.java
@@ -13,7 +13,7 @@ import java.util.HashMap;
import java.util.Map;
/**
- * 意见反馈
+ * 鎰忚鍙嶉
* Created by wenyan on 2015/11/24.
*/
public class FeedbackController {
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/GeneralController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/GeneralController.java
index d06ecc3cb..88d593d76 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/GeneralController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/GeneralController.java
@@ -54,7 +54,7 @@ import com.fangjia.service.mongo.fangjia.DistrictHotService;
import com.fangjia.service.mongo.fangjia.PricePredictService;
/**
- * 首页
+ * 棣栭〉
*
* @author yk
*
@@ -92,7 +92,7 @@ public class GeneralController extends BaseController {
}
model.setDistrict(district);
- /* 坐标 */
+ /* 鍧愭爣 */
double lat = district.getLat2()/10000000000d;
double lng = district.getLng2()/10000000000d;
double radius = getRadius();
@@ -100,16 +100,16 @@ public class GeneralController extends BaseController {
String city = district.getCity();
String region = district.getRegion();
- // 房价指数
+ // 鎴夸环鎸囨暟
RegionStat cityStat = regionStatService.findByCity(model.getCityName());
DistrictStatBo statBo = districtStatService.findYearPeriodStatBo(districtKey);
model.setStatBo(statBo);
DistrictStat stat = statBo.getDefaultDistrictStat();
String estateType = district.getEstateType2();
- if(!estateType.contains("别墅")){
- estateType = "小区";
+ if(!estateType.contains("鍒")){
+ estateType = "灏忓尯";
}else{
- estateType = "别墅";
+ estateType = "鍒";
}
List rentList = new ArrayList();
Map districtStatRents = districtStatRentService.findByDistrictStatRent(districtKey, estateType);
@@ -134,13 +134,13 @@ public class GeneralController extends BaseController {
model.setPriceScore(DistrictScoreUtil.priceScore2(null == stat ? null: stat.getAvgPrice(), pricelist.get(0), pricelist.get(1), rentList));
- // 潜力指数
+ // 娼滃姏鎸囨暟
int avgPrice = 0;
- String buildType = "小区";
+ String buildType = "灏忓尯";
if (null == statBo.getDistrictStat()
&& null != statBo.getVillaDistrictStat()) {
avgPrice = statBo.getVillaDistrictStat().getAvgPrice();
- buildType = "别墅";
+ buildType = "鍒";
} else if (null != statBo.getDistrictStat()) {
avgPrice = statBo.getDistrictStat().getAvgPrice();
}
@@ -166,54 +166,54 @@ public class GeneralController extends BaseController {
}
model.setRankScore(DistrictScoreUtil.rankScore2(houseCountRatio, dealPriceCountRatio));
- // 消费指数
- Double avgConsumption = bizShopService.findAroundAvgConsumption(lat,lng, 1000, "美食");
- String[] allKw = new String[]{"KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店","大型超市", "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴","医院",
- "学校", "写字楼", "银行", "ATM", "超市", "停车场", "公园","机场", "网吧", "发电厂", "变电站", "垃圾焚烧厂", "化工厂"};
+ // 娑堣垂鎸囨暟
+ Double avgConsumption = bizShopService.findAroundAvgConsumption(lat,lng, 1000, "缇庨");
+ String[] allKw = new String[]{"KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵","澶у瀷瓒呭競", "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡","鍖婚櫌",
+ "瀛︽牎", "鍐欏瓧妤�", "閾惰", "ATM", "瓒呭競", "鍋滆溅鍦�", "鍏洯","鏈哄満", "缃戝惂", "鍙戠數鍘�", "鍙樼數绔�", "鍨冨溇鐒氱儳鍘�", "鍖栧伐鍘�"};
Map searchResult = baiduApiService.searchNearBy(Arrays.asList(allKw), lat, lng, 1000, model.getBaiduMapKey());
- String[] ks = new String[] { "KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店","大型超市", "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴" };
+ String[] ks = new String[] { "KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵","澶у瀷瓒呭競", "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡" };
Map countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
countMap.put(ks[i], getTotal(searchResult.get(ks[i])));
}
model.setConsumScore(DistrictScoreUtil.consumScore(avgConsumption,countMap));
- // 环境指数
- ks = new String[] { "医院", "学校", "写字楼", "银行", "ATM", "超市", "停车场", "公园","机场", "网吧" };
- // 厌恶设施
- String[] keys = new String[] { "发电厂", "变电站", "垃圾焚烧厂", "化工厂" };
+ // 鐜鎸囨暟
+ ks = new String[] { "鍖婚櫌", "瀛︽牎", "鍐欏瓧妤�", "閾惰", "ATM", "瓒呭競", "鍋滆溅鍦�", "鍏洯","鏈哄満", "缃戝惂" };
+ // 鍘屾伓璁炬柦
+ String[] keys = new String[] { "鍙戠數鍘�", "鍙樼數绔�", "鍨冨溇鐒氱儳鍘�", "鍖栧伐鍘�" };
countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
countMap.put(ks[i], getTotal(searchResult.get(ks[i])));
}
- // 添加厌恶设施
+ // 娣诲姞鍘屾伓璁炬柦
for (int i = 0; i < keys.length; i++) {
countMap.put(keys[i], getTotal(searchResult.get(ks[i])));
}
Map> stationMap = busStationService
.getNearByStations(city, lat, lng, 1000);
- countMap.put("地铁站", null == stationMap.get("地铁") ? null : stationMap
- .get("地铁").size());
- countMap.put("公交点", null == stationMap.get("公交") ? null : stationMap
- .get("公交").size());
+ countMap.put("鍦伴搧绔�", null == stationMap.get("鍦伴搧") ? null : stationMap
+ .get("鍦伴搧").size());
+ countMap.put("鍏氦鐐�", null == stationMap.get("鍏氦") ? null : stationMap
+ .get("鍏氦").size());
model.setAroundScore(DistrictScoreUtil.aroundScore(countMap));
- // 虹桥机场 121.352578,31.200062
- // 浦东机场 121.807085,31.160702
+ // 铏规ˉ鏈哄満 121.352578,31.200062
+ // 娴︿笢鏈哄満 121.807085,31.160702
double dis = GeoUtils
.calculateDistance(lng, lat, 121.352578, 31.200062);
if (dis <= radius) {
- countMap.put("机场", 1);
+ countMap.put("鏈哄満", 1);
} else {
dis = GeoUtils.calculateDistance(lng, lat, 121.807085, 31.160702);
if (dis <= radius) {
- countMap.put("机场", 1);
+ countMap.put("鏈哄満", 1);
}
}
- // 楼盘指数
+ // 妤肩洏鎸囨暟
model.setDetailScore(DistrictScoreUtil.detailScore(district,seaweedNumbericDao.findDistrict(city, region,district.getName())));
double totalScore = 0d;
@@ -509,12 +509,12 @@ public class GeneralController extends BaseController {
double radius = getRadius();
List metros = null;
List buses = null;
- // 综合得分
+ // 缁煎悎寰楀垎
SeaweedNumberic numberic = seaweedNumbericDao.findShop(mall.getCity(),
mall.getRegion(), mall.getName());
model.setDetailScore(ShopScoreUtil.detailScore(mall, numberic));
- // 房价
+ // 鎴夸环
BizRegionStat cityStat = bizRegionStatService.findCitySellPrice(mall.getCity(),
weekend);
DistrictStatBo statBo = shopStatService.findAllShopStat(
@@ -524,22 +524,22 @@ public class GeneralController extends BaseController {
null == cityStat ? null : cityStat.getAvgPrice()));
model.setStatBo(statBo);
- // 租金
+ // 绉熼噾
BizRegionStat cityStatRent = bizRegionStatService.findCityRentPrice(mall.getCity(), weekend);
DistrictBusinessStatRentBo statRentBo = districtBusinessStatRentService
.findMallStatBo(new DistrictKey(mall.getCity(), mall.getRegion(), mall.getName()), weekend);
model.setRentScore(ShopScoreUtil.rentScore(statRentBo,null == cityStatRent ? null : cityStatRent.getAvgPrice(), mall.getPaymentPattern()));
- // 地段
+ // 鍦版
Map> stationMap = busStationService
.getNearByStations(mall.getCity(), lat, lng, radius);
- metros = stationMap.get("地铁");
- buses = stationMap.get("公交");
+ metros = stationMap.get("鍦伴搧");
+ buses = stationMap.get("鍏氦");
model.setLocalScore(ShopScoreUtil.localScore(mall.getLoopLineInfo(),
null == metros ? 0 : metros.size(),
null == buses ? 0 : buses.size()));
- // 人口
+ // 浜哄彛
int cityAvgPrice = cityPriceLevelService.findCityPriceLevel(city);
cityAvgPrice = cityAvgPrice == 0 ? 7000 : cityAvgPrice;
@@ -547,7 +547,7 @@ public class GeneralController extends BaseController {
lng, radius);
int totalHouseCount = getTotalHouseCount(districts, cityAvgPrice);
- // 居民人口密度
+ // 灞呮皯浜哄彛瀵嗗害
double circleArea = Math.PI * Math.pow(radius / 1000.0, 2);
double density = totalHouseCount * 2.49 / circleArea;
double peopleScore1 = ShopScoreUtil.peopleScore1(density);
@@ -556,38 +556,38 @@ public class GeneralController extends BaseController {
radius);
int totalOfficeCount = getTotalOfficeCount(offices);
- // 办公人口
+ // 鍔炲叕浜哄彛
density = totalOfficeCount / circleArea;
double peopleScore2 = ShopScoreUtil.peopleScore2(density);
model.setPeopleScore(peopleScore1 > peopleScore2 ? peopleScore1
: peopleScore2);
- String[] allKs = new String[]{"KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店","大型超市", "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴",
- "医院", "公园", "学校", "体育馆","银行", "商场", "大型超市", "餐饮"
+ String[] allKs = new String[]{"KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵","澶у瀷瓒呭競", "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡",
+ "鍖婚櫌", "鍏洯", "瀛︽牎", "浣撹偛棣�","閾惰", "鍟嗗満", "澶у瀷瓒呭競", "椁愰ギ"
};
Map searchResult = baiduApiService.searchNearBy(Arrays.asList(allKs), lat, lng, radius, model.getBaiduMapKey());
- // 消费
- String[] ks = new String[] { "KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店","大型超市", "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴" };
+ // 娑堣垂
+ String[] ks = new String[] { "KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵","澶у瀷瓒呭競", "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡" };
Map countMap = new HashMap(ks.length);
for (String k : ks){
countMap.put(k, getTotal(searchResult.get(k)));
}
- Double avgConsumption = bizShopService.findAroundAvgConsumption(lat,lng, radius, "餐厅");
+ Double avgConsumption = bizShopService.findAroundAvgConsumption(lat,lng, radius, "椁愬巺");
model.setConsumScore(ShopScoreUtil.consumScore(avgConsumption, countMap));
- // 环境
- ks = new String[] { "医院", "公园", "学校", "体育馆" };
+ // 鐜
+ ks = new String[] { "鍖婚櫌", "鍏洯", "瀛︽牎", "浣撹偛棣�" };
countMap = new HashMap(ks.length);
for (String k : ks){
countMap.put(k, getTotal(searchResult.get(k)));
}
- countMap.put("地铁站", null == metros ? null : metros.size());
- countMap.put("公交点", null == buses ? null : buses.size());
+ countMap.put("鍦伴搧绔�", null == metros ? null : metros.size());
+ countMap.put("鍏氦鐐�", null == buses ? null : buses.size());
double aroundScore1 = ShopScoreUtil.aroundScore1(countMap);
- ks = new String[] { "银行", "商场", "大型超市", "餐饮" };
+ ks = new String[] { "閾惰", "鍟嗗満", "澶у瀷瓒呭競", "椁愰ギ" };
countMap = new HashMap(ks.length);
for (String k : ks){
countMap.put(k, getTotal(searchResult.get(k)));
@@ -750,7 +750,7 @@ public class GeneralController extends BaseController {
district.setAvgPrice(avgPrice);
district.setKind(commData.getKind());
- if (district.getName().endsWith("村")) {
+ if (district.getName().endsWith("鏉�")) {
oldHouseCount += count;
} else {
@@ -769,7 +769,7 @@ public class GeneralController extends BaseController {
}
return oldHouseCount + hightLevelDistrictHouseCount
- + commonDistrictHouseCount;// 总户数
+ + commonDistrictHouseCount;// 鎬绘埛鏁�
}
return 0;
}
@@ -846,13 +846,13 @@ public class GeneralController extends BaseController {
}
if (StringUtils.isNotBlank(office.getBedKind())) {
- if (office.getBedKind().equals("甲级")) {
+ if (office.getBedKind().equals("鐢茬骇")) {
bestLevelCount = bestLevelCount
+ office.getHouseholdCount();
- } else if (office.getBedKind().equals("乙级")) {
+ } else if (office.getBedKind().equals("涔欑骇")) {
betterLevelCount = betterLevelCount
+ office.getHouseholdCount();
- } else if (office.getBedKind().equals("丙级")) {
+ } else if (office.getBedKind().equals("涓欑骇")) {
goodLevelCount = goodLevelCount
+ office.getHouseholdCount();
} else {
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/LocalController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/LocalController.java
index 6f67812ea..e2b283ea7 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/LocalController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/LocalController.java
@@ -41,12 +41,12 @@ public class LocalController extends BaseController {
double lng = mall.getLng2()/10000000000.0;
double radius = getRadius();
Map> stationMap = busStationService.getNearByStations(model.getCityName(), lat, lng, radius);
- model.setMetroStations(stationMap.get("地铁"));
- model.setBusStations(stationMap.get("公交"));
- if("上海".equals(model.getCityName())){
- // 虹桥机场 121.352578,31.200062
+ model.setMetroStations(stationMap.get("鍦伴搧"));
+ model.setBusStations(stationMap.get("鍏氦"));
+ if("涓婃捣".equals(model.getCityName())){
+ // 铏规ˉ鏈哄満 121.352578,31.200062
model.setDisHongqiaoAirport(GeoUtils.calculateDistance(lng, lat, 121.352578, 31.200062));
- // 虹桥火车站 121.32795,31.1991
+ // 铏规ˉ鐏溅绔� 121.32795,31.1991
model.setDisHongqiaoStation(GeoUtils.calculateDistance(lng, lat, 121.32795, 31.1991));
}
model.setTabScore(ShopScoreUtil.localScore(mall.getLoopLineInfo(), null == model.getMetroStations() ? 0 : model
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NodistrictController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NodistrictController.java
index bc7524862..7fb3eddca 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NodistrictController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NodistrictController.java
@@ -42,7 +42,7 @@ public class NodistrictController extends BaseController {
final double lng = model.getLng();
final double radius = getRadius();
- // 周边没小区,直接返回
+ // 鍛ㄨ竟娌″皬鍖猴紝鐩存帴杩斿洖
List districts = districtService.findDistrict(lat, lng, radius, model.getCityName());
if (CollectionUtils.isEmpty(districts)) {
return model;
@@ -54,7 +54,7 @@ public class NodistrictController extends BaseController {
model.setCityPrice(cityStat.getAvgPrice());
}
- // 按距离排序,由近到远
+ // 鎸夎窛绂绘帓搴忥紝鐢辫繎鍒拌繙
Collections.sort(districts, new Comparator() {
public int compare(District o1, District o2) {
double dis1 = GeoUtils.calculateDistance(lng, lat, o1.getLng2() / 10000000000.0, o1.getLat2() / 10000000000.0);
@@ -102,11 +102,11 @@ public class NodistrictController extends BaseController {
model.setPriceNearest(priceNearest);
- // 范围内均价
+ // 鑼冨洿鍐呭潎浠�
if (priceCount > 0 && stats.size() > 0) {
model.setAreaPrice(priceCount / stats.size());
Map priceMap = districtStatService.getCityDistriceMinAndMaxPrice(model.getCityName());
- //设置价格
+ //璁剧疆浠锋牸
model.setCityDistrictMinSellPrice(priceMap.get("cityDistrictMinSellPrice"));
model.setCityDistrictMaxSellPrice(priceMap.get("cityDistrictMaxSellPrice"));
@@ -124,7 +124,7 @@ public class NodistrictController extends BaseController {
}
}
- // 由低到高排序
+ // 鐢变綆鍒伴珮鎺掑簭
Collections.sort(stats, new Comparator() {
public int compare(DistrictStat o1, DistrictStat o2) {
return o1.getAvgPrice() - o2.getAvgPrice();
@@ -139,7 +139,7 @@ public class NodistrictController extends BaseController {
}
model.setPriceBtm5(priceBtm5);
- // 由高到低排序
+ // 鐢遍珮鍒颁綆鎺掑簭
Collections.reverse(stats);
List priceTop5 = new ArrayList(5);
for (DistrictStat s : stats) {
@@ -158,13 +158,13 @@ public class NodistrictController extends BaseController {
final double lng = model.getLng();
final double radius = getRadius();
- // 周边没小区,直接返回
+ // 鍛ㄨ竟娌″皬鍖猴紝鐩存帴杩斿洖
List districts = districtService.findDistrict(lat, lng, radius, model.getCityName());
if (CollectionUtils.isEmpty(districts)) {
return model;
}
- // 按距离排序,由近到远
+ // 鎸夎窛绂绘帓搴忥紝鐢辫繎鍒拌繙
Collections.sort(districts, new Comparator() {
public int compare(District o1, District o2) {
double dis1 = GeoUtils.calculateDistance(lng, lat, o1.getLng2() / 10000000000.0, o1.getLat2() / 10000000000.0);
@@ -325,7 +325,7 @@ public class NodistrictController extends BaseController {
double lng = model.getLng();
double radius = getRadius();
- model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "餐厅"));
+ model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "椁愬巺"));
double cityConsumMin = model.getCityConsumMin();
double cityConsumMax = model.getCityConsumMax();
@@ -342,20 +342,20 @@ public class NodistrictController extends BaseController {
double lng = model.getLng();
double radius = getRadius();
Map> stationMap = busStationService.getNearByStations(city, lat, lng, radius);
- model.setMetroStations(stationMap.get("地铁"));
- model.setBusStations(stationMap.get("公交"));
+ model.setMetroStations(stationMap.get("鍦伴搧"));
+ model.setBusStations(stationMap.get("鍏氦"));
- // 虹桥机场 121.352578,31.200062
- // 浦东机场 121.807085,31.160702
+ // 铏规ˉ鏈哄満 121.352578,31.200062
+ // 娴︿笢鏈哄満 121.807085,31.160702
double dis = GeoUtils.calculateDistance(lng, lat, 121.352578, 31.200062);
if (dis <= radius) {
- model.setAirPort("虹桥机场");
+ model.setAirPort("铏规ˉ鏈哄満");
model.setAirPortLat(31.200062);
model.setAirPortLng(121.352578);
} else {
dis = GeoUtils.calculateDistance(lng, lat, 121.807085, 31.160702);
if (dis <= radius) {
- model.setAirPort("浦东机场");
+ model.setAirPort("娴︿笢鏈哄満");
model.setAirPortLat(31.160702);
model.setAirPortLng(121.807085);
}
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NofoundController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NofoundController.java
index 4dc451e6b..2f058f6ce 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NofoundController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NofoundController.java
@@ -32,7 +32,7 @@ public class NofoundController extends BaseController {
return model.redirect("/general/district?q=" + URLEncoder.encode(model.getQ(), "UTF-8")+"&cityName="+URLEncoder.encode(model.getCityName(), "UTF-8"));
}
- // 查询半径内小区
+ // 鏌ヨ鍗婂緞鍐呭皬鍖�
final double lat = model.getLat();
final double lng = model.getLng();
final double radius = getRadius();
@@ -50,7 +50,7 @@ public class NofoundController extends BaseController {
return model;
}
- // 按距离排序,由近到远
+ // 鎸夎窛绂绘帓搴忥紝鐢辫繎鍒拌繙
Collections.sort(tmpDistricts, new Comparator() {
public int compare(District o1, District o2) {
double dis1 = GeoUtils.calculateDistance(lng, lat, o1.getLng2() / 10000000000.0, o1.getLat2() / 10000000000.0);
@@ -106,7 +106,7 @@ public class NofoundController extends BaseController {
final double lat = model.getLat();
final double lng = model.getLng();
List shops = shopService.searchNearby(lat, lng, getRadius());
- // 按距离排序,由近到远
+ // 鎸夎窛绂绘帓搴忥紝鐢辫繎鍒拌繙
Collections.sort(shops, new Comparator() {
public int compare(Shop o1, Shop o2) {
double dis1 = GeoUtils.calculateDistance(lng, lat, o1.getLng2() / 10000000000.0, o1.getLat2() / 10000000000.0);
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NoshopController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NoshopController.java
index c4bd68ccd..ad7f090d7 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NoshopController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/NoshopController.java
@@ -49,7 +49,7 @@ public class NoshopController extends BaseController {
final double lng = model.getLng();
final double radius = getRadius();
- // 周边没商铺,直接返回
+ // 鍛ㄨ竟娌″晢閾猴紝鐩存帴杩斿洖
List shops = shopService.searchNearby(lat, lng, radius);
if (CollectionUtils.isEmpty(shops)) {
return model;
@@ -61,7 +61,7 @@ public class NoshopController extends BaseController {
model.setCityPrice(cityStat.getAvgPrice());
}
- // 按距离排序,由近到远
+ // 鎸夎窛绂绘帓搴忥紝鐢辫繎鍒拌繙
Collections.sort(shops, new Comparator() {
public int compare(Shop o1, Shop o2) {
double dis1 = GeoUtils.calculateDistance(lng, lat, o1.getLng2() / 10000000000.0, o1.getLat2() / 10000000000.0);
@@ -102,7 +102,7 @@ public class NoshopController extends BaseController {
model.setPriceNearest(priceNearest);
- // 范围内均价
+ // 鑼冨洿鍐呭潎浠�
if (priceCount > 0 && stats.size() > 0) {
model.setAreaPrice(priceCount / stats.size());
@@ -120,7 +120,7 @@ public class NoshopController extends BaseController {
}
}
- // 由低到高排序
+ // 鐢变綆鍒伴珮鎺掑簭
Collections.sort(stats, new Comparator() {
public int compare(DistrictStat o1, DistrictStat o2) {
return o1.getAvgPrice() - o2.getAvgPrice();
@@ -135,7 +135,7 @@ public class NoshopController extends BaseController {
}
model.setPriceBtm5(priceBtm5);
- // 由高到低排序
+ // 鐢遍珮鍒颁綆鎺掑簭
Collections.reverse(stats);
List priceTop5 = new ArrayList(5);
for (DistrictStat s : stats) {
@@ -154,7 +154,7 @@ public class NoshopController extends BaseController {
final double lng = model.getLng();
final double radius = getRadius();
- // 周边没商铺,直接返回
+ // 鍛ㄨ竟娌″晢閾猴紝鐩存帴杩斿洖
List shops = shopService.searchNearby(lat, lng, radius);
if (CollectionUtils.isEmpty(shops)) {
return model;
@@ -166,7 +166,7 @@ public class NoshopController extends BaseController {
model.setCityRentPrice(cityStat.getAvgPrice());
}
- // 按距离排序,由近到远
+ // 鎸夎窛绂绘帓搴忥紝鐢辫繎鍒拌繙
Collections.sort(shops, new Comparator() {
public int compare(Shop o1, Shop o2) {
double dis1 = GeoUtils.calculateDistance(lng, lat, o1.getLng2() / 10000000000.0, o1.getLat2() / 10000000000.0);
@@ -201,7 +201,7 @@ public class NoshopController extends BaseController {
model.setRentNearest(priceNearest);
- // 范围内均价
+ // 鑼冨洿鍐呭潎浠�
if (priceCount > 0 && stats.size() > 0) {
model.setAreaRentPrice(priceCount / stats.size());
@@ -219,7 +219,7 @@ public class NoshopController extends BaseController {
}
}
- // 由低到高排序
+ // 鐢变綆鍒伴珮鎺掑簭
Collections.sort(stats, new Comparator() {
public int compare(DistrictBusinessStatRent o1, DistrictBusinessStatRent o2) {
return o1.getAvgPrice() - o2.getAvgPrice();
@@ -234,7 +234,7 @@ public class NoshopController extends BaseController {
}
model.setRentBtm5(priceBtm5);
- // 由高到低排序
+ // 鐢遍珮鍒颁綆鎺掑簭
Collections.reverse(stats);
List priceTop5 = new ArrayList(5);
for (DistrictBusinessStatRent s : stats) {
@@ -254,16 +254,16 @@ public class NoshopController extends BaseController {
final double radius = getRadius();
Map> stationMap = busStationService.getNearByStations(model.getCityName(), lat, lng, radius);
- model.setMetroStations(stationMap.get("地铁"));
- model.setBusStations(stationMap.get("公交"));
+ model.setMetroStations(stationMap.get("鍦伴搧"));
+ model.setBusStations(stationMap.get("鍏氦"));
- // 虹桥机场 121.352578,31.200062
+ // 铏规ˉ鏈哄満 121.352578,31.200062
model.setDisHongqiaoAirport(GeoUtils.calculateDistance(lng, lat, 121.352578, 31.200062));
- // 虹桥火车站 121.32795,31.1991
+ // 铏规ˉ鐏溅绔� 121.32795,31.1991
model.setDisHongqiaoStation(GeoUtils.calculateDistance(lng, lat, 121.32795, 31.1991));
- // 周边没商铺,直接返回
+ // 鍛ㄨ竟娌″晢閾猴紝鐩存帴杩斿洖
List shops = shopService.searchNearby(lat, lng, radius);
if (CollectionUtils.isNotEmpty(shops)) {
int priceCount = 0;
@@ -278,7 +278,7 @@ public class NoshopController extends BaseController {
}
}
- // 范围内均价
+ // 鑼冨洿鍐呭潎浠�
if (priceCount > 0 && count > 0) {
model.setAreaPrice(priceCount / count);
}
@@ -380,7 +380,7 @@ public class NoshopController extends BaseController {
double lat = model.getLat();
double lng = model.getLng();
double radius = getRadius();
- model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "餐厅"));
+ model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "椁愬巺"));
double cityConsumMin = model.getCityConsumMin();
double cityConsumMax = model.getCityConsumMax();
@@ -397,8 +397,8 @@ public class NoshopController extends BaseController {
double lng = model.getLng();
double radius = getRadius();
Map> stationMap = busStationService.getNearByStations(city, lat, lng, radius);
- model.setMetroStations(stationMap.get("地铁"));
- model.setBusStations(stationMap.get("公交"));
+ model.setMetroStations(stationMap.get("鍦伴搧"));
+ model.setBusStations(stationMap.get("鍏氦"));
return model;
}
@@ -617,7 +617,7 @@ public class NoshopController extends BaseController {
district.setAvgPrice(avgPrice);
district.setKind(commData.getKind());
- if (district.getName().endsWith("村")) {
+ if (district.getName().endsWith("鏉�")) {
oldHouseCount += count;
oldDistrictCount++;
@@ -636,15 +636,15 @@ public class NoshopController extends BaseController {
}
}
- model.setTotalHouseCount(oldHouseCount + hightLevelDistrictHouseCount + commonDistrictHouseCount);// 总户数
- model.setCommonDistrictHouseCount(commonDistrictHouseCount);// 高级商品房户数
- model.setHightDistrictHouseCount(hightLevelDistrictHouseCount);// 普通户数
- model.setTotalDistrictCount(oldDistrictCount + commonDistrictCount + hightLevelDistrictCount);// 总小区数
- model.setCommonDistrictCount(commonDistrictCount);// 高级小区数
- model.setHightDistrictCount(hightLevelDistrictCount);// 普通小区数
+ model.setTotalHouseCount(oldHouseCount + hightLevelDistrictHouseCount + commonDistrictHouseCount);// 鎬绘埛鏁�
+ model.setCommonDistrictHouseCount(commonDistrictHouseCount);// 楂樼骇鍟嗗搧鎴挎埛鏁�
+ model.setHightDistrictHouseCount(hightLevelDistrictHouseCount);// 鏅�氭埛鏁�
+ model.setTotalDistrictCount(oldDistrictCount + commonDistrictCount + hightLevelDistrictCount);// 鎬诲皬鍖烘暟
+ model.setCommonDistrictCount(commonDistrictCount);// 楂樼骇灏忓尯鏁�
+ model.setHightDistrictCount(hightLevelDistrictCount);// 鏅�氬皬鍖烘暟
- model.setOldHouseCount(oldHouseCount);// 老工房 户数
- model.setOldDistrictCount(oldDistrictCount);// 老工户 小区数
+ model.setOldHouseCount(oldHouseCount);// 鑰佸伐鎴� 鎴锋暟
+ model.setOldDistrictCount(oldDistrictCount);// 鑰佸伐鎴� 灏忓尯鏁�
}
return model;
@@ -691,11 +691,11 @@ public class NoshopController extends BaseController {
}
if (StringUtils.isNotBlank(office.getBedKind())) {
- if (office.getBedKind().equals("甲级")) {
+ if (office.getBedKind().equals("鐢茬骇")) {
bestLevelCount = bestLevelCount + office.getHouseholdCount();
- } else if (office.getBedKind().equals("乙级")) {
+ } else if (office.getBedKind().equals("涔欑骇")) {
betterLevelCount = betterLevelCount + office.getHouseholdCount();
- } else if (office.getBedKind().equals("丙级")) {
+ } else if (office.getBedKind().equals("涓欑骇")) {
goodLevelCount = goodLevelCount + office.getHouseholdCount();
} else {
otherLevelCount = otherLevelCount + office.getHouseholdCount();
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PeopleController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PeopleController.java
index 3ae108c91..6f38ea0f0 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PeopleController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PeopleController.java
@@ -78,13 +78,13 @@ public class PeopleController extends BaseController {
JSONArray officesObj = JSONArray.fromObject(offices);
model.setOffices(officesObj.toString());
- // 居民人口密度
+ // 灞呮皯浜哄彛瀵嗗害
double circleArea = Math.PI * Math.pow(radius / 1000.0, 2);
int totalHouseCount = model.getTotalHouseCount();
double density = totalHouseCount * 2.49 / circleArea;
double score1 = ShopScoreUtil.populationScore(density);
data.put("populationScore",score1);
- // 办公人口
+ // 鍔炲叕浜哄彛
int totalCountOffice = model.getTotalCountOffice();
density = totalCountOffice / circleArea;
double score2 = ShopScoreUtil.officePopulationScore(density);
@@ -124,26 +124,26 @@ public class PeopleController extends BaseController {
JSONArray officesObj = JSONArray.fromObject(offices);
model.setOffices(officesObj.toString());
- // 居民人口密度
+ // 灞呮皯浜哄彛瀵嗗害
/*double circleArea = Math.PI * Math.pow(radius / 1000.0, 2);
int totalHouseCount = model.getTotalHouseCount();
double density = totalHouseCount * 2.49 / circleArea;
double score1 = ShopScoreUtil.peopleScore1(density);
model.setScore1(score1);
- // 办公人口
+ // 鍔炲叕浜哄彛
int totalCountOffice = model.getTotalCountOffice();
density = totalCountOffice / circleArea;
double score2 = ShopScoreUtil.peopleScore2(density);
model.setScore2(score2);*/
- //圆形面积
+ //鍦嗗舰闈㈢Н
double circleArea = Math.PI * Math.pow(radius / 1000.0, 2);
- //设置居民人口密度得分
+ //璁剧疆灞呮皯浜哄彛瀵嗗害寰楀垎
double peopleDensityScore = setPeopleDensityScore(model, radius, circleArea);
- //设置办公人口得分
+ //璁剧疆鍔炲叕浜哄彛寰楀垎
double officeDensityScore = setOfficeDensityScore(model, circleArea);
model.setTabScore(peopleDensityScore > officeDensityScore ? peopleDensityScore : officeDensityScore);
@@ -182,7 +182,7 @@ public class PeopleController extends BaseController {
}
/**
- * 设置办公人口得分
+ * 璁剧疆鍔炲叕浜哄彛寰楀垎
* @author yinjihuan
* @date 2016-03-04
* @param model
@@ -190,18 +190,18 @@ public class PeopleController extends BaseController {
* @return
*/
private double setOfficeDensityScore(PeopleModel model, double circleArea) {
- //办公人数总数
+ //鍔炲叕浜烘暟鎬绘暟
int totalCountOffice = model.getTotalCountOffice();
- //办公人口密度=(圆形区域内办公人数总数/圆形面积)
+ //鍔炲叕浜哄彛瀵嗗害=(鍦嗗舰鍖哄煙鍐呭姙鍏汉鏁版�绘暟/鍦嗗舰闈㈢Н)
double density = totalCountOffice / circleArea;
- //办公人口密度得分
+ //鍔炲叕浜哄彛瀵嗗害寰楀垎
double officeDensityScore = ShopScoreUtil.calcOfficeDensityScore(density);
model.setScore2(officeDensityScore);
return officeDensityScore;
}
/**
- * 设置居民人口密度得分
+ * 璁剧疆灞呮皯浜哄彛瀵嗗害寰楀垎
* @author yinjihuan
* @date 2016-03-04
* @param model
@@ -209,11 +209,11 @@ public class PeopleController extends BaseController {
* @return
*/
private double setPeopleDensityScore(PeopleModel model, double radius, double circleArea) {
- // 圆形区域内总户数
+ // 鍦嗗舰鍖哄煙鍐呮�绘埛鏁�
int totalHouseCount = model.getTotalHouseCount();
- //居民人口密度(居民人口密度 = 圆形区域内总户数*2.49/圆形面积)
+ //灞呮皯浜哄彛瀵嗗害(灞呮皯浜哄彛瀵嗗害 = 鍦嗗舰鍖哄煙鍐呮�绘埛鏁�*2.49/鍦嗗舰闈㈢Н)
double density = totalHouseCount * 2.49 / circleArea;
- //人口密度得分
+ //浜哄彛瀵嗗害寰楀垎
double peopleDensityScore = ShopScoreUtil.calcPeopleDensityScore(density);
model.setScore1(peopleDensityScore);
return peopleDensityScore;
@@ -319,7 +319,7 @@ public class PeopleController extends BaseController {
district.setAvgPrice(avgPrice);
district.setKind(commData.getKind());
- if (district.getName().endsWith("村")) {
+ if (district.getName().endsWith("鏉�")) {
oldHouseCount += count;
oldDistrictCount++;
@@ -338,15 +338,15 @@ public class PeopleController extends BaseController {
}
}
- model.setTotalHouseCount(oldHouseCount + hightLevelDistrictHouseCount + commonDistrictHouseCount);// 总户数
- model.setCommonDistrictHouseCount(commonDistrictHouseCount);// 高级商品房户数
- model.setHightDistrictHouseCount(hightLevelDistrictHouseCount);// 普通户数
- model.setTotalDistrictCount(oldDistrictCount + commonDistrictCount + hightLevelDistrictCount);// 总小区数
- model.setCommonDistrictCount(commonDistrictCount);// 高级小区数
- model.setHightDistrictCount(hightLevelDistrictCount);// 普通小区数
+ model.setTotalHouseCount(oldHouseCount + hightLevelDistrictHouseCount + commonDistrictHouseCount);// 鎬绘埛鏁�
+ model.setCommonDistrictHouseCount(commonDistrictHouseCount);// 楂樼骇鍟嗗搧鎴挎埛鏁�
+ model.setHightDistrictHouseCount(hightLevelDistrictHouseCount);// 鏅�氭埛鏁�
+ model.setTotalDistrictCount(oldDistrictCount + commonDistrictCount + hightLevelDistrictCount);// 鎬诲皬鍖烘暟
+ model.setCommonDistrictCount(commonDistrictCount);// 楂樼骇灏忓尯鏁�
+ model.setHightDistrictCount(hightLevelDistrictCount);// 鏅�氬皬鍖烘暟
- model.setOldHouseCount(oldHouseCount);// 老工房 户数
- model.setOldDistrictCount(oldDistrictCount);// 老工户 小区数
+ model.setOldHouseCount(oldHouseCount);// 鑰佸伐鎴� 鎴锋暟
+ model.setOldDistrictCount(oldDistrictCount);// 鑰佸伐鎴� 灏忓尯鏁�
}
return model;
@@ -393,11 +393,11 @@ public class PeopleController extends BaseController {
}
if (StringUtils.isNotBlank(office.getBedKind())) {
- if (office.getBedKind().equals("甲级")) {
+ if (office.getBedKind().equals("鐢茬骇")) {
bestLevelCount = bestLevelCount + office.getHouseholdCount();
- } else if (office.getBedKind().equals("乙级")) {
+ } else if (office.getBedKind().equals("涔欑骇")) {
betterLevelCount = betterLevelCount + office.getHouseholdCount();
- } else if (office.getBedKind().equals("丙级")) {
+ } else if (office.getBedKind().equals("涓欑骇")) {
goodLevelCount = goodLevelCount + office.getHouseholdCount();
} else {
otherLevelCount = otherLevelCount + office.getHouseholdCount();
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PredictController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PredictController.java
index dc1fd2680..f234b4ec6 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PredictController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PredictController.java
@@ -43,10 +43,10 @@ public class PredictController extends BaseController{
model.setStatBo(statBo);
int avgPrice = 0;
- String buildType = "小区";
+ String buildType = "灏忓尯";
if (null == statBo.getDistrictStat() && null != statBo.getVillaDistrictStat()) {
avgPrice = statBo.getVillaDistrictStat().getAvgPrice();
- buildType = "别墅";
+ buildType = "鍒";
} else if (null != statBo.getDistrictStat()) {
avgPrice = statBo.getDistrictStat().getAvgPrice();
}
@@ -81,7 +81,7 @@ public class PredictController extends BaseController{
}
private void addDistrictStat(List seriesOptions, DistrictKey districtKey, int weeks) {
- List list = Arrays.asList(StringUtils.split(districtService.findDistrictKind(districtKey), ",,"));
+ List list = Arrays.asList(StringUtils.split(districtService.findDistrictKind(districtKey), ",锛�"));
List districtStatBoList = districtStatService.findAllDistrictStatByKind(districtKey, new Date(), weeks,
list);
JSONArray districtJa = new JSONArray();
@@ -130,7 +130,7 @@ public class PredictController extends BaseController{
if (villaJa.length() > 0) {
JSONObject jo2 = new JSONObject();
- jo2.put("name", districtKey.getName() + "(别墅)");
+ jo2.put("name", districtKey.getName() + "(鍒)");
jo2.put("data", villaJa.toString());
jo2.put("yAxis", 0);
seriesOptions.add(jo2);
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PriceController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PriceController.java
index 8918349e8..97e959362 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PriceController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/PriceController.java
@@ -35,7 +35,7 @@ import java.net.URLEncoder;
import java.util.*;
/**
- * 价格指数
+ * 浠锋牸鎸囨暟
* @author yk
*
*/
@@ -51,15 +51,15 @@ public class PriceController extends BaseController {
final static ChafangtongCookieContext cookieContext = ChafangtongCookieContext.getInstance();
public Object districtAction(PriceModel model) throws UnsupportedEncodingException {
/**
- * 将"全市相对最低"指标数字变更成上海小区均价升序,前0到3%的均价的中位数。
- * "全市相对最高"指标数字变更成上海小区均价升序,前97%到100%的均价的中位数
- * 2016-07-05 yinjihuan修改
+ * 灏�"鍏ㄥ競鐩稿鏈�浣�"鎸囨爣鏁板瓧鍙樻洿鎴愪笂娴峰皬鍖哄潎浠峰崌搴忥紝鍓�0鍒�3%鐨勫潎浠风殑涓綅鏁般��
+ * "鍏ㄥ競鐩稿鏈�楂�"鎸囨爣鏁板瓧鍙樻洿鎴愪笂娴峰皬鍖哄潎浠峰崌搴忥紝鍓�97%鍒�100%鐨勫潎浠风殑涓綅鏁�
+ * 2016-07-05 yinjihuan淇敼
*/
Map priceMap = districtStatService.getCityDistriceMinAndMaxPrice(model.getCityName());
if (null == priceMap) {
return model.redirect("/noResult/district?q=" + URLEncoder.encode(model.getDistrictName(), "UTF-8") + "&cityName=" +URLEncoder.encode(model.getCityName(), "UTF-8"));
}
- //设置价格
+ //璁剧疆浠锋牸
model.setCityDistrictMinSellPrice(priceMap.get("cityDistrictMinSellPrice"));
model.setCityDistrictMaxSellPrice(priceMap.get("cityDistrictMaxSellPrice"));
@@ -108,17 +108,17 @@ public class PriceController extends BaseController {
if(StringUtils.isNotBlank(district.getRegion())){
params.add(new QueryParam("region", district.getRegion()));
}
- Date lastMonthEndDate = DateUtil.getLastEndMonthDate(new Date());// 检索上上月的数据
+ Date lastMonthEndDate = DateUtil.getLastEndMonthDate(new Date());// 妫�绱笂涓婃湀鐨勬暟鎹�
params.add(new QueryParam("endMonthDate", lastMonthEndDate));
List regionStatRentList=regionStatRentDao.findAllByParams(params);
model.setRegionStatRents(regionStatRentList);
model.setRentStatBos(rentBos);
String estateType = district.getEstateType2();
- if(!estateType.contains("别墅")){
- estateType = "小区";
+ if(!estateType.contains("鍒")){
+ estateType = "灏忓尯";
}else{
- estateType = "别墅";
+ estateType = "鍒";
}
List rentList = new ArrayList();
Map districtStatRents = districtStatRentService.findByDistrictStatRent(districtKey, estateType);
@@ -211,7 +211,7 @@ public class PriceController extends BaseController {
}
List seriesOptions = new ArrayList();
- String title = name + "均价走势";
+ String title = name + "鍧囦环璧板娍";
DistrictKey districtKey = new DistrictKey(city, region, name);
addDistrictStat(seriesOptions, districtKey, weeks);
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/RentController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/RentController.java
index daeb0ae53..a502e2f0c 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/RentController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/RentController.java
@@ -114,7 +114,7 @@ public class RentController extends BaseController {
}
List seriesOptions = new ArrayList();
- String title = name + "租金走势";
+ String title = name + "绉熼噾璧板娍";
DistrictKey districtKey = new DistrictKey(city, region, name);
addDistrictStat(seriesOptions, districtKey, weeks);
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ReportController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ReportController.java
index 85d31ec16..5f96499ed 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ReportController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ReportController.java
@@ -124,7 +124,7 @@ public class ReportController extends BaseController {
model.setShowPdfLink(true);
}
- // 综合指数
+ // 缁煎悎鎸囨暟
SeaweedNumberic numberic = seaweedNumbericDao.findShop(shop.getCity(), shop.getRegion(), shop.getName());
model.setDetailScore(ShopScoreUtil.detailScore(shop, numberic));
model.setDetailScore1(ShopScoreUtil.detailScore1(shop.getEstateType(), null == numberic ? null : numberic.getBuildArea()));
@@ -132,7 +132,7 @@ public class ReportController extends BaseController {
model.setDetailScore3(ShopScoreUtil.detailScore3(shop.getCarSiteCount()));
model.setDetailScore4(ShopScoreUtil.detailScore4(null == numberic ? null : numberic.getFinishBuildYear()));
- // 房价指数
+ // 鎴夸环鎸囨暟
Date weekend = DateUtil.getFirstDayOfWeek(new Date());
BizRegionStat cityStat = bizRegionStatService.findCitySellPrice(city, weekend);
if (null != cityStat) {
@@ -170,7 +170,7 @@ public class ReportController extends BaseController {
model.setSellTradeUrl(model.getCityUrl() + "/cImg/" + SecurityUtil.encode(urlBuilder.toString())
+ (isRefreshCache ? "?__refresh_cache=1" : ""));
- // 租金指数
+ // 绉熼噾鎸囨暟
DistrictBusinessStatRentBo retnStatBo = districtBusinessStatRentService.findMallStatBo(new DistrictKey(shop.getCity(),
shop.getRegion(), shop.getName()), weekend);
model.setRentStatBo(retnStatBo);
@@ -203,15 +203,15 @@ public class ReportController extends BaseController {
model.setRentTradeUrl(model.getCityUrl() + "/cImg/" + SecurityUtil.encode(urlBuilder.toString())
+ (isRefreshCache ? "?__refresh_cache=1" : ""));
- // 地段指数
+ // 鍦版鎸囨暟
Map> stationMap = busStationService.getNearByStations(city, lat, lng, radius);
- model.setMetroStations(stationMap.get("地铁"));
- model.setBusStations(stationMap.get("公交"));
+ model.setMetroStations(stationMap.get("鍦伴搧"));
+ model.setBusStations(stationMap.get("鍏氦"));
- // 虹桥机场 121.352578,31.200062
+ // 铏规ˉ鏈哄満 121.352578,31.200062
model.setDisHongqiaoAirport(GeoUtils.calculateDistance(lng, lat, 121.352578, 31.200062));
- // 虹桥火车站 121.32795,31.1991
+ // 铏规ˉ鐏溅绔� 121.32795,31.1991
model.setDisHongqiaoStation(GeoUtils.calculateDistance(lng, lat, 121.32795, 31.1991));
model.setLocalScore(ShopScoreUtil.localScore(shop.getLoopLineInfo(), null == model.getMetroStations() ? 0 : model
@@ -263,7 +263,7 @@ public class ReportController extends BaseController {
model.setPieColors(Arrays.asList(new String[]{"#5491c7" ,"#f0776e" ,"#66bd7d" ,"#f5a549" ,"#c075eb"}));
model.setPieMarkers(jFreeChartImageService.getAroundBizTypePieMarkers(lat, lng, radius));
- // 人口指数
+ // 浜哄彛鎸囨暟
int cityAvgPrice = cityPriceLevelService.findCityPriceLevel(city);
cityAvgPrice = cityAvgPrice == 0 ? 7000 : cityAvgPrice;
model.setCityAvgPrice(cityAvgPrice);
@@ -274,14 +274,14 @@ public class ReportController extends BaseController {
List offices = findDistricts(city, "office", lat, lng, radius);
offices = getOfficeCommDataInfo(offices, model);
- // 居民人口密度
+ // 灞呮皯浜哄彛瀵嗗害
double circleArea = Math.PI * Math.pow(radius / 1000.0, 2);
int totalHouseCount = model.getTotalHouseCount();
double density = totalHouseCount * 2.49 / circleArea;
double peopleScore1 = ShopScoreUtil.peopleScore1(density);
model.setPeopleScore1(peopleScore1);
- // 办公人口
+ // 鍔炲叕浜哄彛
int totalCountOffice = model.getTotalCountOffice();
density = totalCountOffice / circleArea;
double peopleScore2 = ShopScoreUtil.peopleScore2(density);
@@ -289,17 +289,17 @@ public class ReportController extends BaseController {
model.setPeopleScore(peopleScore1 > peopleScore2 ? peopleScore1 : peopleScore2);
- // 消费指数
- model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "餐厅"));
+ // 娑堣垂鎸囨暟
+ model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "椁愬巺"));
double cityConsumMin = model.getCityConsumMin();
double cityConsumMax = model.getCityConsumMax();
if (null != model.getAvgConsumption()) {
model.setHigher((model.getAvgConsumption() - cityConsumMin) * 100.0 / (cityConsumMax - cityConsumMin));
}
- List allKw = Arrays.asList(new String[]{ "KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店", "大型超市",
- "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴","医院", "公园", "学校", "体育馆","银行", "商场", "大型超市", "餐饮"});
+ List allKw = Arrays.asList(new String[]{ "KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵", "澶у瀷瓒呭競",
+ "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡","鍖婚櫌", "鍏洯", "瀛︽牎", "浣撹偛棣�","閾惰", "鍟嗗満", "澶у瀷瓒呭競", "椁愰ギ"});
Map baiduKwResult = baiduApiService.searchNearBy(allKw, lat, lng, radius, model.getBaiduMapKey());
- String[] ks = new String[] { "KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店", "大型超市", "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴" };
+ String[] ks = new String[] { "KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵", "澶у瀷瓒呭競", "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡" };
Map countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
Integer c = getTotal(baiduKwResult.get(ks[i]));
@@ -310,8 +310,8 @@ public class ReportController extends BaseController {
model.setConsumCountMap(countMap);
model.setConsumScore(ShopScoreUtil.consumScore(model.getAvgConsumption(), countMap));
- // 环境指数
- ks = new String[] { "医院", "公园", "学校", "体育馆" };
+ // 鐜鎸囨暟
+ ks = new String[] { "鍖婚櫌", "鍏洯", "瀛︽牎", "浣撹偛棣�" };
Map aroundCountMap = new HashMap();
countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
@@ -320,14 +320,14 @@ public class ReportController extends BaseController {
countMap.put(ks[i], c);
}
}
- countMap.put("地铁站", null == model.getMetroStations() ? null : model.getMetroStations().size());
- countMap.put("公交点", null == model.getBusStations() ? null : model.getBusStations().size());
+ countMap.put("鍦伴搧绔�", null == model.getMetroStations() ? null : model.getMetroStations().size());
+ countMap.put("鍏氦鐐�", null == model.getBusStations() ? null : model.getBusStations().size());
aroundCountMap.putAll(countMap);
double aroundScore1 = ShopScoreUtil.aroundScore1(countMap);
model.setAroundScore1(aroundScore1);
- ks = new String[] { "银行", "商场", "大型超市", "餐饮" };
+ ks = new String[] { "閾惰", "鍟嗗満", "澶у瀷瓒呭競", "椁愰ギ" };
countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
Integer c = getTotal(baiduKwResult.get(ks[i]));
@@ -438,7 +438,7 @@ public class ReportController extends BaseController {
model.setShowPdfLink(true);
}
- // 楼盘指数
+ // 妤肩洏鎸囨暟
SeaweedNumberic numberic = seaweedNumbericDao.findDistrict(city, region, district.getName());
model.setDetailScore(DistrictScoreUtil.detailScore(district, numberic));
@@ -451,9 +451,9 @@ public class ReportController extends BaseController {
model.setDetailScore4(DistrictScoreUtil.detailScore4(nullNumberic ? null : numberic.getCubagePercent()));
model.setDetailScore5(DistrictScoreUtil.detailScore5(district.getBuildType(), nullNumberic ? null : numberic.getCarSiteCount()));
- // 房价指数
+ // 鎴夸环鎸囨暟
RegionStat cityStat = regionStatService.findByCity(city);
-// Integer cityLeave = 0;//最高房价和最低房价的差值
+// Integer cityLeave = 0;//鏈�楂樻埧浠峰拰鏈�浣庢埧浠风殑宸��
if (null != cityStat) {
model.setCityPrice(cityStat.getAvgPrice());
// Integer citySellMin = model.getCityDistrictMinSellPrice();
@@ -478,7 +478,7 @@ public class ReportController extends BaseController {
if(StringUtils.isNotBlank(district.getRegion())){
params.add(new QueryParam("region", district.getRegion()));
}
- Date lastMonthEndDate = DateUtil.getLastEndMonthDate(new Date());// 检索上上月的数据
+ Date lastMonthEndDate = DateUtil.getLastEndMonthDate(new Date());// 妫�绱笂涓婃湀鐨勬暟鎹�
params.add(new QueryParam("endMonthDate", lastMonthEndDate));
List regionStatRentList=regionStatRentDao.findAllByParams(params);
model.setRegionStatRents(regionStatRentList);
@@ -487,10 +487,10 @@ public class ReportController extends BaseController {
rentBo = districtStatRentService.findByDistrictStatRent(districtKey,2);
List rentList = new ArrayList();
String estateType = district.getEstateType2();
- if(!estateType.contains("别墅")){
- estateType = "小区";
+ if(!estateType.contains("鍒")){
+ estateType = "灏忓尯";
}else{
- estateType = "别墅";
+ estateType = "鍒";
}
Map districtStatRents = districtStatRentService.findByDistrictStatRent(districtKey, estateType);
@@ -520,7 +520,7 @@ public class ReportController extends BaseController {
if (null != stat) {
Map priceMap = districtStatService.getCityDistriceMinAndMaxPrice(model.getCityName());
- //设置价格
+ //璁剧疆浠锋牸
model.setCityDistrictMinSellPrice(priceMap.get("cityDistrictMinSellPrice"));
model.setCityDistrictMaxSellPrice(priceMap.get("cityDistrictMaxSellPrice"));
@@ -538,11 +538,11 @@ public class ReportController extends BaseController {
}
}
- // 潜力指数
- String buildType = "小区";
+ // 娼滃姏鎸囨暟
+ String buildType = "灏忓尯";
if (null == statBo.getDistrictStat() && null != statBo.getVillaDistrictStat()) {
avgPrice = statBo.getVillaDistrictStat().getAvgPrice();
- buildType = "别墅";
+ buildType = "鍒";
} else if (null != statBo.getDistrictStat()) {
avgPrice = statBo.getDistrictStat().getAvgPrice();
}
@@ -569,9 +569,9 @@ public class ReportController extends BaseController {
model.setSellTradeUrl(model.getCityUrl() + "/cImg/" + SecurityUtil.encode(urlBuilder.toString())
+ (isRefreshCache ? "?__refresh_cache=1" : ""));
- // 稀缺指数
+ // 绋�缂烘寚鏁�
model.setRegionOrg(regionBlockService.getOrgName(city, region, "region"));
- model.setBlockOrg(block + "板块");
+ model.setBlockOrg(block + "鏉垮潡");
model.setRegionDistrictCount(districtService.findRegionDistrictCount(city, region));
//model.setBlockDistrictCount(districtService.findBlockDistrictCount(city, region, block));
model.setCityDistrictCount(districtService.findCityDistrictCount(city));
@@ -612,8 +612,8 @@ public class ReportController extends BaseController {
model.setMaxDealPriceCount(districtAnalyDataService.findMaxDealCountByCity(city));
model.setMaxSellCount(districtAnalyDataService.findMaxSellCountByCity(city));
model.setDistrictAnalyData(districtAnalyData);
- // 消费指数
- model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "餐厅"));
+ // 娑堣垂鎸囨暟
+ model.setAvgConsumption(bizShopService.findAroundAvgConsumption(lat, lng, radius, "椁愬巺"));
double cityConsumMin = model.getCityConsumMin();
double cityConsumMax = model.getCityConsumMax();
@@ -621,11 +621,11 @@ public class ReportController extends BaseController {
model.setHigher((model.getAvgConsumption() - cityConsumMin) * 100.0 / (cityConsumMax - cityConsumMin));
}
List allKs = Arrays.asList(new String[]{
- "KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店", "大型超市", "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴",
- "医院", "学校", "写字楼", "银行", "ATM", "超市", "停车场", "公园", "网吧", "医院", "学校", "写字楼", "银行", "ATM", "超市", "停车场", "公园", "网吧"
+ "KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵", "澶у瀷瓒呭競", "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡",
+ "鍖婚櫌", "瀛︽牎", "鍐欏瓧妤�", "閾惰", "ATM", "瓒呭競", "鍋滆溅鍦�", "鍏洯", "缃戝惂", "鍖婚櫌", "瀛︽牎", "鍐欏瓧妤�", "閾惰", "ATM", "瓒呭競", "鍋滆溅鍦�", "鍏洯", "缃戝惂"
});
Map kwResult = baiduApiService.searchNearBy(allKs, lat, lng, radius, model.getBaiduMapKey());
- String[] ks = new String[] { "KTV", "电影院", "健身中心", "商场", "美容院", "星级酒店", "大型超市", "高尔夫球场", "私立学校", "整形", "咖啡厅", "洗浴" , "银行"};
+ String[] ks = new String[] { "KTV", "鐢靛奖闄�", "鍋ヨ韩涓績", "鍟嗗満", "缇庡闄�", "鏄熺骇閰掑簵", "澶у瀷瓒呭競", "楂樺皵澶悆鍦�", "绉佺珛瀛︽牎", "鏁村舰", "鍜栧暋鍘�", "娲楁荡" , "閾惰"};
Map countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
countMap.put(ks[i], getTotal(kwResult.get(ks[i])));
@@ -633,34 +633,34 @@ public class ReportController extends BaseController {
model.setConsumCountMap(countMap);
model.setConsumScore(DistrictScoreUtil.consumScore(model.getAvgConsumption(), countMap));
- // 环境指数
+ // 鐜鎸囨暟
Map> stationMap = busStationService.getNearByStations(city, lat, lng, radius);
- model.setMetroStations(stationMap.get("地铁"));
- model.setBusStations(stationMap.get("公交"));
+ model.setMetroStations(stationMap.get("鍦伴搧"));
+ model.setBusStations(stationMap.get("鍏氦"));
- ks = new String[] { "医院", "学校", "写字楼", "银行", "ATM", "超市", "停车场", "公园", "网吧"};
- //厌恶设施
- String[] keys = new String[]{"发电厂","变电站","垃圾焚烧厂","化工厂"};
+ ks = new String[] { "鍖婚櫌", "瀛︽牎", "鍐欏瓧妤�", "閾惰", "ATM", "瓒呭競", "鍋滆溅鍦�", "鍏洯", "缃戝惂"};
+ //鍘屾伓璁炬柦
+ String[] keys = new String[]{"鍙戠數鍘�","鍙樼數绔�","鍨冨溇鐒氱儳鍘�","鍖栧伐鍘�"};
countMap = new HashMap(ks.length);
for (int i = 0; i < ks.length; i++) {
countMap.put(ks[i], getTotal(kwResult.get(ks[i])));
}
- //添加厌恶设施
+ //娣诲姞鍘屾伓璁炬柦
for (int i = 0; i < keys.length; i++) {
countMap.put(ks[i], getTotal(kwResult.get(ks[i])));
}
- countMap.put("地铁站", null == model.getMetroStations() ? null : model.getMetroStations().size());
- countMap.put("公交点", null == model.getBusStations() ? null : model.getBusStations().size());
+ countMap.put("鍦伴搧绔�", null == model.getMetroStations() ? null : model.getMetroStations().size());
+ countMap.put("鍏氦鐐�", null == model.getBusStations() ? null : model.getBusStations().size());
- // 虹桥机场 121.352578,31.200062
- // 浦东机场 121.807085,31.160702
+ // 铏规ˉ鏈哄満 121.352578,31.200062
+ // 娴︿笢鏈哄満 121.807085,31.160702
double dis = GeoUtils.calculateDistance(lng, lat, 121.352578, 31.200062);
if (dis <= radius) {
- countMap.put("机场", 1);
+ countMap.put("鏈哄満", 1);
} else {
dis = GeoUtils.calculateDistance(lng, lat, 121.807085, 31.160702);
if (dis <= radius) {
- countMap.put("机场", 1);
+ countMap.put("鏈哄満", 1);
}
}
@@ -760,7 +760,7 @@ public class ReportController extends BaseController {
district.setAvgPrice(avgPrice);
district.setKind(commData.getKind());
- if (district.getName().endsWith("村")) {
+ if (district.getName().endsWith("鏉�")) {
oldHouseCount += count;
} else {
if (avgPrice >= model.getCityAvgPrice()) {
@@ -772,10 +772,10 @@ public class ReportController extends BaseController {
}
}
}
- model.setTotalHouseCount(oldHouseCount + hightLevelDistrictHouseCount + commonDistrictHouseCount);// 总户数
- model.setCommonDistrictHouseCount(commonDistrictHouseCount);// 高级商品房户数
- model.setHightDistrictHouseCount(hightLevelDistrictHouseCount);// 普通户数
- model.setOldHouseCount(oldHouseCount);// 老工房 户数
+ model.setTotalHouseCount(oldHouseCount + hightLevelDistrictHouseCount + commonDistrictHouseCount);// 鎬绘埛鏁�
+ model.setCommonDistrictHouseCount(commonDistrictHouseCount);// 楂樼骇鍟嗗搧鎴挎埛鏁�
+ model.setHightDistrictHouseCount(hightLevelDistrictHouseCount);// 鏅�氭埛鏁�
+ model.setOldHouseCount(oldHouseCount);// 鑰佸伐鎴� 鎴锋暟
}
return model;
}
@@ -820,11 +820,11 @@ public class ReportController extends BaseController {
}
if (StringUtils.isNotBlank(office.getBedKind())) {
- if (office.getBedKind().equals("甲级")) {
+ if (office.getBedKind().equals("鐢茬骇")) {
bestLevelCount = bestLevelCount + office.getHouseholdCount();
- } else if (office.getBedKind().equals("乙级")) {
+ } else if (office.getBedKind().equals("涔欑骇")) {
betterLevelCount = betterLevelCount + office.getHouseholdCount();
- } else if (office.getBedKind().equals("丙级")) {
+ } else if (office.getBedKind().equals("涓欑骇")) {
goodLevelCount = goodLevelCount + office.getHouseholdCount();
} else {
otherLevelCount = otherLevelCount + office.getHouseholdCount();
@@ -872,7 +872,7 @@ public class ReportController extends BaseController {
return model;
}
- //获取报告编号
+ //鑾峰彇鎶ュ憡缂栧彿
public String getNumber(){
String number = "";
while(StringUtil.isBlank(number)){
@@ -914,7 +914,7 @@ public class ReportController extends BaseController {
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(new DistrictKey(district.getCity(), district
.getRegion(), district.getName()));
DistrictStat districtStat = null;
- if (StringUtils.contains(evaluation.getBuildType(), "别墅")) {
+ if (StringUtils.contains(evaluation.getBuildType(), "鍒")) {
districtStat = districtStatBo.getVillaDistrictStat();
} else {
districtStat = districtStatBo.getDistrictStat();
@@ -959,7 +959,7 @@ public class ReportController extends BaseController {
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(new DistrictKey(district.getCity(), district
.getRegion(), district.getName()));
DistrictStat districtStat = null;
- if (StringUtils.contains(district.getEstateType2(), "别墅")) {
+ if (StringUtils.contains(district.getEstateType2(), "鍒")) {
districtStat = districtStatBo.getVillaDistrictStat();
} else {
districtStat = districtStatBo.getDistrictStat();
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ReportViewController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ReportViewController.java
index a119b0f82..825da1dcf 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ReportViewController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ReportViewController.java
@@ -33,7 +33,7 @@ import java.util.List;
import java.util.Random;
/**
- *估价报告查看
+ *浼颁环鎶ュ憡鏌ョ湅
*@author wenyan
*/
public class ReportViewController extends BaseController {
@@ -47,7 +47,7 @@ public class ReportViewController extends BaseController {
String serialNumber;
- // 根据id查找商铺
+ // 鏍规嵁id鏌ユ壘鍟嗛摵
Shop shop = null;
if (StringUtils.isNotBlank(model.getId()) && ObjectId.isValid(model.getId())) {
shop = shopService.findById(model.getId());
@@ -240,7 +240,7 @@ public class ReportViewController extends BaseController {
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(new DistrictKey(district.getCity(), district
.getRegion(), district.getName()));
DistrictStat districtStat = null;
- if (StringUtils.contains(district.getEstateType2(), "别墅")) {
+ if (StringUtils.contains(district.getEstateType2(), "鍒")) {
districtStat = districtStatBo.getVillaDistrictStat();
} else {
districtStat = districtStatBo.getDistrictStat();
@@ -258,7 +258,7 @@ public class ReportViewController extends BaseController {
return avgPrice;
}
- //获取报告编号
+ //鑾峰彇鎶ュ憡缂栧彿
public String getNumber(){
String number = "";
while(StringUtil.isBlank(number)){
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/SampleController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/SampleController.java
index f599399e3..60f3ae080 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/SampleController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/SampleController.java
@@ -27,7 +27,7 @@ import com.fangjia.service.bo.DistrictStatBo;
import com.fangjia.service.district.ShopStatService;
/**
- * 报告样例
+ * 鎶ュ憡鏍蜂緥
* Created by wenyan on 2015/11/27.
*/
public class SampleController extends BaseController{
@@ -41,7 +41,7 @@ public class SampleController extends BaseController{
DistrictKey districtKey = new DistrictKey(model.getCityName(), model.getRegion(), model.getDistrictName());
District district = districtService.findDistrict(districtKey,"district");
model.setDistrict(district);
- /* 获取下载份数,菜单控制by tom */
+ /* 鑾峰彇涓嬭浇浠芥暟锛岃彍鍗曟帶鍒禸y tom */
String uid = cookieContext.getCookieValue(request, "fpk_uid");
if (StringUtils.isNotBlank(uid)) {
FpkUsers fpkUser = fpkUsersService.findById(SecurityUtil
@@ -61,7 +61,7 @@ public class SampleController extends BaseController{
DistrictKey districtKey = new DistrictKey(model.getCityName(), model.getRegion(), model.getDistrictName());
District district = districtService.findDistrict(districtKey,"shop");
model.setDistrict(district);
- /* 获取下载份数,菜单控制by tom */
+ /* 鑾峰彇涓嬭浇浠芥暟锛岃彍鍗曟帶鍒禸y tom */
String uid = cookieContext.getCookieValue(request, "fpk_uid");
if (StringUtils.isNotBlank(uid)) {
FpkUsers fpkUser = fpkUsersService.findById(SecurityUtil
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/SearchController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/SearchController.java
index 3a132efe7..74de393a9 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/SearchController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/SearchController.java
@@ -136,7 +136,7 @@ public class SearchController {
//nameQuery.add(new TermQuery(new Term("address", keyword)), Occur.SHOULD);
//nameQuery.add(new TermQuery(new Term("addr_alias_std", keyword)), Occur.SHOULD);
nameQuery.add(new TermQuery(new Term("keyword", keyword)), Occur.SHOULD);
- //nameQuery.add(new TermQuery(new Term("keyword_cjk", keyword)), Occur.SHOULD);//这个重要,因seaweed不支持模糊搜索,当输入"中远两"需用此进行搜索
+ //nameQuery.add(new TermQuery(new Term("keyword_cjk", keyword)), Occur.SHOULD);//杩欎釜閲嶈锛屽洜seaweed涓嶆敮鎸佹ā绯婃悳绱紝褰撹緭鍏�"涓繙涓�"闇�鐢ㄦ杩涜鎼滅储
srQuery1.add(nameQuery, Occur.SHOULD);
params.add(new QueryParam("$sr", new SrQuery(srQuery1)));
List districts = districtService.findAllByParams(params, 0, limit, new String[] { "region", "name","address", "addrAlias" });
@@ -151,7 +151,7 @@ public class SearchController {
bo.setRegion(district.getRegion());
ret.add(bo);
}
- //对自动完成出来的结果按长短排序
+ //瀵硅嚜鍔ㄥ畬鎴愬嚭鏉ョ殑缁撴灉鎸夐暱鐭帓搴�
if(ret.size() > 0){
Collections.sort(ret, new Comparator() {
public int compare(AutoCompleteBo o1, AutoCompleteBo o2) {
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ShapeController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ShapeController.java
index dd249b7c9..74df5e9fd 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ShapeController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/ShapeController.java
@@ -35,11 +35,11 @@ public class ShapeController {
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setColor(new Color(178,178,178));//改变扇形颜色
+ g2d.setColor(new Color(178,178,178));//鏀瑰彉鎵囧舰棰滆壊
g2d.fillArc(0,0,400,400,90,360);
- g2d.setColor(new Color(0,115,230));//改变扇形颜色
+ g2d.setColor(new Color(0,115,230));//鏀瑰彉鎵囧舰棰滆壊
g2d.fillArc(0,0,400,400,90,rim);
- g2d.setColor(new Color(229,229,229));//改变扇形颜色
+ g2d.setColor(new Color(229,229,229));//鏀瑰彉鎵囧舰棰滆壊
g2d.fillArc(50,50,300,300,90,360);
g2d.setColor(new Color(0,115,230));
Map attributes = new HashMap();
@@ -61,7 +61,7 @@ public class ShapeController {
unitStart = 200 + 25;
}else if("0".equals(scoreStr)){
scoreStr ="-";
- g2d.setFont(new Font("微软雅黑", Font.BOLD, 12*a).deriveFont(attributes));
+ g2d.setFont(new Font("寰蒋闆呴粦", Font.BOLD, 12*a).deriveFont(attributes));
g2d.drawString(scoreStr, 200 - w + 10, 230);
unitStart = 175;
}else{
@@ -70,11 +70,11 @@ public class ShapeController {
}
if("0".equals(scoreStr)){
- g2d.setFont(new Font("微软雅黑", Font.BOLD, 12*a).deriveFont(attributes));
- g2d.drawString("分", unitStart, 200);
+ g2d.setFont(new Font("寰蒋闆呴粦", Font.BOLD, 12*a).deriveFont(attributes));
+ g2d.drawString("鍒�", unitStart, 200);
}else{
- g2d.setFont(new Font("微软雅黑", Font.BOLD, 12*a).deriveFont(attributes));
- g2d.drawString("分", unitStart, 252);
+ g2d.setFont(new Font("寰蒋闆呴粦", Font.BOLD, 12*a).deriveFont(attributes));
+ g2d.drawString("鍒�", unitStart, 252);
}
g2d.dispose();
cache.put(model.getScore(), image);
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/UserController.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/UserController.java
index 0c6f8f694..1b7bcc65f 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/UserController.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/controllers/UserController.java
@@ -37,33 +37,33 @@ public class UserController {
mav.setModel(data);
String password = model.getPassword();
if (StringUtils.isBlank(model.getUserName())) {
- data.put("userNameMsg","用户名不能为空");
+ data.put("userNameMsg","鐢ㄦ埛鍚嶄笉鑳戒负绌�");
return mav;
}
if (StringUtils.isBlank(model.getPassword())) {
- data.put("passwordMsg","密码不能为空");
+ data.put("passwordMsg","瀵嗙爜涓嶈兘涓虹┖");
return mav;
}
FpkUsers user = fpkUsersDao.findByName(model.getUserName());
if (null == user) {
- data.put("userNameMsg","用户名不存在");
+ data.put("userNameMsg","鐢ㄦ埛鍚嶄笉瀛樺湪");
return mav;
}
if (!user.getPassword().equals(DigestUtils.md5Hex(password))) {
- data.put("passwordMsg","密码错误");
+ data.put("passwordMsg","瀵嗙爜閿欒");
return mav;
}
if(!user.isEnabled()){
- data.put("userNameMsg","账户被禁用,请联系我们!");
+ data.put("userNameMsg","璐︽埛琚鐢紝璇疯仈绯绘垜浠�!");
return mav;
}
if(user.getExpiryDate() != null && user.getExpiryDate().before(new Date())){
- data.put("userNameMsg","您的账户已过期!");
+ data.put("userNameMsg","鎮ㄧ殑璐︽埛宸茶繃鏈�!");
return mav;
}
@@ -86,7 +86,7 @@ public class UserController {
}
}
if(city == null || location == null){
- data.put("userNameMsg","权限不足!");
+ data.put("userNameMsg","鏉冮檺涓嶈冻!");
}else{
if(StringUtils.isNotBlank(model.getForm())){
location = URLDecoder.decode(model.getForm(),"UTF-8");
@@ -122,7 +122,7 @@ public class UserController {
mav.setModel(data);
FpkUsers users = model.getUser();
if(!users.getPassword().equals(DigestUtils.md5Hex(model.getPasswordOld()))){
- data.put("passwordOldMsg","原密码错误");
+ data.put("passwordOldMsg","鍘熷瘑鐮侀敊璇�");
return mav;
}
Map map = new HashMap();
@@ -151,7 +151,7 @@ public class UserController {
}
/**
- * 链接请求直接登录(新需求)
+ * 閾炬帴璇锋眰鐩存帴鐧诲綍锛堟柊闇�姹傦級
* @param model
* @param req
* @param response
@@ -191,7 +191,7 @@ public class UserController {
}
try {
- return model.redirect("/noResult/district?cityName="+URLEncoder.encode("上海", "utf-8"));
+ return model.redirect("/noResult/district?cityName="+URLEncoder.encode("涓婃捣", "utf-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AccessLogFilter.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AccessLogFilter.java
index d4c29449d..ac28849da 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AccessLogFilter.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AccessLogFilter.java
@@ -73,7 +73,7 @@ public class AccessLogFilter implements Filter {
LOGGER.error("error process request: request_url=" + analyticsBean.requestUrl + ", referer="
+ analyticsBean.refererUrl, rootCause);
}
- // 记录运行超过1秒的请求到日志中
+ // 璁板綍杩愯瓒呰繃1绉掔殑璇锋眰鍒版棩蹇椾腑
final long time = System.currentTimeMillis() - start;
final String actionUri = (String) request.getAttribute(ActionContext.ACTION_URI);
if (time > 1000 || (!ChafangtongConfig.getConfig().isProductionEnvironment() && executeCounter.getTotalCount() > 0)) {
@@ -94,7 +94,7 @@ public class AccessLogFilter implements Filter {
private void writeAccessLog(AnalyticsBean analyticsBean, long duration, String actionUri, int statusCode, String method) {
StringBuilder logStr = new StringBuilder();
- // 不要改变顺序
+ // 涓嶈鏀瑰彉椤哄簭
logStr.append(DATE_FORMAT.format(analyticsBean.startTime));// 1
logStr.append(SPLIT).append(StringUtils.defaultString(analyticsBean.connectionIp));// 2
logStr.append(SPLIT).append(StringUtils.defaultString(analyticsBean.ip));// 3
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AnalyticsBean.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AnalyticsBean.java
index 569c14d66..ef5cb7814 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AnalyticsBean.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AnalyticsBean.java
@@ -105,7 +105,7 @@ public class AnalyticsBean {
}
/**
- * 获得连接客户端的IP(部署环境下一般都设有nginx等http服务器)
+ * 鑾峰緱杩炴帴瀹㈡埛绔殑IP锛堥儴缃茬幆澧冧笅涓�鑸兘璁炬湁nginx绛塰ttp鏈嶅姟鍣級
*
* @param request
* @return
@@ -123,7 +123,7 @@ public class AnalyticsBean {
String citySpell = getCitySpell(request.getRequestURL().toString());
ServerArea city = ServerAreaData.getServerAreaByNameOrSpellDefaultNull(citySpell);
if (null != city) {
- // 保存至cookie
+ // 淇濆瓨鑷砪ookie
Cookie cityCookie = cookieContext.createCookie(CookieName.COOKIE_CITY, citySpell);
cityCookie.setMaxAge(Integer.MAX_VALUE);
response.addCookie(cityCookie);
@@ -137,7 +137,7 @@ public class AnalyticsBean {
}
private String createUID(HttpServletRequest request, HttpServletResponse response) {
- // 设置UUID
+ // 璁剧疆UUID
String uuid = new ObjectId().toString();
Cookie uuidCookie = cookieContext.createCookie(CookieName.UID, uuid);
uuidCookie.setMaxAge(Integer.MAX_VALUE);
@@ -152,7 +152,7 @@ public class AnalyticsBean {
}
private String createSID(HttpServletRequest request, HttpServletResponse response) {
- // 设置session id
+ // 璁剧疆session id
String sid = new ObjectId().toString();
Cookie uuidCookie = cookieContext.createCookie(CookieName.SID, sid);
uuidCookie.setMaxAge(-1);
@@ -165,7 +165,7 @@ public class AnalyticsBean {
}
/**
- * 请求url,不包括query string
+ * 璇锋眰url锛屼笉鍖呮嫭query string
*
* @return
*/
@@ -174,7 +174,7 @@ public class AnalyticsBean {
}
/**
- * 请求url后的请求参数,如果参数不为空则包括问号在内
+ * 璇锋眰url鍚庣殑璇锋眰鍙傛暟锛屽鏋滃弬鏁颁笉涓虹┖鍒欏寘鎷棶鍙峰湪鍐�
*
* @return
*/
@@ -183,7 +183,7 @@ public class AnalyticsBean {
}
/**
- * 请求uri
+ * 璇锋眰uri
*
* @return
*/
@@ -192,7 +192,7 @@ public class AnalyticsBean {
}
/**
- * 来源url
+ * 鏉ユ簮url
*
* @return
*/
@@ -201,7 +201,7 @@ public class AnalyticsBean {
}
/**
- * 完整的请求url,包括query string
+ * 瀹屾暣鐨勮姹倁rl锛屽寘鎷琿uery string
*
* @return
*/
@@ -210,7 +210,7 @@ public class AnalyticsBean {
}
/**
- * 是否刷新缓存
+ * 鏄惁鍒锋柊缂撳瓨
*
* @return
*/
@@ -219,7 +219,7 @@ public class AnalyticsBean {
}
/**
- * 当前城市,可能为null
+ * 褰撳墠鍩庡競锛屽彲鑳戒负null
*
* @return
*/
@@ -228,7 +228,7 @@ public class AnalyticsBean {
}
/**
- * 当前城市,不会为null
+ * 褰撳墠鍩庡競锛屼笉浼氫负null
*
* @return
*/
@@ -237,7 +237,7 @@ public class AnalyticsBean {
}
/**
- * cookie中的uid,如果没有则生成新的uid
+ * cookie涓殑uid锛屽鏋滄病鏈夊垯鐢熸垚鏂扮殑uid
*
* @return
*/
@@ -246,7 +246,7 @@ public class AnalyticsBean {
}
/**
- * 全局的请求id
+ * 鍏ㄥ眬鐨勮姹俰d
*
* @return
*/
@@ -255,7 +255,7 @@ public class AnalyticsBean {
}
/**
- * cookie中的会话id,如果没有则生成新的sid
+ * cookie涓殑浼氳瘽id锛屽鏋滄病鏈夊垯鐢熸垚鏂扮殑sid
*
* @return
*/
@@ -264,7 +264,7 @@ public class AnalyticsBean {
}
/**
- * 是否为ajax请求
+ * 鏄惁涓篴jax璇锋眰
*
* @return
*/
@@ -273,7 +273,7 @@ public class AnalyticsBean {
}
/**
- * 访问者的真实ip
+ * 璁块棶鑰呯殑鐪熷疄ip
*
* @return
*/
@@ -282,7 +282,7 @@ public class AnalyticsBean {
}
/**
- * 访问者标识,可能为null
+ * 璁块棶鑰呮爣璇嗭紝鍙兘涓簄ull
*
* @return
*/
@@ -291,7 +291,7 @@ public class AnalyticsBean {
}
/**
- * 连接ip
+ * 杩炴帴ip
*
* @return
*/
@@ -300,7 +300,7 @@ public class AnalyticsBean {
}
/**
- * cookie中的uid,如果没有则为空字符串
+ * cookie涓殑uid锛屽鏋滄病鏈夊垯涓虹┖瀛楃涓�
*
* @return
*/
@@ -309,7 +309,7 @@ public class AnalyticsBean {
}
/**
- * cookie中的会话id,如果没有则为空字符串
+ * cookie涓殑浼氳瘽id锛屽鏋滄病鏈夊垯涓虹┖瀛楃涓�
*
* @return
*/
@@ -318,7 +318,7 @@ public class AnalyticsBean {
}
/**
- * 请求开始时间
+ * 璇锋眰寮�濮嬫椂闂�
*
* @return
*/
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AnalyticsFilter.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AnalyticsFilter.java
index 5c66cf335..bd68b2875 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AnalyticsFilter.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/AnalyticsFilter.java
@@ -59,12 +59,12 @@ public class AnalyticsFilter implements Filter {
ServletException {
final AnalyticsBean analyticsBean = AnalyticsBean.get(request, response);
- // 点击日志
+ // 鐐瑰嚮鏃ュ織
if (analyticsBean.requestUrl.indexOf("/__utm.gif") > -1) {
processUtmGifLog(request, response, analyticsBean);
return;
}
- // 判断URL是否合法,不合法则重定向
+ // 鍒ゆ柇URL鏄惁鍚堟硶锛屼笉鍚堟硶鍒欓噸瀹氬悜
String redirectUrl = checkUrlFormat(analyticsBean);
if (null != redirectUrl) {
if (analyticsBean.isSpider()) {
@@ -84,7 +84,7 @@ public class AnalyticsFilter implements Filter {
threadLocalData.put(ThreadLocalKey.DisableCache, "1");
}
- // 切换城市
+ // 鍒囨崲鍩庡競
FangjiaServerAreaContextHolder.setServerArea(analyticsBean.city);
threadLocalData.put(ThreadLocalKey.FromSpider, analyticsBean.isSpider());
chain.doFilter(request, response);
@@ -105,7 +105,7 @@ public class AnalyticsFilter implements Filter {
responseOutputStream.close();
String userAgent = analyticsBean.userAgent;
if (userAgent != null && (userAgent.indexOf("Googlebot-Image") >= 0 || userAgent.indexOf("Baidu") >= 0)) {
- // 过滤爬虫的访问
+ // 杩囨护鐖櫕鐨勮闂�
return;
}
jmsTemplate.send(utmgifDestination, new MessageCreator() {
@@ -138,7 +138,7 @@ public class AnalyticsFilter implements Filter {
}
/**
- * 判断URL是否合法,合法则返回null,否则返回重定向URL
+ * 鍒ゆ柇URL鏄惁鍚堟硶锛屽悎娉曞垯杩斿洖null锛屽惁鍒欒繑鍥為噸瀹氬悜URL
*
* @param requestUrl
* @param requestUri
@@ -148,7 +148,7 @@ public class AnalyticsFilter implements Filter {
private String checkUrlFormat(AnalyticsBean analyticsBean) {
ChafangtongConfig fangjiaConfig = ChafangtongConfig.getConfig();
String hostName = StringUtils.substringBetween(analyticsBean.requestUrl, "http://", "/");
- // 如果hostName中有端口号,则把端口号去掉
+ // 濡傛灉hostName涓湁绔彛鍙凤紝鍒欐妸绔彛鍙峰幓鎺�
int index = hostName.indexOf(":");
if (index > 0) {
hostName = hostName.substring(0, index);
@@ -168,7 +168,7 @@ public class AnalyticsFilter implements Filter {
return fangjiaConfig.getCityDomainName(city) + analyticsBean.requestUri + analyticsBean.queryString;
}
if (city != null) {
- // 找到对应的城市,或者是一个有效的二级域名
+ // 鎵惧埌瀵瑰簲鐨勫煄甯傦紝鎴栬�呮槸涓�涓湁鏁堢殑浜岀骇鍩熷悕
return null;
}
if (prefixSplit[0].equalsIgnoreCase("www")) {
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/SpiderValidateFilter.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/SpiderValidateFilter.java
index 43f4c109e..b04138ddb 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/SpiderValidateFilter.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/filters/SpiderValidateFilter.java
@@ -53,7 +53,7 @@ public class SpiderValidateFilter implements Filter {
private void checkReload() {
if (this.reloading.compareAndSet(false, true)) {
try {
- // 5分钟reload一次
+ // 5鍒嗛挓reload涓�娆�
if (System.currentTimeMillis() - lastReloadTimestamp < 300000) {
return;
}
@@ -87,13 +87,13 @@ public class SpiderValidateFilter implements Filter {
if (isValidUserAgent(ua)) {
for (String spiderName : spiderDomains.keySet()) {
if (!ua.contains(spiderName)) {
- // 未声明自己为spider则跳过
+ // 鏈0鏄庤嚜宸变负spider鍒欒烦杩�
continue;
}
if (null == ip) {
spider = new Spider(spiderName, ip, ua);
spider.setFake(true);
- // 对ip为null的蜘蛛暂时不入数据库
+ // 瀵筰p涓簄ull鐨勮湗铔涙殏鏃朵笉鍏ユ暟鎹簱
} else {
spider = spiders.get(ip);
if (null == spider) {
@@ -106,7 +106,7 @@ public class SpiderValidateFilter implements Filter {
} else {
spider = new Spider("unkown", ip, ua);
spider.setFake(true);
- // 对userAgent为null的蜘蛛暂时不入数据库
+ // 瀵箄serAgent涓簄ull鐨勮湗铔涙殏鏃朵笉鍏ユ暟鎹簱
}
}
if (spider != null && spider.isFake()) {
@@ -145,7 +145,7 @@ public class SpiderValidateFilter implements Filter {
private void validateSpider(Spider spider) {
if (null == spider.getId()) {
- // 新发现的蜘蛛
+ // 鏂板彂鐜扮殑铚樿洓
checkSpider(spider);
spiderService.upsertByIp(spider);
spiders.put(spider.getIp(), spider);
@@ -153,23 +153,23 @@ public class SpiderValidateFilter implements Filter {
LOGGER.info("find new spider: " + spider);
}
} else if (spider.isVerified()) {
- // 已人工验证的蜘蛛
+ // 宸蹭汉宸ラ獙璇佺殑铚樿洓
spiders.put(spider.getIp(), spider);
} else if (spider.isFake()) {
- // 已发现的假蜘蛛
+ // 宸插彂鐜扮殑鍋囪湗铔�
Date yestoday = DateUtils.addDays(new Date(), -1);
if (spider.getModificationDate().before(yestoday)) {
- // 删除超过1天的假蜘蛛信息
+ // 鍒犻櫎瓒呰繃1澶╃殑鍋囪湗铔涗俊鎭�
spiderService.deleteByIp(spider.getIp());
spiders.remove(spider.getIp());
} else {
spiders.put(spider.getIp(), spider);
}
} else {
- // 已发现的真蜘蛛
+ // 宸插彂鐜扮殑鐪熻湗铔�
Date lastWeek = DateUtils.addDays(new Date(), -7);
if (spider.getModificationDate().before(lastWeek)) {
- // 重新验证超过7天的真蜘蛛
+ // 閲嶆柊楠岃瘉瓒呰繃7澶╃殑鐪熻湗铔�
checkSpider(spider);
if (spider.isFake()) {
spiderService.deleteByIp(spider.getIp());
@@ -191,10 +191,10 @@ public class SpiderValidateFilter implements Filter {
String host = nslookup(spider.getIp());
if (null != host) {
spider.setHost(host);
- // 不是相同域的为假蜘蛛
+ // 涓嶆槸鐩稿悓鍩熺殑涓哄亣铚樿洓
spider.setFake(!isSameDomain(host, spiderDomains.get(spider.getName())));
} else {
- // 反向解析失败,则默认为真蜘蛛
+ // 鍙嶅悜瑙f瀽澶辫触锛屽垯榛樿涓虹湡铚樿洓
spider.setHost(spider.getIp());
spider.setFake(false);
}
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/interceptors/AuthenticationInterceptor.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/interceptors/AuthenticationInterceptor.java
index 9c7f59302..521fd32ae 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/interceptors/AuthenticationInterceptor.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/interceptors/AuthenticationInterceptor.java
@@ -31,7 +31,7 @@ import java.net.URLEncoder;
import java.util.*;
/**
- * 查房通权限拦截器
+ * 鏌ユ埧閫氭潈闄愭嫤鎴櫒
* Created by wenyan on 2015/11/12.
*/
public class AuthenticationInterceptor implements Interceptor {
@@ -75,11 +75,11 @@ public class AuthenticationInterceptor implements Interceptor {
isPassed = false;
}
if(isPassed && city == null){
- LOGGER.info("无法访问" + request.getRequestURI() + "请用cityName 指定访问资源所在的城市");
+ LOGGER.info("鏃犳硶璁块棶" + request.getRequestURI() + "璇风敤cityName 鎸囧畾璁块棶璧勬簮鎵�鍦ㄧ殑鍩庡競");
error = "noAuth";
}
if(isPassed && !isAccessible(user, city, request)){
- LOGGER.info("无法访问" + request.getRequestURI() + "!!!请到菜单管理添加菜单");
+ LOGGER.info("鏃犳硶璁块棶" + request.getRequestURI() + "!!!璇峰埌鑿滃崟绠$悊娣诲姞鑿滃崟");
isPassed = false;
error = "noAuth";
}
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/BaseModel.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/BaseModel.java
index 428aecc02..330320a84 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/BaseModel.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/BaseModel.java
@@ -235,7 +235,7 @@ public class BaseModel extends ModelAndViewSupport {
}
/**
- * 如果queryString不为空则在前面加上问号"?",否则不加
+ * 濡傛灉queryString涓嶄负绌哄垯鍦ㄥ墠闈㈠姞涓婇棶鍙�"?"锛屽惁鍒欎笉鍔�
*
* @return
*/
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/ConsumModel.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/ConsumModel.java
index d8c342e86..768353d38 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/ConsumModel.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/ConsumModel.java
@@ -5,7 +5,7 @@ import com.fangjia.service.bo.DistrictStatBo;
public class ConsumModel extends ChafangtongModel {
private static final long serialVersionUID = 6142958920656840695L;
- private Double avgConsumption; // 周边餐饮人均消费
+ private Double avgConsumption; // 鍛ㄨ竟椁愰ギ浜哄潎娑堣垂
private DistrictStatBo statBo;
private Double higher;
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/Models.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/Models.java
index 8fdb2ea0d..d9a93608b 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/Models.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/Models.java
@@ -3,17 +3,17 @@ package com.fangjia.chafangtong.model;
public final class Models {
/**
- * 404错误面页的model
+ * 404閿欒闈㈤〉鐨刴odel
*/
public static final BaseModel NOT_FOUNT = createModel(404, "/error");
/**
- * 一般错误面页的model
+ * 涓�鑸敊璇潰椤电殑model
*/
public static final BaseModel ERROR = createModel(500, "/error");
/**
- * 500错误面页的model
+ * 500閿欒闈㈤〉鐨刴odel
*/
public static final BaseModel FORBIDDEN = createModel(400, "/forbidden");
diff --git a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/NoResultModel.java b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/NoResultModel.java
index 3e6062be4..ea6ca730a 100644
--- a/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/NoResultModel.java
+++ b/projects/chafangtong/src/main/java/com/fangjia/chafangtong/model/NoResultModel.java
@@ -13,7 +13,7 @@ public class NoResultModel extends ChafangtongModel {
private double maxLng;
double centerLat;
double centerLng;
- String type; // r: 矩形搜索(最大最小经纬度),c:圆形搜索(中心点、半径)
+ String type; // r: 鐭╁舰鎼滅储锛堟渶澶ф渶灏忕粡绾害锛夛紝c锛氬渾褰㈡悳绱紙涓績鐐广�佸崐寰勶級
List