Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bigdatainterservice
Overview
Overview
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
曹鹏
bigdatainterservice
Commits
758c5c3e
Commit
758c5c3e
authored
Apr 17, 2019
by
caojingji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据库连接为线上正式库地址
parent
71751c14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
94 additions
and
3 deletions
+94
-3
src/main/java/com/founder/interservice/protogenesis/controller/ProtoController.java
+67
-0
src/main/java/com/founder/interservice/protogenesis/service/ProtoService.java
+2
-0
src/main/java/com/founder/interservice/protogenesis/service/impl/ProtoServiceImpl.java
+16
-0
src/main/java/com/founder/interservice/util/HttpClientUtils.java
+0
-0
src/main/java/com/founder/interservice/util/HttpUtil.java
+1
-3
src/main/resources/application.yml
+2
-0
src/main/resources/token.properties
+6
-0
No files found.
src/main/java/com/founder/interservice/protogenesis/controller/ProtoController.java
View file @
758c5c3e
package
com
.
founder
.
interservice
.
protogenesis
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.founder.interservice.VO.ResultVO
;
...
...
@@ -255,4 +256,70 @@ public class ProtoController {
}
return
resultVO
;
}
//多区域碰撞分析统计-发送任务
@RequestMapping
(
value
=
"/sendMultiResionalsAnalyTask"
,
method
=
{
RequestMethod
.
GET
})
@ResponseBody
public
ResultVO
sendMultiResionalsAnalyTask
(
String
param
){
ResultVO
resultVO
=
null
;
try
{
String
result
=
protoService
.
doPostWaData
(
"multiRegionalsAnalyseTask"
,
param
);
resultVO
=
ResultVOUtil
.
success
(
result
);
}
catch
(
InterServiceException
e
){
resultVO
=
ResultVOUtil
.
error
(
e
.
getCode
(),
e
.
getMessage
(),
e
);
}
return
resultVO
;
}
//多区域碰撞分析统计-获取结果
@RequestMapping
(
value
=
"/getMultiResionalsAnalyTask"
,
method
=
{
RequestMethod
.
GET
})
@ResponseBody
public
ResultVO
getMultiResionalsAnalyTask
(
String
taskId
){
ResultVO
resultVO
=
null
;
try
{
JSONObject
param
=
new
JSONObject
();
param
.
put
(
"taskId"
,
taskId
);
String
result
=
protoService
.
doPostWaData
(
"multiRegionalsAnalyseTaskFetch"
,
param
.
toJSONString
());
resultVO
=
ResultVOUtil
.
success
(
result
);
}
catch
(
InterServiceException
e
){
resultVO
=
ResultVOUtil
.
error
(
e
.
getCode
(),
e
.
getMessage
(),
e
);
}
return
resultVO
;
}
/**
* 获取任务状态
* @param taskId
* @return
*/
@RequestMapping
(
value
=
"/getTaskStatus"
,
method
=
{
RequestMethod
.
GET
})
@ResponseBody
public
ResultVO
getTaskStatus
(
String
taskId
){
ResultVO
resultVO
=
null
;
try
{
JSONObject
param
=
new
JSONObject
();
param
.
put
(
"taskId"
,
taskId
);
String
result
=
protoService
.
doPostWaData
(
"taskStatus"
,
param
.
toJSONString
());
resultVO
=
ResultVOUtil
.
success
(
result
);
}
catch
(
InterServiceException
e
){
resultVO
=
ResultVOUtil
.
error
(
e
.
getCode
(),
e
.
getMessage
(),
e
);
}
return
resultVO
;
}
@RequestMapping
(
value
=
"/getObjectRelation"
,
method
=
{
RequestMethod
.
GET
})
@ResponseBody
public
ResultVO
getObjectRelation
(
String
caseId
,
String
caseName
,
String
username
,
String
objectValue
){
ResultVO
resultVO
=
null
;
try
{
JSONObject
param
=
new
JSONObject
();
param
.
put
(
"caseId"
,
caseId
);
param
.
put
(
"caseName"
,
caseName
);
param
.
put
(
"username"
,
username
);
param
.
put
(
"objectValue"
,
objectValue
);
String
result
=
protoService
.
doPostWaData
(
"objectRelation"
,
param
.
toJSONString
());
resultVO
=
ResultVOUtil
.
success
(
result
);
}
catch
(
InterServiceException
e
){
resultVO
=
ResultVOUtil
.
error
(
e
.
getCode
(),
e
.
getMessage
(),
e
);
}
return
resultVO
;
}
}
src/main/java/com/founder/interservice/protogenesis/service/ProtoService.java
View file @
758c5c3e
...
...
@@ -26,4 +26,6 @@ public interface ProtoService {
String
getDzgzTaskStatus
(
String
taskId
);
String
getDzgzTaskInfos
(
String
taskId
);
public
String
doPostWaData
(
String
urlName
,
String
param
)
throws
InterServiceException
;
}
src/main/java/com/founder/interservice/protogenesis/service/impl/ProtoServiceImpl.java
View file @
758c5c3e
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.founder.interservice.enums.ResultEnum
;
import
com.founder.interservice.exception.InterServiceException
;
import
com.founder.interservice.protogenesis.service.ProtoService
;
import
com.founder.interservice.util.HttpClientUtils
;
import
com.founder.interservice.util.HttpUtil
;
import
com.founder.interservice.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -41,6 +42,9 @@ public class ProtoServiceImpl implements ProtoService {
@Value
(
"${wabigdata.fixedEvidenceByRegionTaskFetch.url}"
)
private
String
DZGZ_INFO_URL
;
@Value
(
"${wabigdata.unified.url}"
)
private
String
UNIFIED_URL
;
/**
* 获取远程的网安数据轨迹数据 不做任何操作
* @param obj
...
...
@@ -262,4 +266,16 @@ public class ProtoServiceImpl implements ProtoService {
throw
new
InterServiceException
(
ResultEnum
.
RESULT_ERROR
.
getCode
(),
ResultEnum
.
RESULT_ERROR
.
getMessage
());
}
}
@Override
public
String
doPostWaData
(
String
urlName
,
String
param
)
throws
InterServiceException
{
try
{
String
url
=
UNIFIED_URL
+
urlName
;
String
result
=
HttpClientUtils
.
doPostWaData
(
url
,
param
);
return
result
;
}
catch
(
InterServiceException
e
){
e
.
printStackTrace
();
throw
new
InterServiceException
(
ResultEnum
.
RESULT_ERROR
.
getCode
(),
ResultEnum
.
RESULT_ERROR
.
getMessage
());
}
}
}
src/main/java/com/founder/interservice/util/HttpClientUtils.java
0 → 100644
View file @
758c5c3e
This diff is collapsed.
Click to expand it.
src/main/java/com/founder/interservice/util/HttpUtil.java
View file @
758c5c3e
...
...
@@ -15,8 +15,6 @@ import org.apache.http.util.EntityUtils;
import
java.io.*
;
import
java.net.URI
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.util.*
;
public
class
HttpUtil
{
...
...
@@ -156,7 +154,7 @@ public class HttpUtil {
return
resultString
.
trim
();
}
public
static
void
main
(
String
[]
args
)
{
try
{
Date
date1
=
new
Date
();
...
...
src/main/resources/application.yml
View file @
758c5c3e
...
...
@@ -51,6 +51,8 @@ xdhbigdata:
cjServiceId
:
XDHDS0004
getCjDataServiceId
:
XDHWS0022
wabigdata
:
unified
:
url
:
http://www.adu.cq:8071/doc/api/api/
objectrelation
:
url
:
http://www.adu.cq:8608/api?name=objectRelation&key=88f3f909655065532073c41b0f1784df
gettrack
:
...
...
src/main/resources/token.properties
0 → 100644
View file @
758c5c3e
apikey
=
fb5aaf49482721d6c495d3ae26796216
username
=
xjzd-fangzheng
token_url
=
http://www.adu.cq:8071/doc/token/token
token
=
expiration
=
\ No newline at end of file
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