Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
c57d3a6b
Commit
c57d3a6b
authored
Jun 08, 2023
by
dengguangman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-
parent
e8c7d61d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
682 additions
and
3 deletions
+682
-3
CompanySearchController.java
...controller/search/controller/CompanySearchController.java
+1
-1
BizConstant.java
...om/dsk/web/controller/search/macroMarket/BizConstant.java
+392
-0
IpUtil.java
...ava/com/dsk/web/controller/search/macroMarket/IpUtil.java
+281
-0
RegionalEconomicDataController.java
...er/search/macroMarket/RegionalEconomicDataController.java
+5
-1
OpRegionalLocalDto.java
...src/main/java/com/dsk/common/dtos/OpRegionalLocalDto.java
+2
-0
SecurityConfig.java
...rc/main/java/com/dsk/framework/config/SecurityConfig.java
+1
-1
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/search/controller/CompanySearchController.java
View file @
c57d3a6b
...
...
@@ -40,7 +40,7 @@ public class CompanySearchController {
/*
* 完全匹配企业名称
*/
@
Ge
tMapping
(
"/page"
)
@
Pos
tMapping
(
"/page"
)
public
AjaxResult
page
(
@RequestBody
ComposeQueryDto
compose
)
{
return
opportunityRadarService
.
enterprisePage
(
compose
);
}
...
...
dsk-admin/src/main/java/com/dsk/web/controller/search/macroMarket/BizConstant.java
0 → 100644
View file @
c57d3a6b
/**
*
*/
package
com
.
dsk
.
web
.
controller
.
search
.
macroMarket
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* 常量类
* @author xiaofei.qin
*
*/
public
final
class
BizConstant
{
/**
* http header里的常量
*/
public
final
static
String
HEADER_KEY_TOKEN
=
"token"
;
/**
* 中国的省份编码
*/
public
final
static
int
PROVINCE_CHINA
=
100000
;
public
static
final
Integer
BASE_CERTIFICATE_PARENT_ID
=
0
;
public
final
static
String
PROJECT_DATE_GROUP
=
"project_date_group"
;
public
final
static
String
FEEDBACK_GROUP
=
"feedback_group"
;
public
final
static
String
PROJECT_AMOUNT
=
"project_amount"
;
public
final
static
String
PROJECT_AMOUNT_2
=
"project_amount2"
;
public
final
static
String
SPLIT_CHAR
=
","
;
public
final
static
String
SIKUYI
=
"全国建筑市场监管公共服务平台"
;
public
final
static
String
OTHER
=
"其他建筑市场平台"
;
public
final
static
Integer
PAGE_ROW
=
10
;
//权限表基础保存功能
public
final
static
String
basicsave
=
"ROLE_SYS_PERMISSION_SAVE"
;
//权限表基础修改功能
public
final
static
String
basicupdate
=
"ROLE_SYS_PERMISSION_UPDATE"
;
//权限表基础删除功能
public
final
static
String
basicdelete
=
"ROLE_SYS_PERMISSION_DEL"
;
public
final
static
List
<
String
>
SPECIAL_CHARACTER
=
Arrays
.
asList
(
"有限"
,
"限公"
,
"公司"
,
"限责"
,
"责任"
,
"任公"
,
"股份"
,
"份有"
,
"有限公"
,
"限公司"
,
"有限责"
,
"有限公司"
,
"有限责任"
,
"责任公司"
,
"有限公司"
,
"有限责任公司"
,
"股份有限公司"
,
"监理"
,
"工程"
,
"建筑"
,
"建设"
);
public
final
static
List
<
String
>
COMPANY_NOT_CHARACTER
=
Arrays
.
asList
(
"日期"
,
"时间"
,
"公告"
,
"中标"
,
"候选人"
,
"公示"
,
"联合体"
,
"公开"
);
public
final
static
List
<
String
>
CONSTRUCTION
=
Arrays
.
asList
(
"建设"
,
"安装"
,
"总承包"
,
"EPC"
,
"施工"
,
"工程"
,
"项目"
,
"升级"
,
"改造"
,
"拆除"
,
"绿化"
,
"楼"
,
"路"
,
"桥"
,
"水"
,
"建"
,
"工程"
,
"测"
,
"房"
,
"改造"
,
"路"
,
"道"
,
"施"
,
"建"
,
"处理"
,
"地"
,
"坡"
,
"沟"
,
"池"
,
"场"
,
"修"
,
"设"
,
"舍"
,
"标段"
,
"城"
,
"治"
,
"期"
,
"堂"
,
"消防"
,
"小区"
,
"饰"
,
"景观"
,
"园"
,
"栋"
,
"馆"
,
"站"
,
"中心"
,
"座"
,
"规划"
,
"殿"
,
"厅"
,
"库"
,
"公寓"
,
"厦"
,
"车间"
,
"院"
,
"屋"
,
"水利"
,
"厕所"
,
"宅"
,
"管网"
,
"学"
,
"砖"
,
"所"
,
"点"
,
"家"
,
"EPC"
,
"PMC"
,
"DB"
,
"DBB"
,
"CM"
,
"BOT"
,
"PPP"
);
public
final
static
List
<
String
>
SUPERVISION
=
Arrays
.
asList
(
"监理"
);
public
final
static
List
<
String
>
SURVEY
=
Arrays
.
asList
(
"勘察"
,
"设计"
,
"测绘"
);
public
final
static
List
<
String
>
CONSULTATION
=
Arrays
.
asList
(
"咨询"
,
"管理"
);
public
final
static
List
<
String
>
OTHERBID
=
Arrays
.
asList
(
"采购"
);
public
final
static
int
CONSTRUCTIONNO
=
1
;
public
final
static
int
SUPERVISIONNO
=
2
;
public
final
static
int
SURVEYNO
=
3
;
public
final
static
int
CONSULTATIONNO
=
4
;
public
final
static
int
OTHERBIDNO
=
5
;
/**
* 中标项目名不包含字符
*/
public
final
static
List
<
String
>
PROJECT_NOT_CHARACTER
=
Arrays
.
asList
(
"报价"
,
"联合"
,
"日期"
,
"时间"
,
"公告"
,
"投标"
,
"公开"
,
"公布"
,
"如下"
,
"中标"
,
"编号"
,
"建造师"
,
"元"
,
"唱标"
);
public
final
static
List
<
String
>
COMPANY_CHARACTER
=
Arrays
.
asList
(
"公司"
,
"局"
,
"院"
,
"集团"
,
"所"
,
"中心"
,
"处"
,
"厂"
,
"大学"
,
"队"
,
"部"
,
"站"
,
"室"
,
"场"
,
"合作社"
);
public
final
static
List
<
String
>
COMPANY_BUILD_CHARACTER
=
Arrays
.
asList
(
"施工"
,
"工程"
,
"实业"
,
"建筑"
,
"建设"
,
"安装"
,
"勘察"
,
"设计"
,
"监理"
,
"技术"
,
"科技"
);
public
final
static
List
<
String
>
PROVINCE
=
Arrays
.
asList
(
"北京"
,
"天津"
,
"河北"
,
"山西"
,
"内蒙古"
,
"辽宁"
,
"吉林"
,
"黑龙江"
,
"上海"
,
"江苏"
,
"浙江"
,
"安徽"
,
"福建"
,
"江西"
,
"山东"
,
"河南"
,
"湖北"
,
"湖南"
,
"广东"
,
"广西"
,
"海南"
,
"重庆"
,
"四川"
,
"贵州"
,
"云南"
,
"西藏"
,
"陕西"
,
"甘肃"
,
"青海"
,
"宁夏"
,
"新疆"
);
public
final
static
List
<
String
>
SPIDER
=
Arrays
.
asList
(
"baidu.com"
,
"google"
,
"google.com"
,
"googlebot"
,
"YisouSpider"
,
"Bytespider"
,
"bytedance.com"
,
"so"
,
"so.com"
,
"360spider"
,
"sogou"
,
"sogou.com"
,
"msn"
,
"msn.com"
,
"bing"
,
"bing.com"
,
"sm.cn"
,
"youdao"
);
public
final
static
String
PROVINCE_CODE
=
"[{\"Code\":\"CN\",\"ProvinceName\":\"全国\"},{\"Code\":\"BJ\",\"ProvinceName\":\"北京\"},{\"Code\":\"TJ\",\"ProvinceName\":\"天津\"},{\"Code\":\"HB\",\"ProvinceName\":\"河北\"},{\"Code\":\"SX\",\"ProvinceName\":\"山西\"},{\"Code\":\"NMG\",\"ProvinceName\":\"内蒙古\"},{\"Code\":\"LN\",\"ProvinceName\":\"辽宁\"},{\"Code\":\"JL\",\"ProvinceName\":\"吉林\"},{\"Code\":\"HLJ\",\"ProvinceName\":\"黑龙江\"},{\"Code\":\"SH\",\"ProvinceName\":\"上海\"},{\"Code\":\"JS\",\"ProvinceName\":\"江苏\"},{\"Code\":\"ZJ\",\"ProvinceName\":\"浙江\"},{\"Code\":\"AH\",\"ProvinceName\":\"安徽\"},{\"Code\":\"FJ\",\"ProvinceName\":\"福建\"},{\"Code\":\"JX\",\"ProvinceName\":\"江西\"},{\"Code\":\"SD\",\"ProvinceName\":\"山东\"},{\"Code\":\"HEN\",\"ProvinceName\":\"河南\"},{\"Code\":\"HUB\",\"ProvinceName\":\"湖北\"},{\"Code\":\"HUN\",\"ProvinceName\":\"湖南\"},{\"Code\":\"GD\",\"ProvinceName\":\"广东\"},{\"Code\":\"GX\",\"ProvinceName\":\"广西\"},{\"Code\":\"HAIN\",\"ProvinceName\":\"海南\"},{\"Code\":\"CQ\",\"ProvinceName\":\"重庆\"},{\"Code\":\"SC\",\"ProvinceName\":\"四川\"},{\"Code\":\"GZ\",\"ProvinceName\":\"贵州\"},{\"Code\":\"YN\",\"ProvinceName\":\"云南\"},{\"Code\":\"XZ\",\"ProvinceName\":\"西藏\"},{\"Code\":\"SAX\",\"ProvinceName\":\"陕西\"},{\"Code\":\"GS\",\"ProvinceName\":\"甘肃\"},{\"Code\":\"QH\",\"ProvinceName\":\"青海\"},{\"Code\":\"NX\",\"ProvinceName\":\"宁夏\"},{\"Code\":\"XJ\",\"ProvinceName\":\"新疆\"}]"
;
public
final
static
String
PROVINCE_SIMPLE_CODE
=
"{\"CN\":\"全国\",\"BJ\":\"北京\",\"TJ\":\"天津\",\"HB\":\"河北\",\"SX\":\"山西\",\"NMG\":\"内蒙古\",\"LN\":\"辽宁\",\"JL\":\"吉林\",\"HLJ\":\"黑龙江\",\"SH\":\"上海\",\"JS\":\"江苏\",\"ZJ\":\"浙江\",\"AH\":\"安徽\",\"FJ\":\"福建\",\"JX\":\"江西\",\"SD\":\"山东\",\"HEN\":\"河南\",\"HUB\":\"湖北\",\"HUN\":\"湖南\",\"GD\":\"广东\",\"GX\":\"广西\",\"HAIN\":\"海南\",\"CQ\":\"重庆\",\"SC\":\"四川\",\"GZ\":\"贵州\",\"YN\":\"云南\",\"XZ\":\"西藏\",\"SAX\":\"陕西\",\"GS\":\"甘肃\",\"QH\":\"青海\",\"NX\":\"宁夏\",\"XJ\":\"新疆\"}"
;
public
final
static
List
<
String
>
MESSY_CODE
=
Arrays
.
asList
(
"Ð"
,
"Ï"
,
"¹"
,
"Ê"
,
"Õ"
,
"¡"
,
"Ö"
,
"±"
,
"¾"
,
"µ"
,
"½"
,
"�"
);
public
final
static
String
accessToken
=
"token"
;
/**
* 冻结
*/
public
final
static
String
FROZEN
=
"frozen"
;
/**
* 启用
*/
public
final
static
String
DEFROST
=
"defrost"
;
/**
* 验证码短信模板: 您的注册校验码是${code},10分钟内有效,请勿将校验码泄漏给他人。如非本人操作,请忽略本条消息。
*/
public
final
static
String
SMS_181860796
=
"SMS_181860796"
;
/**
* 密码短信模板: 感谢您注册建设库平台!您的初始密码为“${name}”请您尽快修改密码,提高账号安全性。
*/
public
final
static
String
SMS_145500857
=
"SMS_145500857"
;
/**
* 注册成功
*/
public
final
static
String
SMS_174024045
=
"SMS_174024045"
;
/**
* vip赠送
*/
public
final
static
String
SMS_174024049
=
"SMS_174024049"
;
/**
* 活动手机验证码
*/
public
final
static
String
SMS_174029192
=
"SMS_174029192"
;
/**
* H5引流页注册成功提示下载
*/
public
final
static
String
SMS_176528768
=
"SMS_176528768"
;
/**
* H5引流页短信验证码
*/
public
final
static
String
SMS_176936886
=
"SMS_176936886"
;
/**
* 密码登录提醒
*/
public
final
static
String
SMS_176938027
=
"SMS_176938027"
;
/**
* 向好友推送招标公告
*/
public
final
static
String
SMS_182541746
=
"SMS_182541746"
;
/**
* 用户订阅招标公告推送
*/
public
final
static
String
SMS_182541747
=
"SMS_182541747"
;
public
final
static
String
SMS_136390617
=
"SMS_136390617"
;
public
final
static
String
PROJECT_SOURCE
=
"project_source"
;
public
final
static
int
china
=
100000
;
public
final
static
String
China
=
"全国"
;
/**
* 最大页数
*/
public
final
static
int
MAX_PAGE_INDEX
=
100
;
/**
* 每页条数
*/
public
final
static
int
MAX_PAGE_SIZE
=
20
;
/**
* 每页条数
*/
public
final
static
int
MOBILE_MAX_PAGE_SIZE
=
20
;
/**
* 游客及普通用户显示条数
*/
public
final
static
int
VISITOR_ACCOUNT_PAGE_SIZE
=
10
;
/**
* 最大记录数
*/
public
final
static
int
MAX_RECORD_SIZE
=
2000
;
/**
* 生成账号
*/
public
static
final
Integer
USER_ACOUNT_BASE
=
10000
;
public
static
final
Integer
SVIP_MAX_EXPORT_COUNT
=
20000
;
public
static
final
Integer
MAX_EXPORT_COUNT
=
2000
;
/**
* 最大标签数
*/
public
final
static
int
MAX_LEBEL_SIZE
=
200
;
public
final
static
int
MAX_PAGE_SIZE_PC
=
201
;
/**
* 水滴信用信息更新时间
*/
public
static
final
Integer
SHUIDI_DATA_UPDATE_TIME
=
2
;
/**
* 水滴信用信息更新时间
*/
public
static
final
Integer
SHUIDI_DATA_UPDATE_TIME_ONE
=
1
;
public
final
static
String
CLIENT_IOS
=
"IOS"
;
public
final
static
String
CLIENT_MP
=
"mp"
;
public
final
static
String
CLIENT_NODEJS
=
"nodejs"
;
public
final
static
String
CLIENT_WRAP
=
"wrap"
;
public
final
static
String
CLIENT_ANDROID
=
"ANDROID"
;
public
static
final
String
MUNICIPALITY
=
"北京上海重庆天津"
;
public
static
final
String
NORTHCHINA
=
"北京市天津市河北省山西省内蒙古自治区"
;
public
static
final
String
SOUTHCHINA
=
"广东省海南省广西壮族自治区"
;
public
static
final
String
EASTCHINA
=
"上海市江苏省浙江省安徽省福建省江西省山东省"
;
public
static
final
String
MIDCHINA
=
"河南省湖北省湖南省"
;
public
static
final
String
WESTSOUTH
=
"重庆市四川省贵州省云南省西藏自治区"
;
public
static
final
String
EASTNORTH
=
"黑龙江省辽宁省吉林省"
;
public
static
final
String
WESTNORTH
=
"陕西省甘肃省青海省宁夏回族自治区新疆维吾尔自治区"
;
public
final
static
String
SERVICE_TYPE_VIP_CODE
=
"VIP"
;
public
final
static
String
SERVICE_TYPE_BZ
=
"BZ"
;
public
final
static
String
SERVICE_TYPE_PT
=
"PT"
;
public
final
static
String
SERVICE_TYPE_SD
=
"SD"
;
public
final
static
String
VIP_MVIP
=
"MVIP"
;
public
final
static
String
VIP_QVIP
=
"QVIP"
;
public
final
static
String
VIP_HYVIP
=
"HYVIP"
;
public
final
static
String
VIP_YVIP
=
"YVIP"
;
public
final
static
String
ONE_YEAR_VIP
=
"1YVIP"
;
public
final
static
String
TWO_YEAR_VIP
=
"2YVIP"
;
public
final
static
String
THREE_YEAR_VIP
=
"3YVIP"
;
public
final
static
String
STORE_NEW_CODE
=
"storeNew"
;
public
final
static
String
STORE_NEW_GROUP
=
"store"
;
public
final
static
String
SERVICE_TYPE_VIP
=
"2"
;
public
final
static
String
SERVICE_TYPE_BG
=
"1"
;
public
final
static
String
VIP
=
"vip"
;
public
final
static
String
START_TIME
=
"startTime"
;
public
final
static
String
END_TIME
=
"endTime"
;
public
final
static
String
VIP_TYPE_3_HOUR
=
"HOURVIP"
;
// 信用报告类型
public
final
static
String
GROUP_SERVICE_TYPE
=
"serviceType"
;
public
final
static
String
CODE_PT
=
"PT"
;
public
final
static
String
CODE_BZ
=
"BZ"
;
public
final
static
String
PT_USER
=
"pt_user"
;
public
final
static
String
VIP_USER
=
"vip_user"
;
/**
* 支付宝正式环境网关地址
*/
public
static
final
String
PAY_ALI_GATEURL
=
"https://openapi.alipay.com/gateway.do"
;
/**
* 支付宝正式环境APPID
*/
public
static
final
String
PAY_ALI_APPID
=
"2018103161911828"
;
public
static
final
String
RSA_PRIVATE_KEY
=
"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDbCQx2tczOecOJ4weztxnamFkNDX2ng0t/UKNwZzi2huEh621cN772ck2yO72/rfyioCSHPAg86XPCtjxaAbIKVRR+w1AC5oG6foUl9H+Mu2lvd9d6hIUzl0mSH4MaHgT21BO6oYE9E4IvDcy5kWfdor46tqDd4Md6gXle79/pgIP2P/xV106mZ1DP8V4G0yopa1DZ1xmMyrJZryy/oRs44u2j75l6Xz551K/lGyh96GPW8X46Ar7iLTajx8tf3H1ssgxudEqYYBlFtwryPWwoQdWawK9uJmFKw73BplhpStQSHokmVwFsXPPLyT/GtWTVUd7dyvEKGXs86B7jkhXtAgMBAAECggEAB83Put8JWAXwmJYVLSsF6crpyVREuNYtt3CJEjUrSR2PIeVAdTurOx6hdAs63Hx3dtfb1VGnPXxX2oUhq1dKH6IeY9HTpPbPgnSFi++lJ795pzYO4FeeY1MtlN44jpKpPJ4bwdeFQkbSqZiFRctPdw8YVgExxBYBJXU9fMtxH+GacV0koZmI4DGxo4fv0LhT2M+8rG6584vP8mly0jji/rCVzh6LapTPNV1QHRWx5d4r6aAghQ4DxBx+WaFhq1j9NV2NgLhfflt+2NNlmJ4xD3sGAXrzPqolS3cGb4BR9jq2v6v1Qs1F7nsp0DzSI3FLuht0VluiIWj7e3fR2Bt1hQKBgQDx26A/dU2yLF8nRbG69XrHteL0ATYa6nrNa3EPze2vyLMLRTfA0Ocao8u7FyuhQA0mA0DIzT6mwvnEIKlGKC3/XRqqKZw5GdVq0BpDjvLhPg3cOVHxefogcM0AiBJzEgmXG8gUxgpUCL2mKpZO9HeEF3h9yay5m1uam/rjG5MISwKBgQDn18qbIy2TE+X5YptdRGuCOwGRH70hB6RCiQFZY8EZsjvj0+FzBAD9HZHy5aNVS6m1ynn8ArB9MUMvLp6K1rDz/YcQAxN3tF/KmcP7dpxBtsZI68xKqLNUTLe1mjGce3hjLtUXbmJOCGUN4yFbk+u98VuwCXyPPwml0HnAqwTnpwKBgQCbfc3avnnDMQ/D2eTYA/Z56xAMO7MjPtjQtGCt/oDvYKLrfgbIKgZKdEAI+m6MbveFFtZRwtKit/uIAk+R0UcxRBRejf3oIBm7YCtif8ba1OBoU1nBW+BZduv1iYYDAPe1dKD/6gq92BjFed/ExxsHi2dlx4EKmz0be2ijFhlDXQKBgAgYEIq5/61S1ISQXLw010wEo1ldskyk56crAVENmoA7KLwbeZN6YE516dKBEeK4cYRXPUr/DQpR3faXuhE+zY63GzAD63oSYgXAuIbe7TWeG+4PzWIN4bTfuMouR+0eomVUDTx0LhprUJvbgh6gW2qWMo1Cx4Z4vO19CcMgNVuhAoGAfJfl0gWBtc4rJ/mLz1YD08X0oEcTUvw+HSQTjtG4BHa1aI1jHXe9h1+uZm9eacxzqdJ03zfWThV66SAsKjXrbIrb9e2x2OcT9DdXoqF9R5aSQzpTdvK3NMmnE4AKbb32xrGlBgINCFvxcCRRlkPK0jwl8D3IrWE/+YAXhGGAcC8="
;
public
static
final
String
RSA_PUBLIC_KEY
=
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2wkMdrXMznnDieMHs7cZ2phZDQ19p4NLf1CjcGc4tobhIettXDe+9nJNsju9v638oqAkhzwIPOlzwrY8WgGyClUUfsNQAuaBun6FJfR/jLtpb3fXeoSFM5dJkh+DGh4E9tQTuqGBPROCLw3MuZFn3aK+Orag3eDHeoF5Xu/f6YCD9j/8VddOpmdQz/FeBtMqKWtQ2dcZjMqyWa8sv6EbOOLto++Zel8+edSv5Rsofehj1vF+OgK+4i02o8fLX9x9bLIMbnRKmGAZRbcK8j1sKEHVmsCvbiZhSsO9waZYaUrUEh6JJlcBbFzzy8k/xrVk1VHe3crxChl7POge45IV7QIDAQAB"
;
/**
* 微信支付分配的商户号
*/
public
static
final
String
PAY_WX_MCHID
=
"1555277781"
;
/**
* trade_type=NATIVE,此参数必传。此id为二维码中包含的商品ID,商户自行定义。
*/
public
static
final
String
PAY_WX_PRODUCTID
=
"69641265"
;
/**
* 微信公众号appID
*/
public
static
final
String
WX_APPID
=
"wx3516e7f1706ef4f2"
;
/**
* 微信公众号appSecret
*/
public
static
final
String
WX_APPSECRET
=
"577265a4db8549fb275d84380ac782f9"
;
/**
* 微信分配的APP账号ID
*/
public
static
final
String
PAY_WX_APPID
=
"wx0bb7f3c347631215"
;
/**
* 微信分配的小程序账号ID
*/
public
static
final
String
PAY_WX_XCX_APPID
=
"wx34e8004a2b6c8f4b"
;
/**
* 微信分配的小程序商户号
*/
public
static
final
String
PAY_WX_XCX_MCHID
=
"wx34e8004a2b6c8f4b"
;
/**
* https://open.weixin.qq.com/
* 开发者平台app应用得secret:APP_SECRET
*/
public
static
final
String
PAY_WX_APP_SECRET
=
"daddb90bd88cb56e437ae2cecf0e8dd7"
;
/**
* 微信支付相关
* <p>
* 财付通商户号对应的密钥 <br/>
* 具体获得途径如下:<br/>
* 微信商户平台(pay.weixin.qq.com)-->账户设置-->API安全-->密钥设置
* </p>
*/
public
static
final
String
PAY_WX_SECRET
=
"hhFbrSQQ9W6rDxfn75C52zjTLjdFrYTg"
;
/**
* 微信支付网关地址
*/
public
static
final
String
PAY_WX_GATEURL
=
"https://api.mch.weixin.qq.com/pay/unifiedorder"
;
/**
* 调用微信PC端的交易类型
*/
public
static
final
String
PAY_WX_PC_TRADETYPE
=
"NATIVE"
;
/**
* 调用微信Wrap端的交易类型
*/
public
static
final
String
PAY_WX_WRAP_TRADETYPE
=
"MWEB"
;
/**
* 调用微信Wrap端的交易类型
*/
public
static
final
String
PAY_WX_JSAPI_TRADETYPE
=
"JSAPI"
;
/**
* 调用微信APP端的交易类型
*/
public
static
final
String
PAY_WX_APP_TRADETYPE
=
"APP"
;
}
dsk-admin/src/main/java/com/dsk/web/controller/search/macroMarket/IpUtil.java
0 → 100644
View file @
c57d3a6b
package
com
.
dsk
.
web
.
controller
.
search
.
macroMarket
;
import
org.apache.commons.lang3.StringUtils
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.BufferedReader
;
import
java.io.Closeable
;
import
java.io.File
;
import
java.io.InputStreamReader
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* IP校验
*/
public
class
IpUtil
{
public
final
static
List
<
String
>
qihooSpider
=
Arrays
.
asList
(
"180.153.232"
,
"180.153.234"
,
"180.153.236"
,
"180.163.220"
,
"42.236.101"
,
"42.236.102"
,
"42.236.103"
,
"42.236.10"
,
"42.236.12"
,
"42.236.13"
,
"42.236.14"
,
"42.236.15"
,
"42.236.16"
,
"42.236.17"
,
"42.236.46"
,
"42.236.48"
,
"42.236.49"
,
"42.236.50"
,
"42.236.51"
,
"42.236.52"
,
"42.236.53"
,
"42.236.54"
,
"42.236.55"
,
"42.236.99"
);
public
final
static
List
<
String
>
YisouSpider
=
Arrays
.
asList
(
"106.11.152"
,
"106.11.153"
,
"106.11.154"
,
"106.11.155"
,
"106.11.156"
,
"106.11.157"
,
"106.11.158"
,
"106.11.159"
,
"42.120.160"
,
"42.120.161"
,
"42.156.136"
,
"42.156.137"
,
"42.156.138"
,
"42.156.139"
,
"42.156.254"
);
public
final
static
List
<
String
>
ByteSpider
=
Arrays
.
asList
(
"110.249.201"
,
"110.249.202"
,
"111.225.147"
,
"111.225.148"
,
"111.225.149"
,
"220.243.135"
,
"220.243.136"
,
"60.8.165"
,
"60.8.9"
);
/**获取访问用户的客户端IP(适用于公网与局域网)*/
public
static
final
String
getIpAddr
(
final
HttpServletRequest
request
){
try
{
if
(
request
==
null
)
return
null
;
String
ipString
=
request
.
getHeader
(
"ali-cdn-real-ip"
);
if
(
StringUtils
.
isBlank
(
ipString
)
||
"unknown"
.
equalsIgnoreCase
(
ipString
))
{
ipString
=
request
.
getHeader
(
"x-forwarded-for"
);
}
if
(
StringUtils
.
isBlank
(
ipString
)
||
"unknown"
.
equalsIgnoreCase
(
ipString
))
{
ipString
=
request
.
getHeader
(
"Proxy-Client-IP"
);
}
if
(
StringUtils
.
isBlank
(
ipString
)
||
"unknown"
.
equalsIgnoreCase
(
ipString
))
{
ipString
=
request
.
getHeader
(
"X-Forwarded-For"
);
}
if
(
StringUtils
.
isBlank
(
ipString
)
||
"unknown"
.
equalsIgnoreCase
(
ipString
))
{
ipString
=
request
.
getHeader
(
"WL-Proxy-Client-IP"
);
}
if
(
StringUtils
.
isBlank
(
ipString
)
||
"unknown"
.
equalsIgnoreCase
(
ipString
))
{
ipString
=
request
.
getHeader
(
"X-Real-IP"
);
}
if
(
StringUtils
.
isBlank
(
ipString
)
||
"unknown"
.
equalsIgnoreCase
(
ipString
))
{
ipString
=
request
.
getRemoteAddr
();
}
// 多个路由时,取第一个非unknown的ip
final
String
[]
arr
=
ipString
.
split
(
","
);
for
(
final
String
str
:
arr
)
{
if
(!
"unknown"
.
equalsIgnoreCase
(
str
))
{
ipString
=
str
;
break
;
}
}
return
ipString
;
}
catch
(
Exception
e
){
return
null
;
}
}
/**
* write specfield bytes to a byte array start from offset
*
* @param b
* @param offset
* @param v
* @param bytes
*/
public
static
void
write
(
byte
[]
b
,
int
offset
,
long
v
,
int
bytes
)
{
for
(
int
i
=
0
;
i
<
bytes
;
i
++
)
{
b
[
offset
++]
=
(
byte
)((
v
>>>
(
8
*
i
))
&
0xFF
);
}
}
/**
* write a int to a byte array
*
* @param b
* @param offset
* @param v
*/
public
static
void
writeIntLong
(
byte
[]
b
,
int
offset
,
long
v
)
{
b
[
offset
++]
=
(
byte
)((
v
>>
0
)
&
0xFF
);
b
[
offset
++]
=
(
byte
)((
v
>>
8
)
&
0xFF
);
b
[
offset
++]
=
(
byte
)((
v
>>
16
)
&
0xFF
);
b
[
offset
]
=
(
byte
)((
v
>>
24
)
&
0xFF
);
}
/**
* get a int from a byte array start from the specifiled offset
*
* @param b
* @param offset
*/
public
static
long
getIntLong
(
byte
[]
b
,
int
offset
)
{
return
(
((
b
[
offset
++]
&
0x000000FF
L
))
|
((
b
[
offset
++]
<<
8
)
&
0x0000FF00
L
)
|
((
b
[
offset
++]
<<
16
)
&
0x00FF0000
L
)
|
((
b
[
offset
]
<<
24
)
&
0xFF000000
L
)
);
}
/**
* get a int from a byte array start from the specifield offset
*
* @param b
* @param offset
*/
public
static
int
getInt3
(
byte
[]
b
,
int
offset
)
{
return
(
(
b
[
offset
++]
&
0x000000FF
)
|
(
b
[
offset
++]
&
0x0000FF00
)
|
(
b
[
offset
]
&
0x00FF0000
)
);
}
public
static
int
getInt2
(
byte
[]
b
,
int
offset
)
{
return
(
(
b
[
offset
++]
&
0x000000FF
)
|
(
b
[
offset
]
&
0x0000FF00
)
);
}
public
static
int
getInt1
(
byte
[]
b
,
int
offset
)
{
return
(
(
b
[
offset
]
&
0x000000FF
)
);
}
/**
* string ip to long ip
*
* @param ip
* @return long
*/
public
static
long
ip2long
(
String
ip
)
{
String
[]
p
=
ip
.
split
(
"\\."
);
if
(
p
.
length
!=
4
)
return
0
;
int
p1
=
((
Integer
.
valueOf
(
p
[
0
])
<<
24
)
&
0xFF000000
);
int
p2
=
((
Integer
.
valueOf
(
p
[
1
])
<<
16
)
&
0x00FF0000
);
int
p3
=
((
Integer
.
valueOf
(
p
[
2
])
<<
8
)
&
0x0000FF00
);
int
p4
=
((
Integer
.
valueOf
(
p
[
3
])
<<
0
)
&
0x000000FF
);
return
((
p1
|
p2
|
p3
|
p4
)
&
0xFFFFFFFF
L
);
}
/**
* int to ip string
*
* @param ip
* @return string
*/
public
static
String
long2ip
(
long
ip
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
((
ip
>>
24
)
&
0xFF
).
append
(
'.'
)
.
append
((
ip
>>
16
)
&
0xFF
).
append
(
'.'
)
.
append
((
ip
>>
8
)
&
0xFF
).
append
(
'.'
)
.
append
((
ip
>>
0
)
&
0xFF
);
return
sb
.
toString
();
}
/**
* check the validate of the specifeld ip address
*
* @param ip
* @return boolean
*/
public
static
boolean
isIpAddress
(
String
ip
)
{
String
[]
p
=
ip
.
split
(
"\\."
);
if
(
p
.
length
!=
4
)
return
false
;
for
(
String
pp
:
p
)
{
if
(
pp
.
length
()
>
3
)
return
false
;
int
val
=
Integer
.
valueOf
(
pp
);
if
(
val
>
255
)
return
false
;
}
return
true
;
}
public
static
String
execHostCmd
(
String
ip
)
throws
Exception
{
return
execCmd
(
"host "
+
ip
,
null
);
}
public
static
String
isSpider
(
String
ip
)
throws
Exception
{
String
result
=
execCmd
(
"host "
+
ip
,
null
);
if
(
StringUtils
.
isNotBlank
(
ip
)&&!
isSpiderUa
(
result
)){
for
(
String
s
:
qihooSpider
)
{
if
(
ip
.
startsWith
(
s
)){
return
"so.com"
;
}
}
for
(
String
s
:
YisouSpider
)
{
if
(
ip
.
startsWith
(
s
)){
return
"sm.cn"
;
}
}
for
(
String
s
:
ByteSpider
)
{
if
(
ip
.
startsWith
(
s
)){
return
"bytedance.com"
;
}
}
}
return
result
;
}
/**
* 执行系统命令, 返回执行结果
*
* @param cmd 需要执行的命令
* @param dir 执行命令的子进程的工作目录, null 表示和当前主进程工作目录相同
*/
private
static
String
execCmd
(
String
cmd
,
File
dir
)
throws
Exception
{
StringBuilder
result
=
new
StringBuilder
();
Process
process
=
null
;
BufferedReader
bufrIn
=
null
;
BufferedReader
bufrError
=
null
;
try
{
// 执行命令, 返回一个子进程对象(命令在子进程中执行)
process
=
Runtime
.
getRuntime
().
exec
(
cmd
,
null
,
dir
);
// 方法阻塞, 等待命令执行完成(成功会返回0)
process
.
waitFor
();
// 获取命令执行结果, 有两个结果: 正常的输出 和 错误的输出(PS: 子进程的输出就是主进程的输入)
bufrIn
=
new
BufferedReader
(
new
InputStreamReader
(
process
.
getInputStream
(),
"UTF-8"
));
bufrError
=
new
BufferedReader
(
new
InputStreamReader
(
process
.
getErrorStream
(),
"UTF-8"
));
// 读取输出
String
line
=
null
;
while
((
line
=
bufrIn
.
readLine
())
!=
null
)
{
result
.
append
(
line
).
append
(
'n'
);
}
while
((
line
=
bufrError
.
readLine
())
!=
null
)
{
result
.
append
(
line
).
append
(
'n'
);
}
}
finally
{
closeStream
(
bufrIn
);
closeStream
(
bufrError
);
// 销毁子进程
if
(
process
!=
null
)
{
process
.
destroy
();
}
}
// 返回执行结果
return
result
.
toString
();
}
private
static
void
closeStream
(
Closeable
stream
)
{
if
(
stream
!=
null
)
{
try
{
stream
.
close
();
}
catch
(
Exception
e
)
{
// nothing
}
}
}
private
static
boolean
isSpiderUa
(
String
hostname
){
List
<
String
>
spiders
=
BizConstant
.
SPIDER
;
for
(
String
spider
:
spiders
)
{
if
(
hostname
.
toLowerCase
().
contains
(
spider
)){
return
true
;
}
}
return
false
;
}
}
dsk-admin/src/main/java/com/dsk/web/controller/search/macroMarket/RegionalEconomicDataController.java
View file @
c57d3a6b
...
...
@@ -3,6 +3,7 @@ package com.dsk.web.controller.search.macroMarket;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.dtos.*
;
import
com.dsk.system.service.EconomicService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -17,6 +18,7 @@ import javax.validation.Valid;
* @Date 2023/5/18 10:09
* @Version 1.0.0
*/
@Slf4j
@RestController
@RequestMapping
(
value
=
"/economic"
)
public
class
RegionalEconomicDataController
{
...
...
@@ -70,7 +72,9 @@ public class RegionalEconomicDataController {
*/
@PostMapping
(
value
=
"location"
)
public
AjaxResult
location
(
@RequestBody
OpRegionalLocalDto
vo
,
HttpServletRequest
request
){
// String ip = IpUtil.getIpAddr(request);
String
ip
=
IpUtil
.
getIpAddr
(
request
);
vo
.
setIp
(
ip
);
log
.
info
(
"location====================================>"
+
ip
);
return
economicService
.
location
(
vo
);
}
...
...
dsk-common/src/main/java/com/dsk/common/dtos/OpRegionalLocalDto.java
View file @
c57d3a6b
...
...
@@ -15,4 +15,6 @@ public class OpRegionalLocalDto {
* 省Id
*/
private
Integer
provinceId
;
private
String
ip
;
}
dsk-framework/src/main/java/com/dsk/framework/config/SecurityConfig.java
View file @
c57d3a6b
...
...
@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.
authorizeRequests
()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
,
"/economic/**"
,
"/enterprises/**"
,
"/specialPurposeBonds/**"
,
"/urbanInvestment/**"
).
permitAll
()
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
,
"/economic/**"
,
"/enterprises/**"
,
"/specialPurposeBonds/**"
,
"/urbanInvestment/**"
,
"/enterprise/**"
).
permitAll
()
// 静态资源,可匿名访问
.
antMatchers
(
HttpMethod
.
GET
,
"/"
,
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/profile/**"
).
permitAll
()
.
antMatchers
(
"/swagger-ui.html"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/*/api-docs"
,
"/druid/**"
).
permitAll
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment