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
f60e33ac
Commit
f60e33ac
authored
Apr 26, 2019
by
chang_chao@founder.com.cn
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.92.108.28/caopeng/bigdatainterservice
parents
d44aa150
b4e29a8b
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
256 additions
and
4 deletions
+256
-4
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/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/service/TbTzxxjqTzxxlydyService.java
+15
-0
src/main/java/com/founder/interservice/service/impl/TbTzxxjqTzxxlydyServiceImpl.java
+46
-0
src/main/resources/application-dev.yml
+8
-3
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
No files found.
src/main/java/com/founder/interservice/BigdatainterserviceApplication.java
View file @
f60e33ac
...
...
@@ -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 @
f60e33ac
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/TzxxlydyController.java
0 → 100644
View file @
f60e33ac
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 @
f60e33ac
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 @
f60e33ac
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 @
f60e33ac
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 @
f60e33ac
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/service/TbTzxxjqTzxxlydyService.java
0 → 100644
View file @
f60e33ac
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/TbTzxxjqTzxxlydyServiceImpl.java
0 → 100644
View file @
f60e33ac
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-dev.yml
View file @
f60e33ac
...
...
@@ -2,14 +2,19 @@ spring:
datasource
:
xzxt
:
driver-class-name
:
oracle.jdbc.driver.OracleDriver
username
:
XZXT
CQ
password
:
XZXT
CQ
url
:
jdbc:oracle:thin:@192.168.
0.104:1521:XZXT
username
:
XZXT
password
:
XZXT
url
:
jdbc:oracle:thin:@192.168.
1.116:1521:xzxtcp
gxzxt
:
driver-class-name
:
oracle.jdbc.driver.OracleDriver
username
:
XZXT
password
:
XZXT
url
:
jdbc:oracle:thin:@192.168.1.101:1521:cqxzxtsid
cqxz
:
driver-class-name
:
oracle.jdbc.driver.OracleDriver
username
:
XZXT
password
:
XZXT
url
:
jdbc:oracle:thin:@192.168.1.105:1521:XZXT3
#配置jpa 使其展示sql语句
jpa
:
show-sql
:
true
src/main/resources/application-prod.yml
View file @
f60e33ac
...
...
@@ -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 @
f60e33ac
<?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 @
f60e33ac
<?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
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