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
3fd69a86
Commit
3fd69a86
authored
Apr 28, 2019
by
caojingji
Browse files
Options
Browse Files
Download
Plain Diff
修改新版网安对接接口 调整返回的参数格式
parents
ea366f00
cf853c4d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
267 additions
and
9 deletions
+267
-9
src/main/java/com/founder/interservice/BigdatainterserviceApplication.java
+1
-1
src/main/java/com/founder/interservice/config/DataSourceCqxzConfig.java
+40
-0
src/main/java/com/founder/interservice/controller/DataController.java
+0
-0
src/main/java/com/founder/interservice/controller/MinistrySuspectInfoController.java
+3
-3
src/main/java/com/founder/interservice/controller/TzxxlydyController.java
+36
-0
src/main/java/com/founder/interservice/mapper/cqxz/TbStAsjMapper.java
+15
-0
src/main/java/com/founder/interservice/mapper/cqxz/TbTzxxjqTzxxlydyMapper.java
+14
-0
src/main/java/com/founder/interservice/model/TbStAsj.java
+15
-0
src/main/java/com/founder/interservice/model/TbTzxxjqTzxxlydy.java
+35
-0
src/main/java/com/founder/interservice/qgzyfw/action/CallDygabxxfw.java
+3
-2
src/main/java/com/founder/interservice/service/DataService.java
+1
-0
src/main/java/com/founder/interservice/service/TbTzxxjqTzxxlydyService.java
+15
-0
src/main/java/com/founder/interservice/service/impl/DataServiceImpl.java
+10
-3
src/main/java/com/founder/interservice/service/impl/TbTzxxjqTzxxlydyServiceImpl.java
+46
-0
src/main/resources/application-prod.yml
+6
-0
src/main/resources/mybatis/mapper/cqxz/TbStAsjMapper.xml
+8
-0
src/main/resources/mybatis/mapper/cqxz/TbTzxxjqTzxxlydyMapper.xml
+17
-0
src/main/resources/mybatis/mapper/xzxt/RelationMapper.xml
+2
-0
No files found.
src/main/java/com/founder/interservice/BigdatainterserviceApplication.java
View file @
3fd69a86
...
...
@@ -13,7 +13,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableTransactionManagement
//开启事务管理
@EnableScheduling
//开启定时任务
@EnableAsync
//开启异步
@MapperScan
({
"com.founder.interservice.mapper.xzxt"
,
"com.founder.interservice.mapper.gxzxt"
})
@MapperScan
({
"com.founder.interservice.mapper.xzxt"
,
"com.founder.interservice.mapper.gxzxt"
,
"com.founder.interservice.mapper.cqxz"
})
public
class
BigdatainterserviceApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
BigdatainterserviceApplication
.
class
,
args
);
...
...
src/main/java/com/founder/interservice/config/DataSourceCqxzConfig.java
0 → 100644
View file @
3fd69a86
package
com
.
founder
.
interservice
.
config
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
javax.sql.DataSource
;
/**
* Created by liuys on 2019/4/24.
*/
@Configuration
@MapperScan
(
basePackages
=
"com.founder.interservice.mapper.cqxz"
,
sqlSessionTemplateRef
=
"cqxzSqlSessionTemplate"
)
public
class
DataSourceCqxzConfig
{
@Bean
(
name
=
"cqxzDataSource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource.cqxz"
)
public
DataSource
cqxzDataSource
()
{
return
DataSourceBuilder
.
create
().
build
();
}
@Bean
(
name
=
"cqxzSqlSessionFactory"
)
public
SqlSessionFactory
cqxzSqlSessionFactory
(
@Qualifier
(
"cqxzDataSource"
)
DataSource
dataSource
)
throws
Exception
{
SqlSessionFactoryBean
bean
=
new
SqlSessionFactoryBean
();
bean
.
setDataSource
(
dataSource
);
bean
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
().
getResources
(
"classpath:mybatis/mapper/cqxz/*.xml"
));
return
bean
.
getObject
();
}
@Bean
(
name
=
"cqxzSqlSessionTemplate"
)
public
SqlSessionTemplate
cqxzSqlSessionTemplate
(
@Qualifier
(
"cqxzSqlSessionFactory"
)
SqlSessionFactory
sqlSessionFactory
)
throws
Exception
{
return
new
SqlSessionTemplate
(
sqlSessionFactory
);
}
}
src/main/java/com/founder/interservice/controller/DataController.java
View file @
3fd69a86
This diff is collapsed.
Click to expand it.
src/main/java/com/founder/interservice/controller/MinistrySuspectInfoController.java
View file @
3fd69a86
...
...
@@ -186,16 +186,16 @@ public class MinistrySuspectInfoController {
jsonArray
.
add
(
jsonObject
);
Object
[]
os
=
jsonArray
.
toArray
();
Map
<
String
,
Object
>
mapQg
=
call
.
getGabZyInfoByJyaq
(
"asj"
,
os
,
gabConfig
);
List
<
Map
<
String
,
Object
>>
asjbh
List
=
(
List
<
Map
<
String
,
Object
>>)
mapQg
.
get
(
"dataResult"
);
result
List
=
(
List
<
Map
<
String
,
Object
>>)
mapQg
.
get
(
"dataResult"
);
if
(!
asjbhList
.
isEmpty
()
&&
asjbh
List
!=
null
){
if
(!
resultList
.
isEmpty
()
&&
result
List
!=
null
){
resultObj
.
put
(
"code"
,
ResultEnum
.
SUCCESS
.
getCode
());
resultObj
.
put
(
"message"
,
ResultEnum
.
SUCCESS
.
getMessage
());
}
else
{
resultObj
.
put
(
"code"
,
ResultEnum
.
SUCCESS
.
getCode
());
resultObj
.
put
(
"message"
,
"无数据"
);
}
resultObj
.
put
(
"dataList"
,
asjbh
List
);
resultObj
.
put
(
"dataList"
,
result
List
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
resultObj
.
put
(
"code"
,
ResultEnum
.
RESULT_ERROR
.
getCode
());
...
...
src/main/java/com/founder/interservice/controller/TzxxlydyController.java
0 → 100644
View file @
3fd69a86
package
com
.
founder
.
interservice
.
controller
;
import
com.founder.interservice.model.TbStAsj
;
import
com.founder.interservice.model.TbTzxxjqTzxxlydy
;
import
com.founder.interservice.service.TbTzxxjqTzxxlydyService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
/**
* Created by liuys on 2019/4/24.
*/
@Controller
@CrossOrigin
public
class
TzxxlydyController
{
@Autowired
private
TbTzxxjqTzxxlydyService
tzxxlydyService
;
@RequestMapping
(
"/getTzxxlydy"
)
@ResponseBody
public
List
<
TbTzxxjqTzxxlydy
>
getTzxxlydyByAsjbh
(
@Validated
TbTzxxjqTzxxlydy
tbTzxxjqTzxxlydy
){
return
tzxxlydyService
.
findTzxxlydyByAsjbh
(
tbTzxxjqTzxxlydy
);
}
@RequestMapping
(
"/getBshGlaj"
)
@ResponseBody
public
List
<
TbStAsj
>
getBshGlajByBsh
(
@Validated
TbTzxxjqTzxxlydy
tbTzxxjqTzxxlydy
){
return
tzxxlydyService
.
findAsjxxByBsh
(
tbTzxxjqTzxxlydy
);
}
}
src/main/java/com/founder/interservice/mapper/cqxz/TbStAsjMapper.java
0 → 100644
View file @
3fd69a86
package
com
.
founder
.
interservice
.
mapper
.
cqxz
;
import
com.founder.interservice.model.TbStAsj
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.validation.annotation.Validated
;
import
java.util.List
;
/**
* Created by liuys on 2019/4/25.
*/
@Repository
public
interface
TbStAsjMapper
{
List
<
TbStAsj
>
findAsjxxByAsjbh
(
String
_parameter
);
}
src/main/java/com/founder/interservice/mapper/cqxz/TbTzxxjqTzxxlydyMapper.java
0 → 100644
View file @
3fd69a86
package
com
.
founder
.
interservice
.
mapper
.
cqxz
;
import
com.founder.interservice.model.TbTzxxjqTzxxlydy
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* Created by liuys on 2019/4/24.
*/
@Repository
public
interface
TbTzxxjqTzxxlydyMapper
{
public
List
<
TbTzxxjqTzxxlydy
>
findTzxxlydyByAsjbh
(
TbTzxxjqTzxxlydy
tbTzxxjqTzxxlydy
);
}
src/main/java/com/founder/interservice/model/TbStAsj.java
0 → 100644
View file @
3fd69a86
package
com
.
founder
.
interservice
.
model
;
import
lombok.Data
;
/**
* Created by liuys on 2019/4/25.
*/
@Data
public
class
TbStAsj
{
private
String
asjbh
;
private
String
ajmc
;
private
String
asjfssjAsjfskssj
;
private
String
asjfsddDzmc
;
private
String
jyaq
;
}
src/main/java/com/founder/interservice/model/TbTzxxjqTzxxlydy.java
0 → 100644
View file @
3fd69a86
package
com
.
founder
.
interservice
.
model
;
//
import
lombok.Data
;
import
org.hibernate.annotations.DynamicUpdate
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
* Created by liuys on 2019/4/24.
*/
@Data
public
class
TbTzxxjqTzxxlydy
{
private
String
rcdid
;
//主键编号
private
String
ztbs
;
// 主题标示(特征信息类型 用固定的字符,表示特定主题,如aj)
private
String
bshlx
;
// 对应的标示号类型(内容要和标示号类型代码表中的一致)
private
String
zjzdmc
;
// 该表的主键字段名称(配置案件编号,线索编号等字段的名称)
private
Date
afsj
;
//
private
String
lrr
;
// 录入人
private
Date
lrsj
;
// 录入时间
private
String
lrdwdm
;
// 录入单位代码
private
String
lrdwmc
;
// 录入单位名称
private
String
gxr
;
// 改写人
private
Date
gxsj
;
// 改写时间
private
String
scbz
;
// 删除标志
private
String
zjbh
;
// 该表的主键编号
private
String
gjc
;
// 关键特征信息
private
String
bm
;
// 特征信息来源表名
private
String
ip
;
// ip地址
private
String
gxdwdm
;
// 改写单位代码
private
String
gxdwmc
;
// 改写单位名称
private
String
cxlx
;
//查询类型01表示查询标识号,02表示根据标识号查关联案件信息
}
src/main/java/com/founder/interservice/qgzyfw/action/CallDygabxxfw.java
View file @
3fd69a86
...
...
@@ -38,6 +38,7 @@ public class CallDygabxxfw{
//根据条件调取部级资源-主方法
public
Map
getGabZyInfoByJyaq
(
String
zylx
,
Object
[]
os
,
GabConfig
gabConfig
){
//zylx:查询资源类型,os:参数
Map
dataMap
=
new
HashMap
();
String
responseId
=
""
;
//联动服务方id
String
bizParamXml
=
""
;
//发送查询所需的xml字符串
if
(
"asj"
.
equals
(
zylx
)){
...
...
@@ -94,10 +95,10 @@ public class CallDygabxxfw{
//System.out.println("查询类别=="+zylx+"获取的resultStr="+resultStr);
if
(!
StringUtil
.
ckeckEmpty
(
resultStr
)){
resultStr
=
resultStr
.
substring
(
resultStr
.
indexOf
(
"<Data>"
)+
6
,
resultStr
.
indexOf
(
"</Data>"
));
D
ataMap
=
returnXmlMap
(
xmlStr2Document
(
resultStr
),
zylx
);
d
ataMap
=
returnXmlMap
(
xmlStr2Document
(
resultStr
),
zylx
);
//System.out.println("查询类别=="+zylx+"裁剪后的resultStr生成的DataMap="+DataMap);
}
return
D
ataMap
;
return
d
ataMap
;
}
/**
* 调取全国的28个资源服务
...
...
src/main/java/com/founder/interservice/service/DataService.java
View file @
3fd69a86
package
com
.
founder
.
interservice
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.founder.interservice.exception.InterServiceException
;
import
com.founder.interservice.model.Relation
;
import
com.founder.interservice.model.Track
;
...
...
src/main/java/com/founder/interservice/service/TbTzxxjqTzxxlydyService.java
0 → 100644
View file @
3fd69a86
package
com
.
founder
.
interservice
.
service
;
import
com.founder.interservice.model.TbStAsj
;
import
com.founder.interservice.model.TbTzxxjqTzxxlydy
;
import
java.util.List
;
/**
* Created by liuys on 2019/4/24.
*/
public
interface
TbTzxxjqTzxxlydyService
{
List
<
TbTzxxjqTzxxlydy
>
findTzxxlydyByAsjbh
(
TbTzxxjqTzxxlydy
tbTzxxjqTzxxlydy
);
List
<
TbStAsj
>
findAsjxxByBsh
(
TbTzxxjqTzxxlydy
tbTzxxjqTzxxlydy
);
}
src/main/java/com/founder/interservice/service/impl/DataServiceImpl.java
View file @
3fd69a86
package
com
.
founder
.
interservice
.
service
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.founder.interservice.enums.ResultEnum
;
import
com.founder.interservice.exception.InterServiceException
;
import
com.founder.interservice.model.Relation
;
import
com.founder.interservice.model.ResultObj
;
import
com.founder.interservice.model.Track
;
import
com.founder.interservice.querymodel.RelationFilter
;
import
com.founder.interservice.querymodel.TrackFilter
;
import
com.founder.interservice.service.DataService
;
import
com.founder.interservice.util.HttpUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
com.founder.interservice.mapper.xzxt.RelationMapper
;
import
com.founder.interservice.mapper.xzxt.TrackMapper
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* @ClassName: DataServiceImpl
...
...
@@ -25,6 +29,8 @@ import java.util.Map;
@Service
public
class
DataServiceImpl
implements
DataService
{
@Value
(
"${wabigdata.relationGetAll.url}"
)
private
String
relationGetAll_url
;
@Autowired
private
RelationMapper
relationMapper
;
@Autowired
...
...
@@ -141,4 +147,5 @@ public class DataServiceImpl implements DataService {
int
total
=
relationMapper
.
selectRelatNum
(
relationFilter
);
return
total
;
}
}
src/main/java/com/founder/interservice/service/impl/TbTzxxjqTzxxlydyServiceImpl.java
0 → 100644
View file @
3fd69a86
package
com
.
founder
.
interservice
.
service
.
impl
;
import
com.founder.interservice.mapper.cqxz.TbStAsjMapper
;
import
com.founder.interservice.mapper.cqxz.TbTzxxjqTzxxlydyMapper
;
import
com.founder.interservice.model.TbStAsj
;
import
com.founder.interservice.model.TbTzxxjqTzxxlydy
;
import
com.founder.interservice.service.TbTzxxjqTzxxlydyService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* Created by liuys on 2019/4/24.
*/
@Service
public
class
TbTzxxjqTzxxlydyServiceImpl
implements
TbTzxxjqTzxxlydyService
{
@Autowired
TbTzxxjqTzxxlydyMapper
tzxxlydyMapper
;
@Autowired
TbStAsjMapper
tbStAsjMapper
;
@Override
public
List
<
TbTzxxjqTzxxlydy
>
findTzxxlydyByAsjbh
(
TbTzxxjqTzxxlydy
tbTzxxjqTzxxlydy
)
{
return
tzxxlydyMapper
.
findTzxxlydyByAsjbh
(
tbTzxxjqTzxxlydy
);
}
@Override
public
List
<
TbStAsj
>
findAsjxxByBsh
(
TbTzxxjqTzxxlydy
tbTzxxjqTzxxlydy
)
{
TbTzxxjqTzxxlydy
cxst
=
new
TbTzxxjqTzxxlydy
();
cxst
.
setGjc
(
tbTzxxjqTzxxlydy
.
getGjc
());
List
<
TbTzxxjqTzxxlydy
>
tzxxlydyList
=
tzxxlydyMapper
.
findTzxxlydyByAsjbh
(
cxst
);
StringBuilder
asjbh
=
new
StringBuilder
(
""
);
for
(
TbTzxxjqTzxxlydy
tzxxlydy:
tzxxlydyList
)
{
if
(!
tbTzxxjqTzxxlydy
.
getZjbh
().
equals
(
tzxxlydy
.
getZjbh
())){
asjbh
.
append
(
",'"
+
tzxxlydy
.
getZjbh
()+
"'"
);
}
}
String
asjbhStr
=
asjbh
.
toString
();
if
(
asjbhStr
==
null
||
""
.
equals
(
asjbhStr
)){
return
null
;
}
else
{
return
tbStAsjMapper
.
findAsjxxByAsjbh
(
asjbhStr
.
substring
(
1
));
}
}
}
src/main/resources/application-prod.yml
View file @
3fd69a86
...
...
@@ -10,6 +10,11 @@ spring:
username
:
GXZXT_WB
password
:
GXZXT_WB2018
url
:
jdbc:oracle:thin:@10.154.106.26:1521:XZDB
cqxz
:
driver-class-name
:
oracle.jdbc.driver.OracleDriver
username
:
XZXT
password
:
XzxtPwd#50
url
:
jdbc:oracle:thin:@77.1.24.50:1521:CQXZ
#配置jpa 使其展示sql语句
jpa
:
show-sql
:
false
\ No newline at end of file
src/main/resources/mybatis/mapper/cqxz/TbStAsjMapper.xml
0 → 100644
View file @
3fd69a86
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.founder.interservice.mapper.cqxz.TbStAsjMapper"
>
<select
id=
"findAsjxxByAsjbh"
parameterType=
"String"
resultType=
"com.founder.interservice.model.TbStAsj"
>
SELECT ASJBH as asjbh,ASJFSSJ_ASJFSKSSJ as asjfssjAsjfskssj,AJMC as ajmc,ASJFSDD_DZMC as asjfsddDzmc,JYAQ as jyaq from TB_ST_ASJ where XXSC_PDBZ='0' and asjbh IN (${_parameter})
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapper/cqxz/TbTzxxjqTzxxlydyMapper.xml
0 → 100644
View file @
3fd69a86
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.founder.interservice.mapper.cqxz.TbTzxxjqTzxxlydyMapper"
>
<select
id=
"findTzxxlydyByAsjbh"
parameterType=
"com.founder.interservice.model.TbTzxxjqTzxxlydy"
resultType=
"com.founder.interservice.model.TbTzxxjqTzxxlydy"
>
SELECT bshlx,zjbh,gjc from TB_TZXXJQ_TZXXLXDY where SCBZ=0
<if
test=
"zjbh != null and zjbh != ''"
>
and ZJBH = #{zjbh}
</if>
<if
test=
"gjc != null and gjc != ''"
>
and GJC = #{gjc}
</if>
<if
test=
"bshlx != null and bshlx != ''"
>
and BSHLX = #{bshlx}
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapper/xzxt/RelationMapper.xml
View file @
3fd69a86
...
...
@@ -70,6 +70,8 @@
r.objecttotype as objecttotype,
r.objecttovalue as objecttovalue,
r.timestamp as timestamp,
r.relativetype as relativetype,
r.relativetypename as relativetypename,
r.first_timestamp as first_timestamp
from relation r
<where>
...
...
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