Merge branch 'master' of http://gitlab.fangjia.com/dev0/main into open_v2
This commit is contained in:
+1534
-1480
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,27 @@
|
||||
<#include "/common_js.ftl" />
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
|
||||
<#-- 将表头固定-->
|
||||
<style>
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid #dddddd;
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@@ -31,12 +51,13 @@
|
||||
<div class="list">
|
||||
<table width="50%">
|
||||
<thead>
|
||||
<tr>Ap
|
||||
<tr>
|
||||
API数量: <b>${authorityBoList?size}</b>个
|
||||
<th align="center" width="15%">
|
||||
uri
|
||||
</th>
|
||||
<th align="center" width="15%">
|
||||
描述
|
||||
API名称
|
||||
</th>
|
||||
<th align="center" width="10%">
|
||||
是否有权限<input type="checkbox" id="auth" >全选</input>
|
||||
@@ -63,7 +84,7 @@
|
||||
${bo.uri!}
|
||||
</td>
|
||||
<td align="center">
|
||||
${bo.description!}
|
||||
${bo.name!}
|
||||
</td>
|
||||
<td align="center">
|
||||
<input type="checkbox" <#if bo.hasAuth>checked </#if> id="auth_${bo_index + 1}" ></input>
|
||||
|
||||
@@ -43,10 +43,20 @@
|
||||
<input id="userId" name="userId" value="${userId!}" type="hidden"/>
|
||||
<td>${apiUserBo.userName!}<#if (apiUserBo.displayName??)>(${apiUserBo.displayName!})</#if></td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td>密码</td>-->
|
||||
<#-- <td><input id="resetPwd" type="button" value="重置密码"/></td>-->
|
||||
<#-- </tr>-->
|
||||
<#-- <tr>-->
|
||||
<#-- <td><b>密码</b></td>-->
|
||||
<#-- <td><input name="password" value="${apiUserBo.password!}" /></td>-->
|
||||
<#-- </tr>-->
|
||||
<tr>
|
||||
<td>密码</td>
|
||||
<td><input id="resetPwd" type="button" value="重置密码"/></td>
|
||||
<td>
|
||||
<a href="../apiUser/editPwd?userId=${apiUserBo.userId!}">修改密码</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>账户类型</td>
|
||||
<td>
|
||||
@@ -151,15 +161,15 @@
|
||||
return re.test(strIP)
|
||||
}
|
||||
|
||||
$("#resetPwd").click(function () {
|
||||
if (confirm('确认重置密码为【123456】?')) {
|
||||
$.get('resetPwd',
|
||||
"userId=" + $("#userId").val(),
|
||||
function (data) {
|
||||
alert(status);
|
||||
})
|
||||
}
|
||||
})
|
||||
// $("#resetPwd").click(function () {
|
||||
// if (confirm('确认重置密码为【123456】?')) {
|
||||
// $.get('resetPwd',
|
||||
// "userId=" + $("#userId").val(),
|
||||
// function (data) {
|
||||
// alert(status);
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||
<#compress>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<title>api用户密码修改</title>
|
||||
<link rel="stylesheet" type="text/css" href="../style/main.css?v=${version}"/>
|
||||
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
|
||||
<#include "/common_js.ftl" />
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<#include "/layout/header.ftl" />
|
||||
<div class="main-content">
|
||||
<div class="list">
|
||||
<table width="50%">
|
||||
<form id="submitForm" action="doEditPwd" method="post" >
|
||||
<tr>
|
||||
<td>用户名</td>
|
||||
<input id="userId" name="userId" value="${userId!}" type="hidden"/>
|
||||
<td>${apiUserBo.userName!}<#if (apiUserBo.displayName??)>(${apiUserBo.displayName!})</#if></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>新密码</b></td>
|
||||
<td><input name="password" value="${apiUserBo.password!}" /></td>
|
||||
</tr>
|
||||
</form>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input onclick="submitForm();" type="reset" value="修改"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function submitForm() {
|
||||
$("#submitForm").attr("action", "doEditPwd");
|
||||
$("#submitForm").submit();
|
||||
}
|
||||
|
||||
function isIP(strIP) {
|
||||
if (!strIP)
|
||||
return false;
|
||||
var re = /^(\d+)(\.(\d+)){0,3}$/g //匹配IP地址的正则表达式
|
||||
return re.test(strIP)
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</#compress>
|
||||
@@ -1,150 +1,179 @@
|
||||
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||
<#compress>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>api用户列表</title>
|
||||
<link rel="stylesheet" type="text/css" href="../style/main.css?v=${version}" />
|
||||
<#include "/common_js.ftl" />
|
||||
</head>
|
||||
<body>
|
||||
<#include "/layout/header.ftl" />
|
||||
<div class="main-content">
|
||||
<font color="red">${msg!''}</font>
|
||||
<div class="menuButton">
|
||||
<a href="list" class="list">用户列表</a><a href="add" class="create">新建用户</a>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="list">
|
||||
<div style="padding-left:5px;">
|
||||
共有用户<b>${apiUserBoList?size}</b>个
|
||||
</div>
|
||||
<table width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="center" width="55px">
|
||||
ID
|
||||
</th>
|
||||
<th align="center" width="100px">
|
||||
昵称
|
||||
</th>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<title>api用户列表</title>
|
||||
<link rel="stylesheet" type="text/css" href="../style/main.css?v=${version}"/>
|
||||
<#include "/common_js.ftl" />
|
||||
|
||||
<#-- 将表头固定-->
|
||||
<style>
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid #dddddd;
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.resizable-td {
|
||||
resize: horizontal; /* 允许水平调整大小 */
|
||||
overflow: auto; /* 显示滚动条以便查看超出部分 */
|
||||
min-width: 50px; /* 设置最小宽度,防止过于缩小 */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<#include "/layout/header.ftl" />
|
||||
<div class="main-content">
|
||||
<font color="red">${msg!''}</font>
|
||||
<div class="menuButton">
|
||||
<a href="list" class="list">用户列表</a><a href="add" class="create">新建用户</a>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="list">
|
||||
<div style="padding-left:5px;">
|
||||
共有用户<b>${apiUserBoList?size}</b>个
|
||||
</div>
|
||||
<table width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="center" width="55px">
|
||||
ID
|
||||
</th>
|
||||
<th align="center" width="100px">
|
||||
昵称
|
||||
</th>
|
||||
<th align="center" width="60px">
|
||||
账户用途
|
||||
</th>
|
||||
<th align="center" width="100px">
|
||||
username
|
||||
</th>
|
||||
<th align="center" width="60px">
|
||||
password
|
||||
</th>
|
||||
<th align="center" width="100px">
|
||||
username
|
||||
</th>
|
||||
<th align="center" width="60px">
|
||||
password
|
||||
</th>
|
||||
<th align="center" width="100px">
|
||||
销售负责人
|
||||
</th>
|
||||
<th align="center" width="100px">
|
||||
公司
|
||||
</th>
|
||||
<th align="center" width="550px">
|
||||
appKey
|
||||
</th>
|
||||
<th align="center" width="150px">
|
||||
appKey
|
||||
</th>
|
||||
<th align="center" width="60px">
|
||||
账户类型
|
||||
</th>
|
||||
<th align="center" width="60px">
|
||||
账户用途
|
||||
</th>
|
||||
<th align="center" width="60px">
|
||||
是否监控
|
||||
</th>
|
||||
<th align="center" width="60px">
|
||||
是否监控
|
||||
</th>
|
||||
<th align="center" width="120px">
|
||||
到期时间
|
||||
</th>
|
||||
<th align="center">
|
||||
操作
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<#if (apiUserBoList??&&apiUserBoList?size>0)>
|
||||
<#list apiUserBoList as bo>
|
||||
<tr <#if bo.status!=0>style="background-color:#C3C3C3"</#if>>
|
||||
<td align="center">
|
||||
${bo.userId!}
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="../apiUser/edit?userId=${bo.userId!}">${bo.displayName!}</a>
|
||||
</td>
|
||||
<td>
|
||||
<#if bo.purpose?? && bo.purpose == 1>
|
||||
API
|
||||
<#elseif bo.purpose?? && bo.purpose == 2>
|
||||
PDS
|
||||
<#elseif bo.purpose?? && bo.purpose == 4>
|
||||
房生活
|
||||
</#if>
|
||||
</td>
|
||||
<td align="center">
|
||||
${bo.userName!}
|
||||
</td>
|
||||
<td align="center">
|
||||
<#if bo.password?? && bo.password == t_util.md5Hex('123456')>
|
||||
初始密码
|
||||
<#else>
|
||||
******
|
||||
</#if>
|
||||
</td>
|
||||
<td align="center">
|
||||
${bo.manager!}
|
||||
</td>
|
||||
<td align="center">
|
||||
${bo.company!}
|
||||
</td>
|
||||
<td align="center">
|
||||
${bo.appKey!}
|
||||
</td>
|
||||
<td align="center">
|
||||
<#if bo.isTest==0>
|
||||
正式账户
|
||||
<#else>
|
||||
测试账户
|
||||
</#if>
|
||||
</td>
|
||||
<td>
|
||||
<#if bo.purpose?? && bo.purpose == 1>
|
||||
API
|
||||
<#elseif bo.purpose?? && bo.purpose == 2>
|
||||
PDS
|
||||
<#elseif bo.purpose?? && bo.purpose == 4>
|
||||
房生活
|
||||
</#if>
|
||||
</td>
|
||||
<td>
|
||||
<#if bo.isMonitor==1>
|
||||
是
|
||||
<#else>
|
||||
否
|
||||
</#if>
|
||||
</td>
|
||||
<td align="center">
|
||||
<#if bo.deadTime??>
|
||||
${bo.deadTime?string("yyyy年MM月dd日")}
|
||||
</#if>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="../apiUser/auth?userId=${bo.userId!}">权限控制</a>
|
||||
<a href="../apiUser/city?userId=${bo.userId!}">城市管理</a>
|
||||
<a href="../apiUser/priceRating?userId=${bo.userId!}">价格评级</a>
|
||||
<#if bo.status==0>
|
||||
<a href="javascript:if(confirm('确认禁用?')){location.href='../apiUser/status?userId=${bo.userId!}&status=1'}">禁用</a>
|
||||
<#else>
|
||||
<a href="javascript:if(confirm('确认再次启用?')){location.href='../apiUser/status?userId=${bo.userId!}&status=0'}"><font style="color:#198B3D;">再启用</font></a>
|
||||
</#if>
|
||||
</td>
|
||||
</tr>
|
||||
</#list>
|
||||
</#if>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<th align="center">
|
||||
操作
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<#if (apiUserBoList??&&apiUserBoList?size>0)>
|
||||
<#list apiUserBoList as bo>
|
||||
<tr <#if bo.status!=0>style="background-color:#C3C3C3"</#if>>
|
||||
<td align="center">
|
||||
${bo.userId!}
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="../apiUser/edit?userId=${bo.userId!}">${bo.displayName!}</a>
|
||||
</td>
|
||||
<td>
|
||||
<#if bo.purpose?? && bo.purpose == 1>
|
||||
API
|
||||
<#elseif bo.purpose?? && bo.purpose == 2>
|
||||
PDS
|
||||
<#elseif bo.purpose?? && bo.purpose == 4>
|
||||
房生活
|
||||
</#if>
|
||||
</td>
|
||||
<td align="center">
|
||||
${bo.userName!}
|
||||
</td>
|
||||
<td align="center">
|
||||
<#if bo.password?? && bo.password == t_util.md5Hex('123456')>
|
||||
初始密码
|
||||
<#else>
|
||||
******
|
||||
</#if>
|
||||
</td>
|
||||
<td align="center">
|
||||
${bo.manager!}
|
||||
</td>
|
||||
<td align="center">
|
||||
${bo.company!}
|
||||
</td>
|
||||
<td align="center" class="resizable-td">
|
||||
${bo.appKey!}
|
||||
</td>
|
||||
<td align="center">
|
||||
<#if bo.isTest==0>
|
||||
正式账户
|
||||
<#else>
|
||||
测试账户
|
||||
</#if>
|
||||
</td>
|
||||
<td>
|
||||
<#if bo.purpose?? && bo.purpose == 1>
|
||||
API
|
||||
<#elseif bo.purpose?? && bo.purpose == 2>
|
||||
PDS
|
||||
<#elseif bo.purpose?? && bo.purpose == 4>
|
||||
房生活
|
||||
</#if>
|
||||
</td>
|
||||
<td>
|
||||
<#if bo.isMonitor==1>
|
||||
是
|
||||
<#else>
|
||||
否
|
||||
</#if>
|
||||
</td>
|
||||
<td align="center">
|
||||
<#if bo.deadTime??>
|
||||
${bo.deadTime?string("yyyy年MM月dd日")}
|
||||
</#if>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="../apiUser/auth?userId=${bo.userId!}">API权限控制</a>
|
||||
<a href="../apiUser/auth?userId=${bo.userId!}&msg=0">新增API</a>
|
||||
<a href="../apiUser/city?userId=${bo.userId!}">城市管理</a>
|
||||
<a href="../apiUser/priceRating?userId=${bo.userId!}">价格评级</a>
|
||||
<#if bo.status==0>
|
||||
<a href="javascript:if(confirm('确认禁用?')){location.href='../apiUser/status?userId=${bo.userId!}&status=1'}">禁用</a>
|
||||
<#else>
|
||||
<a href="javascript:if(confirm('确认再次启用?')){location.href='../apiUser/status?userId=${bo.userId!}&status=0'}"><font
|
||||
style="color:#198B3D;">再启用</font></a>
|
||||
</#if>
|
||||
</td>
|
||||
</tr>
|
||||
</#list>
|
||||
</#if>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</#compress>
|
||||
@@ -8,6 +8,25 @@
|
||||
.up {color: green;}
|
||||
#spinner{width:500px;height:100px;margin:30px 0 0 100px;text-align:center;padding-top:50px;border:2px solid #CCC;}
|
||||
#checkMsg{width:500px;margin:30px 0 0 100px;padding:10px 0 10px 50px;text-align:left;border:2px solid #CCC;}
|
||||
|
||||
<#-- 将表头固定-->
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid #dddddd;
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8
@@ -0,0 +1,8 @@
|
||||
package com.fangjia.dal.mongo.dao;
|
||||
|
||||
import com.fangjia.dal.mongo.model.AdministrativeDivision;
|
||||
import com.fangjia.dal.MongoDao;
|
||||
|
||||
public interface AdministrativeDivisionDao extends MongoDao<AdministrativeDivision> {
|
||||
AdministrativeDivision findcityByCode(String code);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.fangjia.dal.mongo.dao;
|
||||
|
||||
|
||||
import com.fangjia.dal.mongo.model.AdministrativeDivision;
|
||||
import com.fangjia.dal.MongoDaoImpl;
|
||||
import com.fangjia.dal.QueryParam;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AdministrativeDivisionDaoImpl extends MongoDaoImpl<AdministrativeDivision> implements AdministrativeDivisionDao {
|
||||
@Override
|
||||
public AdministrativeDivision findcityByCode(String code) {
|
||||
if (StringUtils.isBlank(code)) {
|
||||
return new AdministrativeDivision();
|
||||
}
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("mcaCityCode", QueryParam.EQUAL_OPERATOR, code));
|
||||
params.add(new QueryParam("level", QueryParam.EQUAL_OPERATOR, "³ÇÊÐ"));
|
||||
return (AdministrativeDivision) findFirstByParams(params);
|
||||
}
|
||||
}
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
package com.fangjia.dal.mongo.model;
|
||||
|
||||
import com.fangjia.dal.DatastoreCategory;
|
||||
import com.fangjia.dal.MongoEntity;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "fangjia.administrative_division")
|
||||
|
||||
public class AdministrativeDivision implements MongoEntity {
|
||||
|
||||
private static final long serialVersionUID = -8379446820760559477L;
|
||||
|
||||
private String id;
|
||||
private String province;
|
||||
private String city;
|
||||
private String district;
|
||||
private String mcaProvinceCode;
|
||||
private String mcaDistrictCode;
|
||||
private String mcaCityCode;
|
||||
private String level;
|
||||
private String cityShort;
|
||||
private String distShort;
|
||||
private String provShort;
|
||||
private String code;
|
||||
private String administer;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
@Column(name = "_id")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
@Column(name = "mca_province_code")
|
||||
public String getMcaProvinceCode() {
|
||||
return mcaProvinceCode;
|
||||
}
|
||||
|
||||
public void setMcaProvinceCode(String mcaProvinceCode) {
|
||||
this.mcaProvinceCode = mcaProvinceCode;
|
||||
}
|
||||
|
||||
@Column(name = "mca_district_code")
|
||||
public String getMcaDistrictCode() {
|
||||
return mcaDistrictCode;
|
||||
}
|
||||
|
||||
public void setMcaDistrictCode(String mcaDistrictCode) {
|
||||
this.mcaDistrictCode = mcaDistrictCode;
|
||||
}
|
||||
|
||||
@Column(name = "mca_city_code")
|
||||
public String getMcaCityCode() {
|
||||
return mcaCityCode;
|
||||
}
|
||||
|
||||
public void setMcaCityCode(String mcaCityCode) {
|
||||
this.mcaCityCode = mcaCityCode;
|
||||
}
|
||||
|
||||
@Column(name = "level")
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
@Column(name = "city_short")
|
||||
public String getCityShort() {
|
||||
return cityShort;
|
||||
}
|
||||
|
||||
public void setCityShort(String cityShort) {
|
||||
this.cityShort = cityShort;
|
||||
}
|
||||
|
||||
@Column(name = "dist_short")
|
||||
public String getDistShort() {
|
||||
return distShort;
|
||||
}
|
||||
|
||||
public void setDistShort(String distShort) {
|
||||
this.distShort = distShort;
|
||||
}
|
||||
|
||||
@Column(name = "prov_short")
|
||||
public String getProvShort() {
|
||||
return provShort;
|
||||
}
|
||||
|
||||
public void setProvShort(String provShort) {
|
||||
this.provShort = provShort;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getAdminister() {
|
||||
return administer;
|
||||
}
|
||||
|
||||
public void setAdminister(String administer) {
|
||||
this.administer = administer;
|
||||
}
|
||||
}
|
||||
+3282
-3278
File diff suppressed because it is too large
Load Diff
+28
-16
@@ -1,18 +1,16 @@
|
||||
package com.fangjia.open.controllers;
|
||||
|
||||
import com.fangjia.core.util.*;
|
||||
import com.fangjia.dal.mongo.model.AdministrativeDivision;
|
||||
import com.fangjia.dal.common.DistrictKey;
|
||||
import com.fangjia.dal.mongo.fangjia.model.ServerArea;
|
||||
import com.fangjia.dal.mongo.model.ApiUserCfg;
|
||||
import com.fangjia.dal.mongo.model.DistrictFacilitys;
|
||||
import com.fangjia.dal.mongo.model.Evaluation;
|
||||
import com.fangjia.dal.mongo.model.FangjiaOfficialAreaMap;
|
||||
import com.fangjia.dal.mongo.model.bkoff.Loudong;
|
||||
import com.fangjia.dal.mongo.open.model.ApiUserAuthority;
|
||||
import com.fangjia.dal.mongo.open.model.EvaluateRatio;
|
||||
import com.fangjia.dal.seaweed.model.District;
|
||||
import com.fangjia.open.HttpCode;
|
||||
import com.fangjia.open.OpenHttpCodeEnum;
|
||||
import com.fangjia.open.dto.HouseValueInformationDto;
|
||||
import com.fangjia.open.dto.UniversalDto;
|
||||
import com.fangjia.open.dto.addressGovernance.MatchedBuildingDto;
|
||||
@@ -35,7 +33,6 @@ import com.fangjia.service.mongo.bkoff.HouseLoudongService;
|
||||
import com.fangjia.service.mongo.bkoff.LoudongService;
|
||||
import com.fangjia.service.mongo.fangjia.*;
|
||||
import com.fangjia.service.open.*;
|
||||
import com.fangjia.service.tool.OpenLogService;
|
||||
import com.fangjia.service.web.AddressService;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
@@ -84,6 +81,7 @@ public class ComprehensiveQueryController {
|
||||
static final int BAI_DU_GEO = 1;// 百度系坐标
|
||||
static final int GAO_DE_GEO = 2;// 高德系坐标
|
||||
|
||||
private AdministrativeDivisionService administrativeDivisionService;
|
||||
|
||||
|
||||
private EvaluateRatioService evaluateRatioService;
|
||||
@@ -213,11 +211,22 @@ public class ComprehensiveQueryController {
|
||||
HouseValueInformationDto houseValueInformation = new HouseValueInformationDto();
|
||||
RestfulModelAndView mav = new RestfulModelAndView();
|
||||
|
||||
if (StringUtils.isBlank(model.getAddress()) || StringUtils.isBlank(model.getCity()) || StringUtils.isBlank(String.valueOf(model.getSize()))) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("城市(city),地址(address),面积(size)为必填字段"));
|
||||
if (StringUtils.isBlank(model.getAddress()) || StringUtils.isBlank(String.valueOf(model.getSize()))) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("地址(address),面积(size)为必填字段"));
|
||||
return mav;
|
||||
}
|
||||
|
||||
String cityStr = model.getCity();
|
||||
if (StringUtils.isNotBlank(cityStr) && cityStr.matches("\\d+")) {
|
||||
AdministrativeDivision administrativeDivision = administrativeDivisionService.findcityByCode(cityStr);
|
||||
String city = administrativeDivision.getCityShort();
|
||||
if (StringUtils.isBlank(city)) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("城市代码错误"));
|
||||
return mav;
|
||||
}
|
||||
model.setCity(city);
|
||||
}
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
JSONObject json = null;
|
||||
Map<String, String> communityAvgPriceParams = new HashMap<String, String>();
|
||||
@@ -228,10 +237,11 @@ public class ComprehensiveQueryController {
|
||||
JSONObject matchResponse = null;
|
||||
try {
|
||||
matchResponse = httpRequest.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/v2/match", communityAvgPriceParams, "UTF-8");
|
||||
// matchResponse = httpRequest.getJsonContent("http://192.168.0.19:31080/FangJiaAddressService/v2/match", communityAvgPriceParams, "UTF-8");
|
||||
} catch (HttpRequestException e) {
|
||||
|
||||
}
|
||||
if(matchResponse == null || !matchResponse.containsKey("result") || !matchResponse.getJSONObject("result").containsKey("id")) {
|
||||
if (matchResponse == null || !matchResponse.containsKey("result") || !matchResponse.getJSONObject("result").containsKey("id")) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("该地址不支持估价!"));
|
||||
return mav;
|
||||
}
|
||||
@@ -266,6 +276,8 @@ public class ComprehensiveQueryController {
|
||||
district = bieShuDistrict;
|
||||
}
|
||||
}
|
||||
//添加城市
|
||||
propertyEvaluationModel.setCity(district.getCity());
|
||||
propertyEvaluationModel.setDistrict(district.getRegion());
|
||||
propertyEvaluationModel.setName(district.getName());
|
||||
try {
|
||||
@@ -286,7 +298,7 @@ public class ComprehensiveQueryController {
|
||||
// RestfulModelAndView houseCaseMav = new RestfulModelAndView();
|
||||
List<CollateralSampleQueryBean> querys = null;
|
||||
try {
|
||||
querys = convertSampileQueryToBean(district,sampleQuery);
|
||||
querys = convertSampileQueryToBean(district, sampleQuery);
|
||||
} catch (Exception e) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel(e.getMessage()));
|
||||
return mav;
|
||||
@@ -298,7 +310,7 @@ public class ComprehensiveQueryController {
|
||||
long start = System.currentTimeMillis();
|
||||
List<Collateral> collaterals = czbankSampleService.findSample2(querys, sampleQuery.getMax());
|
||||
long end = System.currentTimeMillis();
|
||||
System.out.println("用时:"+(end-start));
|
||||
System.out.println("用时:" + (end - start));
|
||||
Collateral collateral = collaterals.get(0);
|
||||
List<Sample> samples = collateral.getSample();
|
||||
UniversalDto houseCaseDto = UniversalDto.newDto();
|
||||
@@ -425,7 +437,7 @@ public class ComprehensiveQueryController {
|
||||
return propertyModel;
|
||||
}
|
||||
|
||||
private List<CollateralSampleQueryBean> convertSampileQueryToBean(District district,SampleQuery... queries) throws Exception {
|
||||
private List<CollateralSampleQueryBean> convertSampileQueryToBean(District district, SampleQuery... queries) throws Exception {
|
||||
|
||||
List<CollateralSampleQueryBean> queryBeans = new ArrayList<CollateralSampleQueryBean>(queries.length);
|
||||
for (SampleQuery q : queries) {
|
||||
@@ -497,10 +509,10 @@ public class ComprehensiveQueryController {
|
||||
throws NumberFormatException, IllegalAccessException {
|
||||
// RestfulModelAndView mav = new RestfulModelAndView();
|
||||
// mav.setViewType("rest");
|
||||
if (StringUtils.isBlank(model.getCity()) || StringUtils.isBlank(model.getName())
|
||||
if (StringUtils.isBlank(model.getName())
|
||||
|| StringUtils.isBlank(model.getDistrict()) || model.getSize() <= 0) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("参数非法:城市,区域,小区名,面积(size)为必填项"));
|
||||
return mav;
|
||||
mav.setModel(BasicModel.buildBadRequestModel("参数非法:区域,小区名,面积(size)为必填项"));
|
||||
// return mav;
|
||||
}
|
||||
if (model.getCity().endsWith("市")) {
|
||||
model.setCity(model.getCity().replaceAll("市$", ""));
|
||||
@@ -1229,8 +1241,6 @@ public class ComprehensiveQueryController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setEvaluationService(EvaluationService evaluationService) {
|
||||
this.evaluationService = evaluationService;
|
||||
}
|
||||
@@ -1253,7 +1263,6 @@ public class ComprehensiveQueryController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public BatchEvaluateService getBatchEvaluateService() {
|
||||
return batchEvaluateService;
|
||||
}
|
||||
@@ -1312,5 +1321,8 @@ public class ComprehensiveQueryController {
|
||||
this.districtFacilitysService = districtFacilitysService;
|
||||
}
|
||||
|
||||
public void setAdministrativeDivisionService(AdministrativeDivisionService administrativeDivisionService) {
|
||||
this.administrativeDivisionService = administrativeDivisionService;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-3
@@ -880,8 +880,13 @@ public class PropertyController {
|
||||
districtInfoDto.setAddressAlias(district.getAddrAlias());
|
||||
if (district.getLat2() != null && district.getLat2() != 0 && district.getLng2() != null
|
||||
&& district.getLng2() != 0) {
|
||||
districtInfoDto.setLat(district.getLat2() / 10000000000D);
|
||||
districtInfoDto.setLng(district.getLng2() / 10000000000D);
|
||||
districtInfoDto.setLat2(district.getLat2() / 10000000000D);
|
||||
districtInfoDto.setLng2(district.getLng2() / 10000000000D);
|
||||
}
|
||||
if (district.getLat() != null && district.getLat() != 0 && district.getLng() != null
|
||||
&& district.getLng() != 0) {
|
||||
districtInfoDto.setLat(district.getLat() / 10000000000D);
|
||||
districtInfoDto.setLng(district.getLng() / 10000000000D);
|
||||
}
|
||||
districtInfoDto.setPropertyType(district.getEstateType2());
|
||||
if (HouseValidator.validateBuildingType(district.getBuildType())) {
|
||||
@@ -3508,7 +3513,8 @@ public class PropertyController {
|
||||
if (model.getHall() != null) {
|
||||
params.add(new QueryParam("hall", model.getHall()));
|
||||
}
|
||||
params.add(new QueryParam("score", QueryParam.GREATER_THAN_OPERATOR, 200000000000l));
|
||||
// 18年之后抓住的数据没有score字段
|
||||
// params.add(new QueryParam("score", QueryParam.GREATER_THAN_OPERATOR, 200000000000l));
|
||||
List<DealPrice> dealPrices = dealPriceService.findDealPrices(params, max);
|
||||
List<DealPrice> distinctDealPrices = new ArrayList<DealPrice>();
|
||||
for (DealPrice dealPrice : dealPrices) {
|
||||
|
||||
@@ -26,8 +26,14 @@ public class DistrictInfoDto {
|
||||
private List<String> alias;
|
||||
private List<String> addressAlias;
|
||||
private String videoUrl;
|
||||
//高德坐标
|
||||
//维度
|
||||
private Double lat;
|
||||
//经度
|
||||
private Double lng;
|
||||
// 百度坐标
|
||||
private Double lat2;
|
||||
private Double lng2;
|
||||
private String developer;
|
||||
private String buildType;
|
||||
private String estateCompany;
|
||||
@@ -102,7 +108,22 @@ public class DistrictInfoDto {
|
||||
private String township;
|
||||
private String landProperty;
|
||||
|
||||
|
||||
public Double getLat2() {
|
||||
return lat2;
|
||||
}
|
||||
|
||||
public void setLat2(Double lat2) {
|
||||
this.lat2 = lat2;
|
||||
}
|
||||
|
||||
public Double getLng2() {
|
||||
return lng2;
|
||||
}
|
||||
|
||||
public void setLng2(Double lng2) {
|
||||
this.lng2 = lng2;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.fangjia.open;
|
||||
|
||||
public class test {
|
||||
public static void main(String[] args) {
|
||||
String a = "123545";
|
||||
String b ="i980";
|
||||
System.out.println(a.matches("\\d+"));
|
||||
System.out.println(b.matches("\\d+"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.fangjia;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class test {
|
||||
public static void main(String[] args) {
|
||||
while (true){
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
String password = scanner.nextLine();
|
||||
String p =DigestUtils.md5Hex(password);
|
||||
System.out.println(p);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -530,7 +530,13 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.fangjia</groupId>-->
|
||||
<!-- <artifactId>fangjia-open</artifactId>-->
|
||||
<!-- <version>0.0.1-SNAPSHOT</version>-->
|
||||
<!-- <scope>compile</scope>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
</dependencies>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -32,7 +32,8 @@ public enum Watcher {
|
||||
BaYi('15300424133','bayi@fangjia.com'),
|
||||
WeiLei('18101751850','weilei@fangjia.com'),
|
||||
JiangYaHui('13684913780','jiangyahui@fangjia.com'),
|
||||
ShenJian('13764369683', 'shenjian@fangjia.com')
|
||||
ShenJian('13764369683', 'shenjian@fangjia.com'),
|
||||
MaJinTao('13607600062','majintao@fangjia.com')
|
||||
private final String mobile;
|
||||
private final String email;
|
||||
|
||||
|
||||
+3
-4
@@ -28,8 +28,8 @@ class DealPriceDataProcess {
|
||||
def task = new DealPriceDataProcess()
|
||||
// task.process()//运当成交pe值不好时行,拉升成交价格及删除pe太大数据
|
||||
// task.addLianJiaPrice();
|
||||
// task.deleteThirdPartyData()//删除第三方
|
||||
task.delDealByPe()
|
||||
task.deleteThirdPartyData()//删除第三方
|
||||
// task.delDealByPe()//删除成交
|
||||
// task.delDealData()
|
||||
|
||||
// task.exportThirdParty()
|
||||
@@ -37,8 +37,7 @@ class DealPriceDataProcess {
|
||||
}
|
||||
|
||||
def delDealByPe(){
|
||||
def yearMonth = 202312
|
||||
def thirdMonth = 202112
|
||||
def yearMonth = 202401
|
||||
|
||||
def rets = findAllDealByPe(yearMonth, 18)
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ class GuiDingPriceBatch extends BaseBatch{
|
||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||
|
||||
//添加自己库中的人工指导价
|
||||
def prices = CcbCommonUtils.findPersonPrice(city, "2023-11-26", "2023-12-27")
|
||||
def prices = CcbCommonUtils.findPersonPrice(city, "2024-01-10", "2024-01-28")
|
||||
// def prices = CcbCommonUtils.findPersonPrice(city, "2022-01-01", "2022-11-22")
|
||||
if(prices){
|
||||
def distMap = getDistrictMap(city)
|
||||
|
||||
+7
-7
@@ -1288,7 +1288,7 @@ def findAvgPrice(def commid, def pgsqlInstance, def cityid){
|
||||
|
||||
|
||||
|
||||
def fileName = "D:\\数据\\建行\\房产估值\\指导价\\20231222--修正人工指导价.xlsx"
|
||||
def fileName = "D:\\数据\\建行\\房产估值\\指导价\\20240127.xlsx"
|
||||
|
||||
ExcelUtils.multiThreadingModify(fileName, {d->
|
||||
if(d['A']){
|
||||
@@ -1303,13 +1303,13 @@ ExcelUtils.multiThreadingModify(fileName, {d->
|
||||
if(!d['I']){
|
||||
def dist = CommonDatautils.findDistrictById(d['C'])
|
||||
if(dist){
|
||||
d['I'] = dist.region
|
||||
d['F'] = dist.region
|
||||
// d['H'] = dist.name
|
||||
d['J'] = dist.status
|
||||
if(d['A']=="天门" || d['A']=="迪庆"){
|
||||
def val = d['E'].toString().toDouble().toInteger() + RandomUtil.random(-200,200)
|
||||
d['K'] = val.toInteger()
|
||||
}
|
||||
d['G'] = dist.status
|
||||
// if(d['A']=="天门" || d['A']=="迪庆"){
|
||||
// def val = d['E'].toString().toDouble().toInteger() + RandomUtil.random(-200,200)
|
||||
// d['K'] = val.toInteger()
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class ThirdPartyPriceBatch extends BaseBatch {
|
||||
// ps.addBatch(id)
|
||||
// }
|
||||
// }
|
||||
|
||||
//
|
||||
def citys = CcbCommonUtils.getRunningCitys(args)
|
||||
def rows = []
|
||||
def index = 0
|
||||
|
||||
+5
-5
@@ -93,13 +93,13 @@ class TradeStatLog {
|
||||
def run(){
|
||||
def citys = CcbCommonUtils.citys_all;
|
||||
def rets = []
|
||||
rets << ["城市","23年9月总量","23年10月总量","23年11月总量","占比","贝壳","链家", "我爱我家","幸福里APP","中原"]
|
||||
rets << ["城市","23年10月总量","23年11月总量","23年12月总量","占比","贝壳","链家", "我爱我家","幸福里APP","中原"]
|
||||
def sources = ["贝壳找房","链家在线","我爱我家","房天下","中原地产"]
|
||||
//def startDate = "2021-05-01"
|
||||
def startDate = "2023-09-01"
|
||||
def date = "2023-10-01"
|
||||
def endDate = "2023-11-01"
|
||||
def newDate = "2023-12-01"
|
||||
def startDate = "2023-10-01"
|
||||
def date = "2023-11-01"
|
||||
def endDate = "2023-12-01"
|
||||
def newDate = "2024-01-01"
|
||||
|
||||
for(def city : citys){
|
||||
def lastMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ class ExportPgsqlBaseEvaluation {
|
||||
|
||||
def database = "base"
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def linux_prefix = "/home/goojia/ccb_data/evaluation/"
|
||||
def linux_prefix = "/home/goojia/ccb_data/evaluation/"
|
||||
def win_prefix = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\evaluation\\${curDate}\\"
|
||||
|
||||
static main(args) {
|
||||
|
||||
+116
-37
@@ -6,6 +6,7 @@ import com.fangjia.core.util.BaiDuApiUtils
|
||||
import com.fangjia.core.util.CNNMFilter
|
||||
import com.fangjia.core.util.GeocodeUtils
|
||||
import com.fangjia.core.util.HttpRequest
|
||||
import com.fangjia.script.gj.village.BaiduCoordinateConverter
|
||||
import com.fangjia.script.util.CosineSimilarAlgorithm
|
||||
import net.sf.json.JSONObject
|
||||
import net.sf.json.groovy.JsonSlurper
|
||||
@@ -337,7 +338,7 @@ class OpenApiUtils {
|
||||
lat2 = null
|
||||
lng2 = null
|
||||
}
|
||||
println "√百度地图:【"+ret.get("city")+"-"+ret.get("area")+"-"+ret.get("name")+"-"+address+"】" +" DB:【"+city+"-"+region+"-"+name+"】"
|
||||
println "√百度地图:【"+ret.get("city")+"-"+ret.get("area")+"-"+ret.get("name")+" "+map.estateType+"-"+address+"】" +" DB:【"+city+"-"+region+"-"+name+"】"
|
||||
}
|
||||
|
||||
// }else{
|
||||
@@ -373,15 +374,18 @@ class OpenApiUtils {
|
||||
}
|
||||
|
||||
|
||||
static def searchBaiDuMap(String address, String region, int cityCode) {
|
||||
static def searchBaiDuMap(String region, String township, String keyword,int cityCode) {
|
||||
def rets = []
|
||||
keyword = keyword.replace("居民委员会","").replace("居委会","").replace("居委会","").replace("居委","").replace("村民委员会","").replace("村村委会","村").replace("村委会","村")
|
||||
def address = keyword
|
||||
try {
|
||||
Thread.sleep(500)
|
||||
long t = System.currentTimeMillis()
|
||||
// String url = "http://map.baidu.com/?newmap=1&reqflag=pcmap&biz=1&from=webmap&da_par=baidu&pcevaname=pc4.1" +
|
||||
// "&qt=con&da_src=searchBox.button&wd="+URLEncoder.encode(address,"UTF-8")+"&c=${cityCode}&src=0&wd2=&sug=0&l=13" +
|
||||
// "&sug_forward=&tn=B_NORMAL_MAP&nn=0&u_loc=13509900,3640104&ie=utf-8&t=${t}"
|
||||
String url = "https://map.baidu.com/?newmap=1&reqflag=pcmap&biz=1&from=webmap&da_par=baidu&pcevaname=pc4.1&qt=s&da_src=searchBox.button&wd="+URLEncoder.encode(address,"UTF-8")+"&c=${cityCode}&src=0&wd2=&pn=0&sug=0&l=11&from=webmap&sug_forward=&auth=7dDde8w2f6QfKBaV88xOONTKIxBMTxbHuxHNLELRBNLt1qo6DF%3D%3DC1GgvPUDZYOYIZuVt1cv3uVtGccZcuVtPWv3GuztQZ3wWvUvhgMZSguxzBEHLNRTVtcEWe1GD8zv7u%40ZPuVteuztghxehwzJP4G46zzWvnrRR1aDcvY1SGpuxEtEjjg2e&device_ratio=1&tn=B_NORMAL_MAP&nn=0&u_loc=13509900,3640104&ie=utf-8&t=${t}";
|
||||
// String url = "https://map.baidu.com/?newmap=1&reqflag=pcmap&biz=1&from=webmap&da_par=baidu&pcevaname=pc4.1&qt=s&da_src=searchBox.button&wd="+URLEncoder.encode(address,"UTF-8")+"&c=${cityCode}&src=0&wd2=&pn=0&sug=0&l=11&from=webmap&sug_forward=&auth=7dDde8w2f6QfKBaV88xOONTKIxBMTxbHuxHNLELRBNLt1qo6DF%3D%3DC1GgvPUDZYOYIZuVt1cv3uVtGccZcuVtPWv3GuztQZ3wWvUvhgMZSguxzBEHLNRTVtcEWe1GD8zv7u%40ZPuVteuztghxehwzJP4G46zzWvnrRR1aDcvY1SGpuxEtEjjg2e&device_ratio=1&tn=B_NORMAL_MAP&nn=0&u_loc=13509900,3640104&ie=utf-8&t=${t}";
|
||||
String url = "https://map.baidu.com/?newmap=1&reqflag=pcmap&biz=1&from=webmap&da_par=baidu&pcevaname=pc4.1&qt=s&da_src=searchBox.button&wd="+URLEncoder.encode(address,"UTF-8")+"&src=0&wd2=&pn=0&sug=0&l=11&from=webmap&sug_forward=&auth=7dDde8w2f6QfKBaV88xOONTKIxBMTxbHuxHNLELRBNLt1qo6DF%3D%3DC1GgvPUDZYOYIZuVt1cv3uVtGccZcuVtPWv3GuztQZ3wWvUvhgMZSguxzBEHLNRTVtcEWe1GD8zv7u%40ZPuVteuztghxehwzJP4G46zzWvnrRR1aDcvY1SGpuxEtEjjg2e&device_ratio=1&tn=B_NORMAL_MAP&nn=0&u_loc=13509900,3640104&ie=utf-8&t=${t}";
|
||||
def content = new HttpRequest().get(url, null, "utf-8")
|
||||
JSONObject json = JSONObject.fromObject(content)
|
||||
|
||||
@@ -389,49 +393,58 @@ class OpenApiUtils {
|
||||
for (def loc : json.content) {
|
||||
String name = formatName(address)
|
||||
if(loc.uid) {
|
||||
def bean = [:]
|
||||
JSONObject uidInfo = BaiDuApiUtils.getDetailByUid(loc.uid)
|
||||
JSONObject uidInfo = null;//BaiDuApiUtils.getDetailByUid(loc.uid)
|
||||
if(uidInfo != null) {
|
||||
def baiduRegion = uidInfo.get("result").area
|
||||
def baiduCity = uidInfo.get("result").city
|
||||
rets = createData(rets, uidInfo, loc, region, name, address)
|
||||
}else{
|
||||
def baiduCity = loc.city_name
|
||||
if(baiduCity.contains("市")){
|
||||
baiduCity = baiduCity.substring(0, baiduCity.indexOf("市"))
|
||||
}
|
||||
baiduCity = RegionData.formatCity(baiduCity)
|
||||
def newName = formatName(loc.name)
|
||||
if(baiduRegion.contains(region) && (name== newName || address==newName)){
|
||||
JSONObject result = uidInfo.get("result")
|
||||
JSONObject lo = result.get("location")
|
||||
Double lng2 = lo.get("lng")
|
||||
Double lat2 = lo.get("lat")
|
||||
bean.lng2 = lng2
|
||||
bean.lat2 = lat2
|
||||
if(!baiduCity){
|
||||
baiduCity = loc.history_address
|
||||
if(baiduCity.contains("市")){
|
||||
baiduCity = baiduCity.substring(0, baiduCity.indexOf("市"))
|
||||
}
|
||||
baiduCity = RegionData.formatCity(baiduCity)
|
||||
}
|
||||
if(!baiduCity){
|
||||
baiduCity = loc.area_name
|
||||
if(baiduCity.contains("市")){
|
||||
baiduCity = baiduCity.substring(0, baiduCity.indexOf("市"))
|
||||
}
|
||||
baiduCity = RegionData.formatCity(baiduCity)
|
||||
}
|
||||
|
||||
def baiduRegion = loc.area_name.replace(baiduCity,"")
|
||||
|
||||
keyword = keyword.replace("社区","")
|
||||
def bdName = loc.name.replace("居民委员会","").replace("居委会","").replace("居委","").replace("村民委员会","").replace("村村委会","村").replace("村委会","村").replace("社区","")
|
||||
|
||||
def score1 = CosineSimilarAlgorithm.getSimilarityRatio(bdName, keyword);
|
||||
def score2 = CosineSimilarAlgorithm.getSimilarityRatio(loc.addr, keyword);
|
||||
if(score1 || score2){
|
||||
def bean = [:]
|
||||
bean.name = loc.name
|
||||
bean.address = loc.addr.replace("[]","")
|
||||
bean.city = baiduCity
|
||||
bean.region = baiduRegion
|
||||
def gmap = GeocodeUtils.geoconvBaiduToGoogle(lng2, lat2)
|
||||
def lng = gmap.get("lng")
|
||||
def lat = gmap.get("lat")
|
||||
bean.lng = lng
|
||||
bean.lat = lat
|
||||
if(result.get("detail_info")){
|
||||
bean.estateType = result.get("detail_info").get("tag")
|
||||
if(loc.admin_info){
|
||||
bean.township = loc.admin_info.town_name
|
||||
}
|
||||
|
||||
if(bean.estateType && (bean.estateType.contains('出入口') || bean.estateType.contains('公交车站'))){
|
||||
println "X百度搜索地图:【"+baiduCity+"-"+baiduRegion+"-"+newName+"-"+result.get("address")+"】" +" 搜索:【"+address+"】-${bean.estateType}"
|
||||
}else{
|
||||
println "√百度搜索地图:【"+baiduCity+"-"+baiduRegion+"-"+newName+"-"+result.get("address")+"】" +" 搜索:【"+address+"】"
|
||||
rets << bean;
|
||||
def locArrs = BaiduCoordinateConverter.bdMercator2Latlng(loc.diPointX/100.0, loc.diPointY/100.0)
|
||||
if(locArrs){
|
||||
def gmap = GeocodeUtils.geoconvBaiduToGoogle(locArrs[0], locArrs[1])
|
||||
bean.lng = gmap.get("lng")
|
||||
bean.lat = gmap.get("lat")
|
||||
}
|
||||
|
||||
bean.estateType = loc.std_tag
|
||||
bean.score = score1 + score2
|
||||
rets << bean;
|
||||
println "√百度搜索地图:【"+baiduCity+"-"+baiduRegion+"-"+loc.name+"-"+ loc.addr.replace("[]","")+" "+bean.estateType+"】" +" 搜索:【"+address+"】(score:"+score1+"#"+score2+")"
|
||||
}else{
|
||||
def score1 = CosineSimilarAlgorithm.getSimilarityRatio(loc.name, address);
|
||||
def score2 = CosineSimilarAlgorithm.getSimilarityRatio(loc.addr, address);
|
||||
if(score1 || score2){
|
||||
rets << bean;
|
||||
println "√百度搜索地图:【"+baiduCity+"-"+baiduRegion+"-"+newName+"-"+ loc.addr.replace("[]","")+"】" +" 搜索:【"+address+"】(score:"+score1+"#"+score2+")"
|
||||
}else{
|
||||
println "X 百度搜索地图:【"+loc.get("area_name")+"-"+loc.get("area_name")+"-"+loc.get("name")+"-"+loc.get("addr")+"】" +" 搜索:【"+address+"】"
|
||||
}
|
||||
println "X 百度搜索地图:【"+loc.get("area_name")+"-"+loc.get("area_name")+"-"+loc.get("name")+"-"+loc.get("addr")+"】" +" 搜索:【"+address+"】"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -444,6 +457,71 @@ class OpenApiUtils {
|
||||
return rets;
|
||||
}
|
||||
|
||||
def static createData(def rets, def uidInfo, def loc, region, name, address){
|
||||
def bean = [:]
|
||||
def baiduRegion = uidInfo.get("result").area
|
||||
def baiduCity = uidInfo.get("result").city
|
||||
baiduCity = RegionData.formatCity(baiduCity)
|
||||
def newName = formatName(loc.name)
|
||||
if(baiduRegion.contains(region) && (name== newName || address==newName)){
|
||||
JSONObject result = uidInfo.get("result")
|
||||
JSONObject lo = result.get("location")
|
||||
Double lng2 = lo.get("lng")
|
||||
Double lat2 = lo.get("lat")
|
||||
bean.lng2 = lng2
|
||||
bean.lat2 = lat2
|
||||
bean.name = loc.name
|
||||
bean.address = loc.addr.replace("[]","")
|
||||
bean.city = baiduCity
|
||||
bean.region = baiduRegion
|
||||
bean.township = loc.admin_info.town_name
|
||||
bean.score = 1
|
||||
def gmap = GeocodeUtils.geoconvBaiduToGoogle(lng2, lat2)
|
||||
def lng = gmap.get("lng")
|
||||
def lat = gmap.get("lat")
|
||||
bean.lng = lng
|
||||
bean.lat = lat
|
||||
if(result.get("detail_info")){
|
||||
bean.estateType = result.get("detail_info").get("tag")
|
||||
}
|
||||
|
||||
if(bean.estateType && (bean.estateType.contains('出入口') || bean.estateType.contains('公交车站'))){
|
||||
println "X百度搜索地图:【"+baiduCity+"-"+baiduRegion+"-"+newName+"-"+result.get("address")+"】" +" 搜索:【"+address+"】-${bean.estateType}"
|
||||
}else{
|
||||
println "√百度搜索地图:【"+baiduCity+"-"+baiduRegion+"-"+newName+"-"+result.get("address")+"】" +" 搜索:【"+address+"】"
|
||||
rets << bean;
|
||||
}
|
||||
|
||||
}else{
|
||||
def score1 = CosineSimilarAlgorithm.getSimilarityRatio(loc.name, address);
|
||||
def score2 = CosineSimilarAlgorithm.getSimilarityRatio(loc.addr, address);
|
||||
if(score1 || score2){
|
||||
|
||||
JSONObject result = uidInfo.get("result")
|
||||
JSONObject lo = result.get("location")
|
||||
bean.lng2 = lo.get("lng")
|
||||
bean.lat2 = lo.get("lat")
|
||||
bean.name = loc.name
|
||||
bean.address = loc.addr.replace("[]","")
|
||||
bean.city = baiduCity
|
||||
bean.region = baiduRegion
|
||||
bean.township = loc.admin_info.town_name
|
||||
def gmap = GeocodeUtils.geoconvBaiduToGoogle(bean.lng2, bean.lat2)
|
||||
bean.lng = gmap.get("lng")
|
||||
bean.lat = gmap.get("lat")
|
||||
if(result.get("detail_info")){
|
||||
bean.estateType = result.get("detail_info").get("tag")
|
||||
}
|
||||
bean.score = score1 + score2
|
||||
rets << bean;
|
||||
println "√百度搜索地图:【"+baiduCity+"-"+baiduRegion+"-"+newName+"-"+bean.estateType+"-"+ loc.addr.replace("[]","")+"】" +" 搜索:【"+address+"】(score:"+score1+"#"+score2+")"
|
||||
}else{
|
||||
println "X 百度搜索地图:【"+loc.get("area_name")+"-"+loc.get("area_name")+"-"+loc.get("name")+"-"+loc.get("addr")+"】" +" 搜索:【"+address+"】"
|
||||
}
|
||||
}
|
||||
return rets;
|
||||
}
|
||||
|
||||
def static formatName(String name) {
|
||||
if(name.indexOf("¡¤") != -1) {
|
||||
name = name.replaceAll("¡¤", "")
|
||||
@@ -629,6 +707,7 @@ class OpenApiUtils {
|
||||
static def financialRating(city, address){
|
||||
def url = "http://open.fangjia.com/address/financialRating?city=${city}&address=${address}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
|
||||
String content = new HttpRequest().get(url, "utf-8");
|
||||
print(url)
|
||||
if(content){
|
||||
def doc = new JsonSlurper().parseText(content)
|
||||
if(doc && doc.code ==0 && doc.result){
|
||||
|
||||
@@ -158,7 +158,6 @@ class PoiLocation {
|
||||
gmap.lat = DataHandleUtils.getDoubleRound(6, gmap.lat)
|
||||
}
|
||||
return location;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
+3
-3
@@ -48,13 +48,13 @@ class YouDaDataParser {
|
||||
def final AtomicInteger count_ = new AtomicInteger(0)
|
||||
|
||||
|
||||
static def statDate = "2023-11-01"
|
||||
static def statDate = DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(), -1),"yyyy-MM-dd")
|
||||
static main(args) {
|
||||
def task = new YouDaDataParser();
|
||||
// task.newHouseparse();//友达一手房存入mongo
|
||||
// task.esfParser("D:\\数据\\友达\\2023年12月\\查询1.DBF");//友达二手房存入mongo
|
||||
task.esfParser("D:\\数据\\友达\\2024年1月\\查询1.DBF");//友达二手房存入mongo
|
||||
// task.newhouseToSaveEs();//新房保存到es
|
||||
task.esfhouseToSaveEs();//二手房保存到es
|
||||
// task.esfhouseToSaveEs();//二手房保存到es
|
||||
// task.updateFinishDateByEsfTrade();//根据二手成交的竣工时间修改seaweed库中的竣工时间
|
||||
}
|
||||
|
||||
|
||||
+221
-2
@@ -1,10 +1,17 @@
|
||||
package com.fangjia.script.gj.abc
|
||||
|
||||
import com.fangjia.core.RegionData
|
||||
import com.fangjia.script.ccbevaluation.CcbCommonUtils
|
||||
import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.gj.district.FangjiaClientUtils
|
||||
import com.fangjia.script.util.DateUtils
|
||||
import com.fangjia.script.util.DbUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.fangjia.script.util.GeoHelper
|
||||
import com.fangjia.script.util.OpenApiClient
|
||||
import com.fangjia.script.yinjihaun.amap.GaoDeApiUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
import com.mongodb.DBObject
|
||||
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
import java.util.concurrent.CountDownLatch
|
||||
@@ -19,11 +26,223 @@ class SuzouPocTest {
|
||||
|
||||
static main(args) {
|
||||
def task = new SuzouPocTest()
|
||||
task.run()
|
||||
// task.run()
|
||||
task.newRun()
|
||||
}
|
||||
|
||||
def newRun(){
|
||||
println("start:"+new Date().toString())
|
||||
def filePath = "D:\\数据\\江苏农行\\押品填报表_测试数据样例-给公司.xls"
|
||||
newMatch(filePath)
|
||||
addEvalutePrice(filePath)
|
||||
addLation(filePath)
|
||||
addAroundPrice(filePath)
|
||||
println("end:"+new Date().toString())
|
||||
|
||||
|
||||
}
|
||||
|
||||
def newMatch(filePath){
|
||||
ExcelUtils.multiThreadingModify(filePath, { d ->
|
||||
if(d['G'] && !d['J']){
|
||||
def city = d['B']
|
||||
def address = d['E']
|
||||
def name = d['G']
|
||||
def region = d['C']
|
||||
if(region && name){
|
||||
address = region + name
|
||||
}
|
||||
|
||||
city = RegionData.formatCity(city)
|
||||
if(region){
|
||||
region = RegionData.formatRegion(city, region)
|
||||
}
|
||||
def obj = CommonDatautils.findDistrict(city, region, name.trim(), "district");
|
||||
if(obj){
|
||||
d['M'] = obj._id.toString()
|
||||
d['N'] = obj.get("city")
|
||||
d['O'] = obj.get("region")
|
||||
d['P'] = obj.get("name")
|
||||
if(obj.lng){
|
||||
d['Q'] = obj.get("lng")/10000000000.0
|
||||
d['R'] = obj.get("lat")/10000000000.0
|
||||
}
|
||||
d['S'] = "直接从库中查询"
|
||||
}else{
|
||||
//新的匹配算法
|
||||
def jsonObject = FangjiaClientUtils.newMatch(city, address, "property", false)
|
||||
if(!jsonObject && !jsonObject.containsKey("result")){
|
||||
jsonObject = FangjiaClientUtils.newMatch(city, address, "property", true)
|
||||
}
|
||||
if(!jsonObject && !jsonObject.containsKey("result")){
|
||||
def newAddr = d['E']
|
||||
if(!d['E'].contains(d['C'])){
|
||||
newAddr = d['C'] + d['E']
|
||||
}
|
||||
jsonObject = FangjiaClientUtils.newMatch(city, newAddr, "property", true)
|
||||
}
|
||||
if(!jsonObject.containsKey("result")){
|
||||
//老匹配
|
||||
jsonObject = OpenApiClient.addressMatch(city, address, null, false, region, name)
|
||||
if(jsonObject && jsonObject.credit>0){
|
||||
d['S'] = "老匹配"
|
||||
}
|
||||
}
|
||||
if (jsonObject != null && !jsonObject.containsKey("result")) {
|
||||
d['M'] = jsonObject.get("id")
|
||||
d['N'] = jsonObject.get("city")
|
||||
d['O'] = jsonObject.get("district")
|
||||
d['P'] = jsonObject.get("name")
|
||||
d['Q'] = jsonObject.get("lng")
|
||||
d['R'] = jsonObject.get("lat")
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
def addEvalutePrice(filePath){
|
||||
ExcelUtils.multiThreadingModify(filePath, { d ->
|
||||
def city = d['N']
|
||||
if(city && !d['J']){
|
||||
def region = d['O']
|
||||
def name = d['P']
|
||||
def area = d['F']
|
||||
def address = d['E']
|
||||
def floor = null
|
||||
if (d['H'] && d['H'].toString().isNumber()) {
|
||||
floor = d['H'].toString().toDouble().toInteger().toString()
|
||||
}
|
||||
def height = null
|
||||
if (d['J'] && d['J'].toString().isNumber()) {
|
||||
height = d['J'].toString().toDouble().toInteger().toString()
|
||||
}
|
||||
def ret1 = OpenApiClient.addressEvaluation(city, region, name, name, area, floor, height)
|
||||
if (ret1) {
|
||||
d['J'] = ret1.totalPrice
|
||||
d['K'] = ret1.avgPrice
|
||||
}else{
|
||||
def priceObj = CommonDatautils.findDistrictPrice(city, region, name)
|
||||
if(priceObj){
|
||||
d['K'] = priceObj.avg_price_2b
|
||||
if(area && area.toString().isNumber() && !area.toString().contains("+")){
|
||||
d['J'] = (int)(area.toString().toDouble()*priceObj.avg_price_2b)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
def addLation(filePath){
|
||||
ExcelUtils.multiThreadingModify(filePath, { d ->
|
||||
def city = d['B']
|
||||
if(city && !d['J']){
|
||||
def address = d['E']
|
||||
def map = parserByGaode(city, address)
|
||||
if(map){
|
||||
d['Q'] = map.lng
|
||||
d['R'] = map.lat
|
||||
d['T'] = "地址反解析经纬度"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
def parserByGaode(def city, def address){
|
||||
def json = GaoDeApiUtils.geo(city, address)
|
||||
println json
|
||||
if(json && json.status=="1"){
|
||||
def ret = json.geocodes
|
||||
if(ret){
|
||||
def str = ret.get(0).location
|
||||
def level = ret.get(0).level
|
||||
|
||||
if(str && ["门牌号","单元号","道路","道路交叉路口","热点商圈","村庄","兴趣点","门址","住宅区"].contains(level)){
|
||||
def arrs = str.split(",")
|
||||
return ["lng":arrs[0], "lat":arrs[1]]
|
||||
}else{
|
||||
println address +" "+level
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
def addAroundPrice(path){
|
||||
ExcelUtils.multiThreadingModify(path, { d ->
|
||||
if(!d['J'] && d['Q']){
|
||||
def city = RegionData.formatCity(d['B'])
|
||||
def dist = new BasicDBObject()
|
||||
dist.city = city
|
||||
dist.lng = d['Q'].toString().toDouble()*10000000000L
|
||||
dist.lat = d['R'].toString().toDouble()*10000000000L
|
||||
dist.estateType = "普通住宅"//d['H']
|
||||
if(dist.lat) {
|
||||
List<DBObject> list = DbUtils.findAroundDistrictByRadius(dist, 1000)
|
||||
if (list) {
|
||||
list = sortByDistance(dist, list);
|
||||
if (list && list.size() > 10) {
|
||||
list = list[0..9]
|
||||
}
|
||||
if (list) {
|
||||
def prices = []
|
||||
for (def s : list) {
|
||||
def priceObj = CommonDatautils.findDistrictPrice(s.city, s.region, s.name)
|
||||
if (priceObj) {
|
||||
prices << priceObj.avg_price_2b
|
||||
}
|
||||
}
|
||||
if (prices) {
|
||||
def arround_price = (int) (prices.sum() / prices.size())
|
||||
d['k'] = arround_price
|
||||
def area = d["F"]
|
||||
if(area && area.toString().isNumber() && !area.toString().contains("+")){
|
||||
d['J'] = (int)(area.toString().toDouble()*arround_price)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
def sortByDistance(d, list){
|
||||
def newList = []
|
||||
for(def nb : list){
|
||||
def distance = GeoHelper.GetDistance(d.lat/10000000000.0, d.lng/10000000000.0, nb.lat/10000000000.0, nb.lng/10000000000.0)
|
||||
nb.distance = distance
|
||||
newList << nb
|
||||
}
|
||||
//排序
|
||||
Collections.sort(newList, new Comparator() {
|
||||
@Override
|
||||
int compare(Object o1, Object o2) {
|
||||
if(o1.distance > o2.distance)
|
||||
return 1;//第二个元素(o1)比第一个元素(o2)大,返回-1
|
||||
if(o1.distance == o2.distance)
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
})
|
||||
|
||||
return newList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(){
|
||||
def path = "D:\\数据\\江苏农行\\江苏农1062条(合).xlsx"
|
||||
def path = "D:\\数据\\江苏农行\\江苏农1062条(总).xlsx"
|
||||
addressEvalute(path)
|
||||
// addFjwTobPrice(path)
|
||||
// addThirdPrice(path)
|
||||
|
||||
+4
-3
@@ -225,10 +225,11 @@ class FangjiaClientUtils {
|
||||
public static def newMatch(city,address, property, useMap){
|
||||
def jsonObj = null
|
||||
def content = null
|
||||
def url = null;
|
||||
try {
|
||||
address = address.replace("{","").replace("\\","")
|
||||
def url = "http://192.168.0.100:32080/FangJiaNlpService/match?address="+URLEncoder.encode(address,"UTF-8")+"&useMap=${useMap}"
|
||||
// def url = "http://192.168.0.19:31080/FangJiaNlpService/match?address="+URLEncoder.encode(address,"UTF-8")+"&useMap=${useMap}"
|
||||
url = "http://192.168.0.100:32080/FangJiaNlpService/match?address="+URLEncoder.encode(address,"UTF-8")+"&useMap=${useMap}"
|
||||
// url = "http://192.168.0.19:31080/FangJiaNlpService/match?address="+URLEncoder.encode(address,"UTF-8")+"&useMap=${useMap}"
|
||||
|
||||
if(city){
|
||||
url = url + "&city="+URLEncoder.encode(city,"UTF-8")
|
||||
@@ -240,7 +241,7 @@ class FangjiaClientUtils {
|
||||
content = new HttpRequest().newGet(url, null, "utf-8")
|
||||
jsonObj = JSONObject.fromObject(content)
|
||||
} catch (Exception e) {
|
||||
println address +" "+content
|
||||
println "报错地址:"+url
|
||||
e.printStackTrace();
|
||||
}
|
||||
return jsonObj;
|
||||
|
||||
+4
-1
@@ -28,7 +28,10 @@ class GaoDeMapSearchTest {
|
||||
// task.mapSearch(path)
|
||||
// task.baiduMapSearch(path)
|
||||
// task.checkTrue(path)
|
||||
task.addFinancialLevel(path)
|
||||
// task.addFinancialLevel(path)
|
||||
|
||||
def results = com.fangjia.script.gj.OpenApiUtils.financialRating("重庆", "凤中路193号")
|
||||
println results
|
||||
}
|
||||
|
||||
def addFinancialLevel(path){
|
||||
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
package com.fangjia.script.gj.village
|
||||
import java.util.Arrays;
|
||||
class BaiduCoordinateConverter {
|
||||
|
||||
static double[] array1 = [75, 60, 45, 30, 15, 0]
|
||||
static double[][] array2 = [
|
||||
[-0.0015702102444, 111320.7020616939, 1704480524535203.0, -10338987376042340.0, 26112667856603880.0, -35149669176653700.0, 26595700718403920.0, -10725012454188240.0, 1800819912950474.0, 82.5],
|
||||
[0.0008277824516172526, 111320.7020463578, 647795574.6671607, -4082003173.641316, 10774905663.51142, -15171875531.51559, 12053065338.62167, -5124939663.577472, 913311935.9512032, 67.5],
|
||||
[0.00337398766765, 111320.7020202162, 4481351.045890365, -23393751.19931662, 79682215.47186455, -115964993.2797253, 97236711.15602145, -43661946.33752821, 8477230.501135234, 52.5],
|
||||
[0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5],
|
||||
[-0.0003441963504368392, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5],
|
||||
[-0.0003218135878613132, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45]
|
||||
]
|
||||
static double[] array3 = [12890594.86, 8362377.87, 5591021, 3481989.83, 1678043.12, 0];
|
||||
static double[][] array4 = [
|
||||
[1.410526172116255e-8, 0.00000898305509648872, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 17337981.2],
|
||||
[-7.435856389565537e-9, 0.000008983055097726239, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 10260144.86],
|
||||
[-3.030883460898826e-8, 0.00000898305509983578, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37],
|
||||
[-1.981981304930552e-8, 0.000008983055099779535, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06],
|
||||
[3.09191371068437e-9, 0.000008983055096812155, 0.00006995724062, 23.10934304144901, -0.00023663490511, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4],
|
||||
[2.890871144776878e-9, 0.000008983055095805407, -3.068298e-8, 7.47137025468032, -0.00000353937994, -0.02145144861037, -0.00001234426596, 0.00010322952773, -0.00000323890364, 826088.5]
|
||||
];
|
||||
|
||||
public static double[] convertor(double x, double y, double[] param) {
|
||||
double t = param[0] + param[1] * Math.abs(x);
|
||||
double cc = Math.abs(y) / param[9];
|
||||
double cf = param[2] + param[3] * cc + param[4] * cc * cc + param[5] * cc * cc * cc + param[6] * cc * cc * cc * cc + param[7] * cc * cc * cc * cc * cc + param[8] * cc * cc * cc * cc * cc * cc;
|
||||
t *= (x < 0) ? -1 : 1;
|
||||
cf *= (y < 0) ? -1 : 1;
|
||||
return [t, cf];
|
||||
}
|
||||
|
||||
public static double[] bdLatlng2Mercator(double lat, double lng) {
|
||||
double[] arr = null;
|
||||
double nLat = (lat > 74) ? 74 : lat;
|
||||
nLat = (nLat < -74) ? -74 : nLat;
|
||||
for (int i = 0; i < array1.length; i++) {
|
||||
if (lat >= array1[i]) {
|
||||
arr = array2[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (arr == null) {
|
||||
for (int i = array1.length - 1; i >= 0; i--) {
|
||||
if (lat <= -array1[i]) {
|
||||
arr = array2[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (arr == null) {
|
||||
throw new IllegalArgumentException("Invalid latitude");
|
||||
}
|
||||
double[] res = convertor(lng, lat, arr);
|
||||
return [res[0], res[1]]
|
||||
}
|
||||
|
||||
public static double[] bdMercator2Latlng(double x, double y) {
|
||||
double[] arr = null;
|
||||
double npX = Math.abs(x);
|
||||
double npY = Math.abs(y);
|
||||
for (int i = 0; i < array3.length; i++) {
|
||||
if (npY >= array3[i]) {
|
||||
arr = array4[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (arr == null) {
|
||||
throw new IllegalArgumentException("Invalid y value");
|
||||
}
|
||||
double[] res = convertor(npX, npY, arr);
|
||||
return [res[0], res[1]]
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// Example usage
|
||||
double latitude = 4832281.76
|
||||
double longitude = 12959065.3
|
||||
|
||||
// double[] mercatorPoint = bdLatlng2Mercator(latitude, longitude);
|
||||
// System.out.println("Mercator Point: " + Arrays.toString(mercatorPoint));
|
||||
|
||||
double[] latlngPoint = bdMercator2Latlng(longitude, latitude);
|
||||
System.out.println("Latlng Point: " + Arrays.toString(latlngPoint));
|
||||
}
|
||||
}
|
||||
+172
File diff suppressed because one or more lines are too long
+68
-33
@@ -1,5 +1,6 @@
|
||||
package com.fangjia.script.gj.village
|
||||
|
||||
import com.fangjia.script.common.DataHandleUtils
|
||||
import com.fangjia.script.gj.EsSearchUtils
|
||||
import com.fangjia.script.looplineinfo.InsidePolygon
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
@@ -13,43 +14,77 @@ DBCollection TOWN_POLYLINECOLL = MongoUtils.getCollectionByAuth20190102("fangjia
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
DBCollection COMMUNITY_CONN = MongoUtils.getCollectionByName2("fangjia", "community", MONGO100_URL)
|
||||
|
||||
def filePath = "D:\\数据\\涉农\\县.xlsx"
|
||||
ExcelUtils.multiThreadingModify(filePath, { row ->
|
||||
// if(!row['D']){
|
||||
// def rets = EsSearchUtils.findPois(row['B'], row['C'], row['C']+"人民政府")
|
||||
// if(rets){
|
||||
// def obj = findOneByName(rets, row['C']+"人民政府")
|
||||
// if(obj){
|
||||
// row['D'] = obj.lng
|
||||
// row['E'] = obj.lat
|
||||
// println row['C'] + " "+obj
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// if(row['D'] && !row['F']){
|
||||
// def townMap = findTownRange(row['B'], TOWN_POLYLINECOLL)
|
||||
// def map = ["lon":row['D'], "lat":row['E']]
|
||||
// def township = InsidePolygon.isInArea2(map.lon, map.lat, townMap)
|
||||
// row['F'] = township
|
||||
// }
|
||||
//def s = getTownshipInfo("118.702988,39.740979")
|
||||
def filePath = "D:\\数据\\涉农\\县政府(最终).xlsx"
|
||||
//ExcelUtils.multiThreadingModify(filePath, { row ->
|
||||
//// if(!row['I']){
|
||||
//// def rets = EsSearchUtils.findPois(row['B'], row['C'], row['C']+"人民政府")
|
||||
//// if(rets){
|
||||
//// def obj = findOneByName(rets, row['C']+"人民政府")
|
||||
//// if(obj){
|
||||
//// row['I'] = obj.lng
|
||||
//// row['J'] = obj.lat
|
||||
//// println row['C'] + " "+obj
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//
|
||||
//// if(row['D'] && !row['F']){
|
||||
//// def townMap = findTownRange(row['B'], TOWN_POLYLINECOLL)
|
||||
//// def map = ["lon":row['D'], "lat":row['E']]
|
||||
//// def township = InsidePolygon.isInArea2(map.lon, map.lat, townMap)
|
||||
//// row['F'] = township
|
||||
//// }
|
||||
//
|
||||
//// if(row['F'] && !row['J']){
|
||||
//// def q = new BasicDBObject()
|
||||
//// q.put("city_name", row['B'])
|
||||
//// q.put("area_name", row['C'])
|
||||
//// def streetName = row['F']
|
||||
//// q.put("street_name", streetName)
|
||||
//// def count = COMMUNITY_CONN.count(q);
|
||||
//// row['J'] = count
|
||||
////// row['H'] = streetName
|
||||
//// }
|
||||
//// if(!row['H']){
|
||||
//// def gaodeMap = getTownshipInfo(row['D']+","+row['E'])
|
||||
//// if(gaodeMap && gaodeMap.township){
|
||||
//// row['H'] = gaodeMap.township
|
||||
//// }
|
||||
//// }
|
||||
//
|
||||
//// if(row['J'] && row['J'].toString().toDouble()>0){
|
||||
//// def up_query = new BasicDBObject()
|
||||
//// up_query.put("city_name", row['B'])
|
||||
//// up_query.put("area_name", row['C'])
|
||||
//// up_query.put("street_name", row['F'])
|
||||
//// def udata = new BasicDBObject()
|
||||
//// udata.put("has_gov", "是")
|
||||
//// COMMUNITY_CONN.update(up_query, new BasicDBObject('$set', udata), false, true)
|
||||
//// }
|
||||
//
|
||||
//
|
||||
//})
|
||||
|
||||
|
||||
def objs = COMMUNITY_CONN.find(new BasicDBObject())
|
||||
for(def d : objs){
|
||||
if(d.name){
|
||||
def py1 = com.fangjia.core.util.DataUtil.hanyuQuanpin(d.name, " ")
|
||||
def udata = new BasicDBObject()
|
||||
udata.put("name_pinyin", py1)
|
||||
if(d.location){
|
||||
def lon = DataHandleUtils.getDoubleRound(6, d.location.lon)
|
||||
def lat = DataHandleUtils.getDoubleRound(6, d.location.lat)
|
||||
udata.put("location", ["lat":lat, "lon":lon])
|
||||
}
|
||||
|
||||
if(row['F'] && !row['K']){
|
||||
def q = new BasicDBObject()
|
||||
q.put("city_name", row['B'])
|
||||
q.put("area_name", row['C'])
|
||||
def streetName = row['I']
|
||||
q.put("street_name", streetName)
|
||||
def count = COMMUNITY_CONN.count(q);
|
||||
row['K'] = count
|
||||
// row['H'] = streetName
|
||||
q.put("_id", d._id)
|
||||
COMMUNITY_CONN.update(q, new BasicDBObject('$set', udata), false, true)
|
||||
}
|
||||
// def gaodeMap = getTownshipInfo(row['D']+","+row['E'])
|
||||
// if(gaodeMap && gaodeMap.township){
|
||||
// row['I'] = gaodeMap.township
|
||||
// }
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
def getTownshipInfo(def glocation){
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.fangjia.script.gj.village
|
||||
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.fangjia.script.util.MongoUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
import com.mongodb.DBCollection
|
||||
import com.rabbitmq.client.impl.AMQImpl
|
||||
import org.bson.types.ObjectId
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
DBCollection COMMUNITY_CONN = MongoUtils.getCollectionByName2("fangjia", "community_new_2023", MONGO100_URL)
|
||||
|
||||
filePath = "D:\\Êý¾Ý\\ɿũ\\18Íò×îÖÕ-id.xlsx"
|
||||
def index = 0
|
||||
ExcelUtils.multiThreadingModify(filePath, { d->
|
||||
|
||||
if(d['A']){
|
||||
def q = new BasicDBObject("_id", d['A'])
|
||||
def dbo = COMMUNITY_CONN.findOne(q)
|
||||
if(dbo){
|
||||
index++
|
||||
println index
|
||||
COMMUNITY_CONN.remove(q)
|
||||
}else{
|
||||
// def udata = new BasicDBObject()
|
||||
// udata.put("_id" , d['A'])
|
||||
// udata.put("province" , d['A'])
|
||||
// udata.put("province_code" , d['A'])
|
||||
// udata.put("city_code" , d['A'])
|
||||
// udata.put("area_name" , d['A'])
|
||||
// udata.put("area_code" , d['A'])
|
||||
// udata.put("street_name" , d['A'])
|
||||
// udata.put("street_code" , d['A'])
|
||||
// udata.put("name" , d['A'])
|
||||
// udata.put("code" , d['A'])
|
||||
// udata.put("type_code" , d['A'])
|
||||
// udata.put("type_name" , d['A'])
|
||||
// udata.put("location_type" , d['A'])
|
||||
// udata.put("geohash" , d['A'])
|
||||
// udata.put("location" , d['A'])
|
||||
// udata.put("new_poi_name" , d['A'])
|
||||
// udata.put("new_area_name" , d['A'])
|
||||
// udata.put("city_name" , d['A'])
|
||||
// COMMUNITY_CONN.save(udata);
|
||||
}
|
||||
}
|
||||
})
|
||||
+74
-12
@@ -4,6 +4,7 @@ import com.fangjia.core.RegionData
|
||||
import com.fangjia.script.BaseBatch
|
||||
import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.common.DataHandleUtils
|
||||
import com.fangjia.script.lixue.DB.City
|
||||
import com.fangjia.script.looplineinfo.InsidePolygon
|
||||
import com.fangjia.script.util.DateUtils
|
||||
import com.fangjia.script.util.MongoUtils
|
||||
@@ -20,13 +21,15 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
class SuggestionDataSynch extends BaseBatch{
|
||||
|
||||
static def targetUrl = "http://192.168.0.12:9200/seaweed/"
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20)
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(50)
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
DBCollection SEAWEED_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed", MONGO100_URL)
|
||||
DBCollection administrative_division_100_CONN = MongoUtils.getCollectionByName2("fangjia", "administrative_division", MONGO100_URL)
|
||||
DBCollection SUGGESTION_CONN = MongoUtils.getCollectionByName2("fangjia", "suggestion", MONGO100_URL)
|
||||
|
||||
DBCollection MAPPOI_CONN = MongoUtils.getCollectionByName2("fangjia", "map_poi", MONGO100_URL)
|
||||
|
||||
public static def provinceMap = CommonDatautils.findAllCityProvince()
|
||||
|
||||
def lastMonthDate = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||
@@ -42,15 +45,29 @@ class SuggestionDataSynch extends BaseBatch{
|
||||
|
||||
static main(args) {
|
||||
runBatch(new SuggestionDataSynch(), args);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(Object args) {
|
||||
run()
|
||||
// updateCode()
|
||||
// getExitsCity()
|
||||
|
||||
}
|
||||
|
||||
def getExitsCity(){
|
||||
SUGGESTION_CONN = MongoUtils.getCollectionByName2("fangjia", "suggestion", MONGO100_URL)
|
||||
def cities = SUGGESTION_CONN.distinct("city")
|
||||
def simpleCities = []
|
||||
for (def c :cities) {
|
||||
def city = RegionData.formatCity(c)
|
||||
simpleCities.add(city)
|
||||
}
|
||||
// print(simpleCities)
|
||||
return simpleCities
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -61,9 +78,16 @@ class SuggestionDataSynch extends BaseBatch{
|
||||
def index = 0
|
||||
fullCityMap = queryFullNameCity()
|
||||
mcaDistMap = queryDistNameCity()
|
||||
def existCities = getExitsCity()
|
||||
|
||||
for (def c : citys) {
|
||||
|
||||
def allRets = []
|
||||
|
||||
// if(["上海","北京","广州","深圳","成都","杭州","天津","西安","南京","沈阳","重庆","武汉","石家庄","福州","宁波","贵阳","怀化","郴州","益阳","永州","娄底","湘西","长沙","常德","株洲","岳阳","衡阳","湘潭","张家界","邵阳","南京","苏州","无锡","扬州","常州","徐州","镇江","南通","泰州","连云港","盐城","淮安","宿迁"].contains(c)){
|
||||
if(existCities.contains(c)){
|
||||
continue;
|
||||
}
|
||||
index++
|
||||
// if(!["ÈýÃ÷","ÄþµÂ","ȪÖÝ","ÏÃÃÅ","¸£ÖÝ","ÕÄÖÝ","ÄÏÆ½","ÁúÑÒ","ÆÎÌï","ÖØÇì"].contains(c)){
|
||||
def ret1 = updating(c, "district")
|
||||
@@ -80,8 +104,8 @@ class SuggestionDataSynch extends BaseBatch{
|
||||
allRets.addAll(ret3)
|
||||
allRets.addAll(ret4)
|
||||
|
||||
println index + " " + c + " Íê³É "+ allRets.size()
|
||||
saveToMG(c, allRets)
|
||||
println index + " " + c + " 完成 "+ allRets.size()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,10 +115,16 @@ class SuggestionDataSynch extends BaseBatch{
|
||||
|
||||
def data = fullCityMap.get(city)
|
||||
def q = new BasicDBObject("city", data.city)
|
||||
def count = SUGGESTION_CONN.count(q)
|
||||
if(count>0){
|
||||
SUGGESTION_CONN.remove(q)
|
||||
def count = 0
|
||||
try{
|
||||
count = SUGGESTION_CONN.count(q)
|
||||
}catch(e){
|
||||
SUGGESTION_CONN = MongoUtils.getCollectionByName2("fangjia", "suggestion", MONGO100_URL)
|
||||
count = SUGGESTION_CONN.count(q)
|
||||
}
|
||||
// if(count>0){
|
||||
// SUGGESTION_CONN.remove(q)
|
||||
// }
|
||||
|
||||
def rets = []
|
||||
for(def i=0;i<rows.size();i++){
|
||||
@@ -221,8 +251,7 @@ class SuggestionDataSynch extends BaseBatch{
|
||||
def data = fullCityMap.get(city)
|
||||
if(data){
|
||||
def results = CommonDatautils.findAmapDetailBySql(data.city)
|
||||
def rets = createPoi(results, data, townMap)
|
||||
println city +" Íê³É£¡"
|
||||
def rets = createPoi(data.city, results, data, townMap)
|
||||
return rets;
|
||||
}
|
||||
return []
|
||||
@@ -230,10 +259,11 @@ class SuggestionDataSynch extends BaseBatch{
|
||||
}
|
||||
|
||||
|
||||
def createPoi(results, data, townMap){
|
||||
def createPoi(fullCity, results, data, townMap){
|
||||
def rets = new CopyOnWriteArrayList()
|
||||
|
||||
def totalCount = new AtomicLong()
|
||||
def townshipMap = findMapPoiTownshipMap(fullCity)
|
||||
final CountDownLatch latch = new CountDownLatch(results.size())
|
||||
for(def i=0;i<results.size();i++){
|
||||
final def dist = results[i]
|
||||
@@ -258,11 +288,19 @@ class SuggestionDataSynch extends BaseBatch{
|
||||
map.location = dist.location
|
||||
map.source = "FJW"
|
||||
|
||||
map.township = InsidePolygon.isInArea2(map.location.lon, map.location.lat, townMap)
|
||||
if(townshipMap && townshipMap.containsKey(dist.id)){
|
||||
def township = townshipMap.get(dist.id)
|
||||
if(township){
|
||||
map.township = township
|
||||
}
|
||||
}
|
||||
if(!map.township){
|
||||
def gaodeMap = getTownshipInfo(map.location.lon+","+map.location.lat)
|
||||
if(gaodeMap && gaodeMap.township){
|
||||
map.township = gaodeMap.township
|
||||
map.township = InsidePolygon.isInArea2(map.location.lon, map.location.lat, townMap)
|
||||
if(!map.township){
|
||||
def gaodeMap = getTownshipInfo(map.location.lon+","+map.location.lat)
|
||||
if(gaodeMap && gaodeMap.township){
|
||||
map.township = gaodeMap.township
|
||||
}
|
||||
}
|
||||
}
|
||||
println map.township
|
||||
@@ -284,6 +322,30 @@ class SuggestionDataSynch extends BaseBatch{
|
||||
return rets;
|
||||
}
|
||||
|
||||
def findMapPoiTownshipMap(fullCity){
|
||||
def q = new BasicDBObject()
|
||||
q.put("city", fullCity)
|
||||
|
||||
def keys = new BasicDBObject()
|
||||
keys.put("id", 1)
|
||||
keys.put("township", 1)
|
||||
def dbcursor = MAPPOI_CONN.find(q, keys)
|
||||
def map = [:]
|
||||
for(def d : dbcursor){
|
||||
map.put(d.id, d.township)
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
def findTownshipByBD(id){
|
||||
def q = new BasicDBObject()
|
||||
q.put("id", id)
|
||||
def obj = MAPPOI_CONN.findOne(q)
|
||||
return obj
|
||||
|
||||
}
|
||||
|
||||
|
||||
def queryFullNameCity(){
|
||||
def q = new BasicDBObject()
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
import com.fangjia.core.ProvinceData
|
||||
import com.fangjia.core.util.HttpRequest
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.lowagie.text.Row
|
||||
import javafx.scene.control.Cell
|
||||
import jxl.Sheet
|
||||
import jxl.Workbook
|
||||
import org.apache.poi.ss.usermodel.WorkbookFactory
|
||||
|
||||
String excelFilePath = "F:\\估家\\文件\\安徽省联社\\全国省级行政区房屋覆盖情况表 - 副本.xlsx"
|
||||
ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
|
||||
province1 = items['A']
|
||||
if (!province1.equals('黑龙江省') || !province1.equals('内蒙古自治区')) {
|
||||
province = province1.substring(0, 2)
|
||||
} else {
|
||||
province = province1.substring(0, 3)
|
||||
}
|
||||
|
||||
println('province: ' + province)
|
||||
|
||||
def citys = ProvinceData.getAllCity(province)
|
||||
println(citys)
|
||||
if (citys.size() > 0) {
|
||||
ExcelUtils.writeToExcel(excelFilePath, citys, province)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
//
|
||||
//import com.fangjia.core.ProvinceData
|
||||
//
|
||||
//import com.fangjia.script.util.ExcelUtils
|
||||
//
|
||||
//
|
||||
//String excelFilePath = "F:\\估家\\文件\\安徽省联社\\全国省级行政区房屋覆盖情况表.xlsx"
|
||||
//ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
//ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
//
|
||||
// def province1 = items['A']
|
||||
// def province
|
||||
//
|
||||
// if (!province1.equals('黑龙江省') && !province1.equals('内蒙古自治区')) {
|
||||
// province = province1.substring(0, 2)
|
||||
// } else {
|
||||
// province = province1.substring(0, 3)
|
||||
// }
|
||||
//
|
||||
// println('province: ' + province)
|
||||
//
|
||||
// def citys = ProvinceData.getAllCity(province)
|
||||
// println(citys)
|
||||
// items['D'] = citys.toString()
|
||||
//
|
||||
//})
|
||||
@@ -5,14 +5,15 @@ import com.fangjia.script.util.ExcelUtils
|
||||
import net.sf.json.JSONObject
|
||||
|
||||
|
||||
ExcelUtils.removeEmptyRow("F:\\估家\\文件\\北交所\\testcopy.xlsx")
|
||||
ExcelUtils.singleThreadingModify("F:\\估家\\文件\\北交所\\testcopy.xlsx", { List items ->
|
||||
String excelFilePath = "F:\\估家\\文件\\北交所\\testcopy.xlsx";
|
||||
String comprehensiveUrl = "http://192.168.10.15:9180/comprehensiveQuery/houseValueInformation";
|
||||
String communityUrl = "http://192.168.10.15:9180/addrSvc/avgPrice";
|
||||
String valueUrl = "http://192.168.10.15:9180/property/addressEvaluate";
|
||||
String caseUrl = "http://192.168.10.15:9180/house/case";
|
||||
String poiUrl = "http://192.168.10.15:9180/district/addrFacilitys";
|
||||
String excelFilePath = "F:\\¹À¼Ò\\Îļþ\\±±½»Ëù\\testcopy1.xlsx";
|
||||
ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
|
||||
String comprehensiveUrl = "http://localhost:9180/comprehensiveQuery/houseValueInformation";
|
||||
String communityUrl = "http://open.fangjia.com/addrSvc/avgPrice";
|
||||
String valueUrl = "http://open.fangjia.com/property/addressEvaluate";
|
||||
String caseUrl = "http://open.fangjia.com/house/case";
|
||||
String poiUrl = "http://open.fangjia.com/district/addrFacilitys";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.fangjia.script.majintao
|
||||
|
||||
import com.fangjia.core.util.HttpRequest
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import net.sf.json.JSONObject
|
||||
|
||||
|
||||
String excelFilePath = "F:\\估家\\文件\\北交所\\暂时不能估值数据 - 副本.xlsx";
|
||||
ExcelUtils.removeEmptyRow(excelFilePath)
|
||||
ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
|
||||
String comprehensiveUrl = "http://open.fangjia.com/comprehensiveQuery/houseValueInformation";
|
||||
String communityUrl = "http://open.fangjia.com/addrSvc/avgPrice";
|
||||
String valueUrl = "http://open.fangjia.com/property/addressEvaluate";
|
||||
String caseUrl = "http://open.fangjia.com/house/case";
|
||||
String poiUrl = "http://open.fangjia.com/district/addrFacilitys";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
String city = items['A']
|
||||
String address = items['B']
|
||||
double size = items['C']
|
||||
|
||||
System.out.println(city + "---" + address + "----" + size);
|
||||
|
||||
map.put("city", city)
|
||||
map.put("address", address)
|
||||
map.put("size", size.toString())
|
||||
map.put("strctureArea", size.toString())
|
||||
map.put("token", "F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB")
|
||||
|
||||
if (!address.contains("%")) {
|
||||
// 发送HTTP请求
|
||||
long start
|
||||
long end
|
||||
|
||||
def addressValue = httpRequest.getJsonContent(communityUrl, map, "UTF-8")
|
||||
items['D'] = addressValue.get('result').toString()
|
||||
|
||||
def value = httpRequest.getJsonContent(valueUrl, map, "UTF-8")
|
||||
items['E'] = value.get('result').toString()
|
||||
|
||||
def houseCase = httpRequest.getJsonContent(caseUrl, map, "UTF-8")
|
||||
items['F'] = houseCase.get('result').toString()
|
||||
|
||||
def poi = httpRequest.getJsonContent(poiUrl, map, "UTF-8")
|
||||
items['G'] = poi.get('result').toString()
|
||||
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
+350
@@ -0,0 +1,350 @@
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
import com.fangjia.datastore.driver.DSCollection
|
||||
import com.fangjia.datastore.driver.DataStore
|
||||
import com.fangjia.script.BaseBatch
|
||||
import com.fangjia.script.BatchOwner
|
||||
import com.fangjia.script.Watcher
|
||||
import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.util.CommonUtils
|
||||
import com.fangjia.script.util.DateUtils
|
||||
import com.fangjia.script.util.DbUtils
|
||||
import com.fangjia.script.util.MongoUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
import com.mongodb.DBCollection
|
||||
|
||||
//@BatchOwner(Watcher.MaJinTao)
|
||||
class CommunityHouseSampleBatch extends BaseBatch {
|
||||
|
||||
DBCollection SEAWEED = MongoUtils.getCollectionByName("fangjia", "seaweed", "192.168.0.43", 28017)
|
||||
DBCollection STAT = MongoUtils.getCollectionByName("fangjia_stat", "district_stat", "192.168.0.43", 28017)
|
||||
DBCollection HOUSE_CASE = MongoUtils.getCollectionByName("business", "house_case", "192.168.0.43", 28017)
|
||||
DSCollection SEABIRD = new DataStore("seabird.db.fangjia.com").getCollection("fangjia.seabird")
|
||||
|
||||
static void main(String[] args) {
|
||||
runBatch(new CommunityHouseSampleBatch(), args)
|
||||
}
|
||||
|
||||
def findHouseCase(Object district_stat, Map<String, List> houseMap) {
|
||||
// 查本小区的房源
|
||||
def houseQuery = new BasicDBObject()
|
||||
houseQuery.put("cat", "sell")
|
||||
houseQuery.put("city", district_stat.city)
|
||||
houseQuery.put("region", district_stat.region)
|
||||
houseQuery.put("district_name", district_stat.district_name)
|
||||
def houseListAll = SEABIRD.find(houseQuery).toList()
|
||||
|
||||
// 将均价符合的房源放入结果集
|
||||
def houseList = houseListAll.findAll() { housecase ->
|
||||
def totalPrice = housecase.total_price
|
||||
def houseArea = housecase.area
|
||||
def houseAvgPrice = totalPrice / houseArea
|
||||
def avgPrice = district_stat.avg_price
|
||||
houseAvgPrice >= avgPrice * 0.8 && houseAvgPrice <= avgPrice * 1.2
|
||||
}
|
||||
|
||||
// 将样本数据按面积段分,200以下每10为一段,200以上每30为一段
|
||||
// 分段的字段规则 area: 23.4 对应[20,30] 标记为 g20
|
||||
for (def housecase : houseList) {
|
||||
if (housecase.area <= 200) {
|
||||
def area = housecase.area.toInteger()
|
||||
def key = "g" + (area / 10).toInteger() * 10
|
||||
def gList = houseMap.get(key)
|
||||
|
||||
if (gList == null || gList.size() == 0) {
|
||||
def gHouseCaseList = []
|
||||
gHouseCaseList.add(housecase)
|
||||
houseMap.put(key, gHouseCaseList)
|
||||
} else if (gList.size() < 10) {
|
||||
gList.add(housecase)
|
||||
houseMap.put(key, gList)
|
||||
}
|
||||
} else {
|
||||
def area = housecase.area.toInteger()
|
||||
def startPoint = 200
|
||||
def segmentSize = 30
|
||||
def rangeStart = (startPoint + (Math.floor((area - startPoint) / segmentSize) * segmentSize)).toInteger()
|
||||
def key = "g" + rangeStart
|
||||
def gList = houseMap.get(key)
|
||||
|
||||
if (gList == null || gList.size() == 0) {
|
||||
def gHouseCaseList = []
|
||||
gHouseCaseList.add(housecase)
|
||||
houseMap.put(key, gHouseCaseList)
|
||||
} else if (gList.size() < 10) {
|
||||
gList.add(housecase)
|
||||
houseMap.put(key, gList)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
void process(Object args) {
|
||||
ExecutorService executorService = Executors.newFixedThreadPool(5)
|
||||
|
||||
try {
|
||||
def cityList = CommonUtils.findAllCity()
|
||||
// 测试
|
||||
cityList = cityList.subList(0, 5)
|
||||
cityList.each { city ->
|
||||
executorService.submit({
|
||||
def count = 0
|
||||
def documents = []
|
||||
def weekend = DateUtils.getFirstDayOfWeek(new Date())
|
||||
def districtPriceMap = CommonDatautils.queryAllDistrictPrice(city, weekend)
|
||||
List<BasicDBObject> districts = CommonDatautils.findAllDistrictByCity(city, "district", ["city", "region", "name", "lat", "lng"])
|
||||
|
||||
// 测试
|
||||
districts = districts.subList(0, 10)
|
||||
|
||||
districts.each { district ->
|
||||
Map<String, List> houseMap = [:]
|
||||
def district_stat = districtPriceMap.get(district.city + "##" + district.region + "##" + district.name)
|
||||
|
||||
if (district_stat != null) {
|
||||
findHouseCase(district_stat, houseMap)
|
||||
}
|
||||
if (houseMap == null || houseMap.size() == 0) {
|
||||
def aroundDistrictList = DbUtils.findAroundDistrictByRadius(district, 3000)
|
||||
// def aroundDistrictList = (aroundDistrictListAll.size() >= 50) ? aroundDistrictListAll.subList(0, 50) : aroundDistrictListAll
|
||||
aroundDistrictList.each { aroundDistrict ->
|
||||
def aroundDistrict_stat = districtPriceMap.get(aroundDistrict.city + "##" + aroundDistrict.region + "##" + aroundDistrict.name)
|
||||
if (aroundDistrict_stat != null) {
|
||||
findHouseCase(aroundDistrict_stat, houseMap)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def document = new BasicDBObject()
|
||||
document.put("city", district.city)
|
||||
document.put("region", district.region)
|
||||
document.put("district_name", district.name)
|
||||
document.put("house_case", houseMap)
|
||||
|
||||
documents.add(document)
|
||||
count++
|
||||
if (count % 10 == 0) {
|
||||
println(city + "已处理小区数----------------------------------------------------" + count)
|
||||
}
|
||||
}
|
||||
HOUSE_CASE.insert(documents)
|
||||
} as Runnable)
|
||||
}
|
||||
} finally {
|
||||
executorService.shutdown()
|
||||
executorService.awaitTermination(Long.MAX_VALUE, java.util.concurrent.TimeUnit.NANOSECONDS)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
package com.fangjia.script.sync
|
||||
|
||||
import com.fangjia.datastore.driver.DSCollection
|
||||
import com.fangjia.datastore.driver.DataStore
|
||||
import com.fangjia.script.BaseBatch
|
||||
import com.fangjia.script.BatchOwner
|
||||
import com.fangjia.script.Watcher
|
||||
import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.util.CommonUtils
|
||||
import com.fangjia.script.util.DateUtils
|
||||
import com.fangjia.script.util.DbUtils
|
||||
import com.fangjia.script.util.MongoUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
import com.mongodb.DBCollection
|
||||
|
||||
|
||||
@BatchOwner(Watcher.MaJinTao)
|
||||
class CommunityHouseSampleBatch extends BaseBatch {
|
||||
|
||||
DBCollection SEAWEED = MongoUtils.getCollectionByName("fangjia", "seaweed", "192.168.0.43", 28017)
|
||||
|
||||
DBCollection STAT = MongoUtils.getCollectionByName("fangjia_stat", "district_stat", "192.168.0.43", 28017)
|
||||
|
||||
DBCollection HOUSE_CASE = MongoUtils.getCollectionByName("business", "house_case", "192.168.0.43", 28017)
|
||||
|
||||
// DBCollection SEABIRD = MongoUtils.getCollectionByName("fangjia", "seabird", "192.168.0.43", 28017)
|
||||
|
||||
DSCollection SEABIRD = new DataStore("seabird.db.fangjia.com").getCollection("fangjia.seabird")
|
||||
|
||||
static void main(String[] args) {
|
||||
runBatch(new CommunityHouseSampleBatch(), args)
|
||||
}
|
||||
|
||||
def findHouseCase(Object district_stat, Map<String, List> houseMap) {
|
||||
|
||||
// 查本小区的房源
|
||||
def houseQuery = new BasicDBObject()
|
||||
//houseQuery.put("city", "深圳")
|
||||
|
||||
//houseQuery.put("region", "福田")
|
||||
|
||||
//houseQuery.put("district_name", "中泰燕南名庭")
|
||||
|
||||
houseQuery.put("cat", "sell")
|
||||
|
||||
houseQuery.put("city", district_stat.city)
|
||||
|
||||
houseQuery.put("region", district_stat.region)
|
||||
|
||||
houseQuery.put("district_name", district_stat.district_name)
|
||||
|
||||
def houseListAll = SEABIRD.find(houseQuery).toList()
|
||||
|
||||
// 将均价符合的房源放入结果集
|
||||
def houseList = houseListAll.findAll() { housecase ->
|
||||
def totalPrice = housecase.total_price
|
||||
def houseArea = housecase.area
|
||||
def houseAvgPrice = totalPrice / houseArea
|
||||
def avgPrice = district_stat.avg_price
|
||||
if (houseAvgPrice >= avgPrice * 0.8 && houseAvgPrice <= avgPrice * 1.2) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 将样本数据按面积段分,200以下每10为一段,200以上每30为一段
|
||||
// 分段的字段规则 area: 23.4 对应[20,30] 标记为 g20
|
||||
|
||||
for (def housecase : houseList) {
|
||||
if (housecase.area <= 200) {
|
||||
def area = housecase.area.toInteger()
|
||||
|
||||
def key = "g" + (area / 10).toInteger() * 10
|
||||
// println(key)
|
||||
// 获取该面积段的房源列表
|
||||
def gList = houseMap.get(key)
|
||||
|
||||
// 如果为空,说明该面积段没有房源,新建一个list,放入
|
||||
if (gList == null || gList.size() == 0) {
|
||||
def gHouseCaseList = []
|
||||
gHouseCaseList.add(housecase)
|
||||
houseMap.put(key, gHouseCaseList)
|
||||
} else {
|
||||
// 如果该面积段已经有10个房源,就不再放入
|
||||
if (gList.size() < 10) {
|
||||
// 如果不为空,说明该面积段已经有房源,直接放入
|
||||
gList.add(housecase)
|
||||
houseMap.put(key, gList)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
def area = housecase.area.toInteger()
|
||||
def startPoint = 200
|
||||
def segmentSize = 30
|
||||
def rangeStart = (startPoint + (Math.floor((area - startPoint) / segmentSize) * segmentSize)).toInteger()
|
||||
def key = "g" + rangeStart
|
||||
// println(key)
|
||||
// 获取该面积段的房源列表
|
||||
def gList = houseMap.get(key)
|
||||
|
||||
// 如果为空,说明该面积段没有房源,新建一个list,放入
|
||||
if (gList == null || gList.size() == 0) {
|
||||
def gHouseCaseList = []
|
||||
gHouseCaseList.add(housecase)
|
||||
houseMap.put(key, gHouseCaseList)
|
||||
} else {
|
||||
// 如果该面积段已经有10个房源,就不再放入
|
||||
if (gList.size() < 10) {
|
||||
gList.add(housecase)
|
||||
houseMap.put(key, gList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
void process(Object args) {
|
||||
|
||||
|
||||
def count = 0
|
||||
|
||||
|
||||
def cityList = CommonUtils.findAllCity()
|
||||
|
||||
// 测试用,先只取一条
|
||||
// cityList = cityList.subList(0, 1)
|
||||
|
||||
print(cityList.size())
|
||||
print(cityList.toString())
|
||||
// cityList.each { city ->
|
||||
def city = cityList.get(0)
|
||||
print(city)
|
||||
def documents = []
|
||||
//查询该城市的所有小区
|
||||
List<BasicDBObject> districts = CommonDatautils.findAllDistrictByCity(city, "district", ["city", "region", "name", "lat", "lng"])
|
||||
|
||||
//测试用,先只取5个小区
|
||||
// districts = districts.subList(0, 2)
|
||||
|
||||
// 查询所有的小区均价
|
||||
|
||||
def weekend = DateUtils.getFirstDayOfWeek(new Date());
|
||||
def districtPriceMap = CommonDatautils.queryAllDistrictPrice(city, weekend)
|
||||
for (def district : districts) {
|
||||
Map<String, List> houseMap = [:]
|
||||
|
||||
|
||||
|
||||
def district_stat = districtPriceMap.get(district.city + "##" + district.region + "##" + district.name)
|
||||
// 拿到小区对应的均价之后,去查房源
|
||||
if (district_stat != null) {
|
||||
findHouseCase(district_stat, houseMap)
|
||||
|
||||
}
|
||||
// 没有拿到小区对应的均价,找小区周边的三十个小区
|
||||
|
||||
def aroundDistrictListAll = DbUtils.findAroundDistrictByRadius(district, 3000)
|
||||
def aroundDistrictList = (aroundDistrictListAll.size() >= 50) ? aroundDistrictListAll.subList(0, 50) : aroundDistrictListAll
|
||||
|
||||
|
||||
// 遍历周边小区,找到均价符合的房源
|
||||
|
||||
aroundDistrictList.each { aroundDistrict ->
|
||||
def aroundDistrict_stat = districtPriceMap.get(aroundDistrict.city + "##" + aroundDistrict.region + "##" + aroundDistrict.name)
|
||||
// 拿到小区对应的均价之后,去查房源
|
||||
if (aroundDistrict_stat != null) {
|
||||
findHouseCase(aroundDistrict_stat, houseMap)
|
||||
}
|
||||
}
|
||||
print(houseMap)
|
||||
|
||||
// 创建一个新的文档
|
||||
def document = new BasicDBObject()
|
||||
|
||||
// 将 houseMap 和 communityStr 放入文档
|
||||
document.put("city", district.city)
|
||||
document.put("region", district.region)
|
||||
document.put("district_name", district.name)
|
||||
document.put("house_case", houseMap)
|
||||
|
||||
// 将文档插入到 MongoDB 中
|
||||
// HOUSE_CASE.in(document)
|
||||
|
||||
documents.add(document)
|
||||
count++
|
||||
if (count % 10 == 0) {
|
||||
print("已处理小区数----------------------------------------------------" + count)
|
||||
}
|
||||
}
|
||||
HOUSE_CASE.insert(documents)
|
||||
|
||||
}
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ public class ExcelUtils{
|
||||
|
||||
def data = ExcelUtils.read(fileName, srcSheetIndex, 0)
|
||||
def body = data.subList(1, data.size())
|
||||
def nThread = Runtime.getRuntime().availableProcessors() * 3
|
||||
def nThread = Runtime.getRuntime().availableProcessors() * 5
|
||||
println nThread
|
||||
ExecutorService executorService = Executors.newFixedThreadPool(nThread)
|
||||
final AtomicInteger counter = new AtomicInteger(0)
|
||||
|
||||
+5
-5
@@ -515,12 +515,12 @@ public class CzbankSampleServiceImpl implements CzbankSampleService {
|
||||
}
|
||||
//将数据放入样本仓库
|
||||
for (Map.Entry<String, List<SampleWrapper>> entry : map.entrySet()) {
|
||||
//超过两个,只取两个
|
||||
// 取三个
|
||||
if (entry.getValue().size()>=3){
|
||||
querySamples.addAll(entry.getValue().subList(0,2));
|
||||
//每个小区取5个样本
|
||||
|
||||
if (entry.getValue().size()>=5){
|
||||
querySamples.addAll(entry.getValue().subList(0,5));
|
||||
}else {
|
||||
// 不超过两个,全部放入
|
||||
// 不超过五个,全部放入
|
||||
querySamples.addAll(entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
+7
-4
@@ -2747,11 +2747,14 @@ public class DistrictServiceImpl implements DistrictService {
|
||||
|
||||
public Integer getCreateYear(District district) {
|
||||
Integer buildYear = getYearFormDate(district.getCreateYear());
|
||||
int minYear = Integer.MAX_VALUE;
|
||||
if (buildYear != null && buildYear < minYear) {
|
||||
minYear = buildYear;
|
||||
// int minYear = Integer.MAX_VALUE;
|
||||
if (buildYear != null && buildYear < Integer.MAX_VALUE) {
|
||||
// minYear = buildYear;
|
||||
return buildYear;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
return minYear;
|
||||
// return minYear;
|
||||
}
|
||||
|
||||
public Integer getBuildYear(District district) {
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.fangjia.service.mongo.fangjia;
|
||||
|
||||
import com.fangjia.dal.mongo.model.AdministrativeDivision;
|
||||
|
||||
|
||||
/**
|
||||
* Created by ideoj on 2016/9/5.
|
||||
*/
|
||||
public interface AdministrativeDivisionService {
|
||||
/**
|
||||
* 根据code获取城市
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
AdministrativeDivision findcityByCode(String code);
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.fangjia.service.mongo.fangjia;
|
||||
|
||||
import com.fangjia.dal.mongo.dao.AdministrativeDivisionDao;
|
||||
import com.fangjia.dal.mongo.model.AdministrativeDivision;
|
||||
|
||||
|
||||
public class AdministrativeDivisionServiceImpl implements AdministrativeDivisionService{
|
||||
private AdministrativeDivisionDao administrativeDivisionDao;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public AdministrativeDivision findcityByCode(String code) {
|
||||
return administrativeDivisionDao.findcityByCode(code);
|
||||
}
|
||||
|
||||
public void setAdministrativeDivisionDao(AdministrativeDivisionDao administrativeDivisionDao) {
|
||||
this.administrativeDivisionDao = administrativeDivisionDao;
|
||||
}
|
||||
}
|
||||
@@ -61,5 +61,6 @@ public interface ApiUserService {
|
||||
* @return
|
||||
*/
|
||||
User findUserById(Long id);
|
||||
void clearApiUserAuthorityCache(long userId);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user