Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
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
hubin
long-tern-care-service
Commits
55e3d881
Commit
55e3d881
authored
Apr 22, 2021
by
蔡镇泽
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
bf3f9a8e
67c08597
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
395 additions
and
320 deletions
+395
-320
Dockerfile
Dockerfile
+18
-0
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+37
-14
FndDistrictMapper.java
...src/main/java/com/hungraim/ltc/dao/FndDistrictMapper.java
+32
-0
DisableService.java
...rc/main/java/com/hungraim/ltc/service/DisableService.java
+26
-11
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+12
-0
bootstrap.yml
apply/apply-service/src/main/resources/bootstrap.yml
+2
-2
FndDistrictMapper.xml
...y-service/src/main/resources/mapper/FndDistrictMapper.xml
+57
-0
bootstrap.yml
...sment/assessment-service/src/main/resources/bootstrap.yml
+2
-2
bootstrap.yml
auth-service/src/main/resources/bootstrap.yml
+2
-2
pom.xml
common/common-core/pom.xml
+50
-49
DistrictTreeVo.java
...java/com/hungraim/ltc/pojo/vo/disable/DistrictTreeVo.java
+35
-0
SvrProgramListVo.java
...com/hungraim/ltc/pojo/vo/governance/SvrProgramListVo.java
+1
-0
RequestUtils.java
...ore/src/main/java/com/hungraim/ltc/util/RequestUtils.java
+0
-149
pom.xml
common/common-mybatis/pom.xml
+5
-2
pom.xml
common/common-redis/pom.xml
+32
-31
bootstrap.yml
gateway-service/src/main/resources/bootstrap.yml
+2
-2
bootstrap.yml
governance/src/main/resources/bootstrap.yml
+2
-2
pom.xml
pom.xml
+21
-21
run.sh
run.sh
+10
-0
start.sh
start.sh
+15
-0
DOCKERFILE
system/system-admin-service/DOCKERFILE
+1
-1
bootstrap.yml
system/system-admin-service/src/main/resources/bootstrap.yml
+2
-2
pom.xml
system/system-api/pom.xml
+31
-30
No files found.
Dockerfile
0 → 100644
View file @
55e3d881
#指定依赖的镜像
FROM
java:8
#springboot
VOLUME
/tmp
#容器使用端口
EXPOSE
8000
#添加jar包入容器
ADD
./apply/apply-service/target/apply-service-0.0.1.jar /apply.jar
ADD
./assessment/assessment-service/target/assessment-service-0.0.1.jar /assessment.jar
ADD
./auth-service/target/auth-0.0.1.jar /auth.jar
ADD
./gateway-service/target/gateway-0.0.1.jar /gateway.jar
ADD
./governance/target/governance-0.0.1.jar /governance.jar
ADD
./system/system-admin-service/target/system-admin-0.0.1.jar /system-admin.jar
ADD
start.sh /start.sh
RUN
chmod
+x /start.sh
ENTRYPOINT
["sh","-c","./start.sh"]
apply/apply-service/src/main/java/com/hungraim/ltc/controller/DisableController.java
View file @
55e3d881
...
@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
...
@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableVO
;
import
com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo
;
import
com.hungraim.ltc.service.DisableService
;
import
com.hungraim.ltc.service.DisableService
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
...
@@ -41,6 +42,28 @@ public class DisableController {
...
@@ -41,6 +42,28 @@ public class DisableController {
}
}
/**
/**
* 获取所有省市区街道数据
*
* @return 返回树形结构省市区数据
*/
@RequestMapping
(
"/allDistrict"
)
public
Result
allDistrict
()
{
List
<
DistrictTreeVo
>
districtTreeVos
=
disableService
.
allDistrict
();
return
Result
.
success
(
districtTreeVos
);
}
/**
* 获取所有省市区街道数据,以树形结构返回
*
* @return 返回树形结构省市区数据
*/
@RequestMapping
(
"/allTreeDistrict"
)
public
Result
allTreeDistrict
()
{
List
<
DistrictTreeVo
>
districtTreeVos
=
disableService
.
getAllDistrictTreeData
();
return
Result
.
success
(
districtTreeVos
);
}
/**
* 查询所有父机构
* 查询所有父机构
*/
*/
@RequestMapping
(
"/fndOrganRoot"
)
@RequestMapping
(
"/fndOrganRoot"
)
...
@@ -84,7 +107,7 @@ public class DisableController {
...
@@ -84,7 +107,7 @@ public class DisableController {
* 查询护理机构下所有子机构id
* 查询护理机构下所有子机构id
*
*
* @param organId 机构id
* @param organId 机构id
* @return 机构及所有子机构id,
以逗号分隔,
如果没有子机构则只返回机构id
* @return 机构及所有子机构id,
以逗号分隔,
如果没有子机构则只返回机构id
*/
*/
@RequestMapping
(
"/subsidiariesOrganId"
)
@RequestMapping
(
"/subsidiariesOrganId"
)
public
Result
<
String
>
subsidiariesOrganId
(
String
organId
)
{
public
Result
<
String
>
subsidiariesOrganId
(
String
organId
)
{
...
@@ -97,23 +120,23 @@ public class DisableController {
...
@@ -97,23 +120,23 @@ public class DisableController {
/**
/**
* 失能人员信息列表
* 失能人员信息列表
*
*
* @param organId
适用机构代码
* @param organId 适用机构代码
* @param districtProvincial
所在省
* @param districtProvincial 所在省
* @param districtCity
所在市
* @param districtCity 所在市
* @param districtArea
所在区域
* @param districtArea 所在区域
* @param realName
失能人员姓名
* @param realName 失能人员姓名
* @param certiCode
失能人员身份证号码
* @param certiCode 失能人员身份证号码
* @param dataFrom
申请来源
* @param dataFrom 申请来源
* @param srvOrganName
护理机构名称
* @param srvOrganName 护理机构名称
* @param pageNum
当前页
* @param pageNum 当前页
* @param pageSize
每页几条数据
* @param pageSize 每页几条数据
* @return 失能人员信息列表
* @return 失能人员信息列表
*/
*/
@RequestMapping
(
"/disableList"
)
@RequestMapping
(
"/disableList"
)
public
Result
<
IPage
<
DisableVO
>>
disableList
(
String
organId
,
String
districtProvincial
,
public
Result
<
IPage
<
DisableVO
>>
disableList
(
String
organId
,
String
districtProvincial
,
String
districtCity
,
String
districtArea
,
String
districtCity
,
String
districtArea
,
String
realName
,
String
certiCode
,
String
dataFrom
,
String
realName
,
String
certiCode
,
String
dataFrom
,
String
srvOrganName
,
int
pageNum
,
int
pageSize
)
{
String
srvOrganName
,
int
pageNum
,
int
pageSize
)
{
IPage
<
DisableVO
>
iPage
=
disableService
.
disableList
(
organId
,
districtProvincial
,
IPage
<
DisableVO
>
iPage
=
disableService
.
disableList
(
organId
,
districtProvincial
,
districtCity
,
districtArea
,
realName
,
certiCode
,
dataFrom
,
srvOrganName
,
pageNum
,
pageSize
);
districtCity
,
districtArea
,
realName
,
certiCode
,
dataFrom
,
srvOrganName
,
pageNum
,
pageSize
);
return
Result
.
success
(
iPage
);
return
Result
.
success
(
iPage
);
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/dao/FndDistrictMapper.java
View file @
55e3d881
...
@@ -2,9 +2,13 @@ package com.hungraim.ltc.dao;
...
@@ -2,9 +2,13 @@ package com.hungraim.ltc.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.disable.ChFndDistrict
;
import
com.hungraim.ltc.pojo.entity.disable.ChFndDistrict
;
import
com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
/**
* 省市区Mapper
* 省市区Mapper
*
*
...
@@ -13,4 +17,32 @@ import org.springframework.stereotype.Repository;
...
@@ -13,4 +17,32 @@ import org.springframework.stereotype.Repository;
@Mapper
@Mapper
@Repository
@Repository
public
interface
FndDistrictMapper
extends
BaseMapper
<
ChFndDistrict
>
{
public
interface
FndDistrictMapper
extends
BaseMapper
<
ChFndDistrict
>
{
/**
* 获取所有地区的树形结构数据
*
* @return 返回树形结构数据
*/
List
<
DistrictTreeVo
>
getAllDistrictTreeData
();
/**
* 根据parentCode查询节点
*
* @return 返回节点列表
*/
List
<
DistrictTreeVo
>
getAreaChildByParentCode
(
@Param
(
"districtCode"
)
String
districtCode
,
@Param
(
"districtLevel"
)
Integer
districtLevel
);
/**
* 根据parendtCode查询街道数据
*
* @return 返回节点列表
*/
List
<
DistrictTreeVo
>
getStreetList
(
@Param
(
"districtCode"
)
String
districtCode
);
/**
* 一次性加载出所有的数据,包括街道数据
*
* @return 返回数据列表
*/
List
<
DistrictTreeVo
>
getAllDistrictAndStreetData
();
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/DisableService.java
View file @
55e3d881
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableVO
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
@@ -19,16 +20,16 @@ public interface DisableService {
...
@@ -19,16 +20,16 @@ public interface DisableService {
/**
/**
* 查询所有资源对应的角色
* 查询所有资源对应的角色
*
*
* @param organId
适用机构代码
* @param organId 适用机构代码
* @param districtProvincial
所在省
* @param districtProvincial 所在省
* @param districtCity
所在市
* @param districtCity 所在市
* @param districtArea
所在区域
* @param districtArea 所在区域
* @param realName
失能人员姓名
* @param realName 失能人员姓名
* @param certiCode
失能人员身份证号码
* @param certiCode 失能人员身份证号码
* @param dataFrom
申请来源
* @param dataFrom 申请来源
* @param srvOrganId
护理机构
* @param srvOrganId 护理机构
* @param pageNum
当前页
* @param pageNum 当前页
* @param pageSize
每页几条数据
* @param pageSize 每页几条数据
* @return list
* @return list
*/
*/
Page
<
DisableVO
>
disableList
(
String
organId
,
String
districtProvincial
,
String
districtCity
,
Page
<
DisableVO
>
disableList
(
String
organId
,
String
districtProvincial
,
String
districtCity
,
...
@@ -80,9 +81,23 @@ public interface DisableService {
...
@@ -80,9 +81,23 @@ public interface DisableService {
* 查询护理机构下所有子机构id
* 查询护理机构下所有子机构id
*
*
* @param organId 机构id
* @param organId 机构id
* @return 机构及所有子机构id,
以逗号分隔,
如果没有子机构则只返回机构id
* @return 机构及所有子机构id,
以逗号分隔,
如果没有子机构则只返回机构id
*/
*/
String
subsidiariesOrganId
(
String
organId
);
String
subsidiariesOrganId
(
String
organId
);
void
updateDisable
(
ChDisableApply
chDisableApply
);
void
updateDisable
(
ChDisableApply
chDisableApply
);
/**
* 获取所有省市区街道数据
*
* @return 返回树形结构省市区数据
*/
List
<
DistrictTreeVo
>
allDistrict
();
/**
* 获取所有省市区街道数据,以树形结构返回
*
* @return 返回树形结构省市区数据
*/
List
<
DistrictTreeVo
>
getAllDistrictTreeData
();
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
55e3d881
...
@@ -9,6 +9,7 @@ import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
...
@@ -9,6 +9,7 @@ import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableVO
;
import
com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo
;
import
com.hungraim.ltc.pojo.vo.disable.ExamineRecord
;
import
com.hungraim.ltc.pojo.vo.disable.ExamineRecord
;
import
com.hungraim.ltc.service.DisableService
;
import
com.hungraim.ltc.service.DisableService
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -206,4 +207,14 @@ public class DisableServiceImpl implements DisableService {
...
@@ -206,4 +207,14 @@ public class DisableServiceImpl implements DisableService {
public
void
updateDisable
(
ChDisableApply
chDisableApply
)
{
public
void
updateDisable
(
ChDisableApply
chDisableApply
)
{
disableApplyMapper
.
updateById
(
chDisableApply
);
disableApplyMapper
.
updateById
(
chDisableApply
);
}
}
@Override
public
List
<
DistrictTreeVo
>
allDistrict
()
{
return
districtMapper
.
getAllDistrictAndStreetData
();
}
@Override
public
List
<
DistrictTreeVo
>
getAllDistrictTreeData
()
{
return
districtMapper
.
getAllDistrictTreeData
();
}
}
}
\ No newline at end of file
apply/apply-service/src/main/resources/bootstrap.yml
View file @
55e3d881
...
@@ -10,9 +10,9 @@ spring:
...
@@ -10,9 +10,9 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
config
:
config
:
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
file-extension
:
yaml
# 必须修改成yaml
file-extension
:
yaml
# 必须修改成yaml
extension-configs
:
extension-configs
:
...
...
apply/apply-service/src/main/resources/mapper/FndDistrictMapper.xml
0 → 100644
View file @
55e3d881
<?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.hungraim.ltc.dao.FndDistrictMapper"
>
<resultMap
id=
"areawithChildMap"
type=
"com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo"
>
<id
column=
"DISTRICT_CODE"
property=
"districtCode"
/>
<result
column=
"DISTRICT_LEVEL"
property=
"districtLevel"
/>
<result
column=
"DISTRICT_NAME"
property=
"districtName"
/>
<result
column=
"PARENT_DISTIRCT_CODE"
property=
"parentDistrictCode"
/>
<collection
property=
"childDistrict"
column=
"{districtCode=DISTRICT_CODE,districtLevel=DISTRICT_LEVEL}"
select=
"com.hungraim.ltc.dao.FndDistrictMapper.getAreaChildByParentCode"
>
</collection>
<collection
property=
"childStreet"
column=
"DISTRICT_CODE"
select=
"com.hungraim.ltc.dao.FndDistrictMapper.getStreetList"
>
</collection>
</resultMap>
<resultMap
id=
"streetMap"
type=
"com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo"
>
<id
column=
"STREET_CODE"
property=
"districtCode"
/>
<result
column=
"STREET_NAME"
property=
"districtName"
/>
<result
column=
"AREA_CODE"
property=
"parentDistrictCode"
/>
</resultMap>
<sql
id=
"Base_column"
>
DISTRICT_CODE,DISTRICT_LEVEL,DISTRICT_NAME,PARENT_DISTIRCT_CODE
</sql>
<select
id=
"getAreaChildByParentCode"
resultMap=
"areawithChildMap"
>
SELECT
<include
refid=
"Base_column"
/>
FROM CH_FND_DISTRICT
WHERE PARENT_DISTIRCT_CODE = #{districtCode} AND DISTRICT_LEVEL = #{districtLevel} + 1 AND IS_VALID = 'Y'
</select>
<select
id=
"getAllDistrictTreeData"
resultMap=
"areawithChildMap"
>
SELECT
<include
refid=
"Base_column"
/>
FROM CH_FND_DISTRICT WHERE PARENT_DISTIRCT_CODE IS NULL AND IS_VALID = 'Y' AND DISTRICT_LEVEL = 1
</select>
<select
id=
"getStreetList"
resultMap=
"streetMap"
>
SELECT *
FROM CH_FND_STREET
WHERE AREA_CODE = #{districtCode}
AND IS_VALID = 0
</select>
<select
id=
"getAllDistrictAndStreetData"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo"
>
SELECT DISTRICT_CODE districtCode,
DISTRICT_LEVEL districtLevel,
DISTRICT_NAME districtName,
PARENT_DISTIRCT_CODE parentDistrictCode
FROM CH_FND_DISTRICT
WHERE IS_VALID = 'Y'
UNION
SELECT STREET_CODE districtCode,
NULL districtLevel,
STREET_NAME districtName,
AREA_CODE parentDistrictCode
FROM CH_FND_STREET
WHERE IS_VALID = 0
</select>
</mapper>
\ No newline at end of file
assessment/assessment-service/src/main/resources/bootstrap.yml
View file @
55e3d881
...
@@ -10,9 +10,9 @@ spring:
...
@@ -10,9 +10,9 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
config
:
config
:
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
file-extension
:
yaml
# 必须修改成yaml
file-extension
:
yaml
# 必须修改成yaml
extension-configs
:
extension-configs
:
...
...
auth-service/src/main/resources/bootstrap.yml
View file @
55e3d881
...
@@ -10,9 +10,9 @@ spring:
...
@@ -10,9 +10,9 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
config
:
config
:
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
file-extension
:
yaml
# 必须修改成yaml
file-extension
:
yaml
# 必须修改成yaml
extension-configs
:
extension-configs
:
...
...
common/common-core/pom.xml
View file @
55e3d881
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<parent>
<artifactId>
common
</artifactId>
<artifactId>
common
</artifactId>
<groupId>
com.hungraim.ltc
</groupId>
<groupId>
com.hungraim.ltc
</groupId>
<version>
0.0.1
</version>
<version>
0.0.1
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
common-core
</artifactId>
<artifactId>
common-core
</artifactId>
<packaging>
jar
</packaging>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
...
@@ -23,52 +24,52 @@
...
@@ -23,52 +24,52 @@
</build>
</build>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.hungraim.ltc
</groupId>
<groupId>
com.hungraim.ltc
</groupId>
<artifactId>
common-redis
</artifactId>
<artifactId>
common-redis
</artifactId>
<version>
0.0.1
</version>
<version>
0.0.1
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-core
</artifactId>
<artifactId>
spring-security-core
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-config
</artifactId>
<artifactId>
spring-security-config
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-oauth2-jose
</artifactId>
<artifactId>
spring-security-oauth2-jose
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.tomcat.embed
</groupId>
<groupId>
org.apache.tomcat.embed
</groupId>
<artifactId>
tomcat-embed-core
</artifactId>
<artifactId>
tomcat-embed-core
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.aspectj
</groupId>
<groupId>
org.aspectj
</groupId>
<artifactId>
aspectjweaver
</artifactId>
<artifactId>
aspectjweaver
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
<artifactId>
httpclient
</artifactId>
</dependency>
</dependency>
</dependencies>
</dependencies>
<distributionManagement>
<distributionManagement>
<repository>
<repository>
<id>
releases
</id>
<id>
releases
</id>
<name>
Nexus Release Repository
</name>
<name>
Nexus Release Repository
</name>
<url>
http://121.5.28.27:9091/nexus/repository/maven-releases/
</url>
<url>
http://121.5.28.27:9091/nexus/repository/maven-releases/
</url>
</repository>
</repository>
<snapshotRepository>
<snapshotRepository>
<id>
snapshots
</id>
<id>
snapshots
</id>
<name>
Nexus Snapshot Repository
</name>
<name>
Nexus Snapshot Repository
</name>
<url>
http://121.5.28.27:9091/nexus/repository/maven-snapshots/
</url>
<url>
http://121.5.28.27:9091/nexus/repository/maven-snapshots/
</url>
</snapshotRepository>
</snapshotRepository>
</distributionManagement>
</distributionManagement>
</project>
</project>
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/DistrictTreeVo.java
0 → 100644
View file @
55e3d881
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
DistrictTreeVo
{
/**
* 区域code
*/
private
String
districtCode
;
/**
* 区域级别:1省2地级市3县4街道
*/
private
Integer
districtLevel
=
4
;
/**
* 区域名称
*/
private
String
districtName
;
/**
* 父级id
*/
private
String
parentDistrictCode
;
/**
* 省市区子节点
*/
private
List
<
DistrictTreeVo
>
childDistrict
;
/**
* 街道子节点
*/
private
List
<
DistrictTreeVo
>
childStreet
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/SvrProgramListVo.java
View file @
55e3d881
...
@@ -78,6 +78,7 @@ public class SvrProgramListVo {
...
@@ -78,6 +78,7 @@ public class SvrProgramListVo {
/**
/**
* 创建时间(分配时间)
* 创建时间(分配时间)
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
effTime
;
private
Date
effTime
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/util/RequestUtils.java
deleted
100644 → 0
View file @
bf3f9a8e
package
com
.
hungraim
.
ltc
.
util
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
com.hungraim.ltc.constant.AuthConstants
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpHead
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.util.EntityUtils
;
import
org.apache.logging.log4j.util.Strings
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
sun.misc.BASE64Decoder
;
import
javax.servlet.http.HttpServletRequest
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* @author hubin
*/
@Slf4j
public
class
RequestUtils
{
public
static
HttpServletRequest
getRequest
()
{
return
((
ServletRequestAttributes
)
Objects
.
requireNonNull
(
RequestContextHolder
.
getRequestAttributes
())).
getRequest
();
}
public
static
JSONObject
getJwtPayload
()
{
String
jwtPayload
=
getRequest
().
getHeader
(
AuthConstants
.
JWT_PAYLOAD_KEY
);
return
JSONUtil
.
parseObj
(
jwtPayload
);
}
@SneakyThrows
public
static
String
getAuthClientId
()
{
String
clientId
;
HttpServletRequest
request
=
getRequest
();
// 从请求路径中获取
clientId
=
request
.
getParameter
(
AuthConstants
.
CLIENT_ID_KEY
);
if
(
StrUtil
.
isNotBlank
(
clientId
))
{
return
clientId
;
}
// 从请求头获取
String
basic
=
request
.
getHeader
(
AuthConstants
.
AUTHORIZATION_KEY
);
if
(
StrUtil
.
isNotBlank
(
basic
)
&&
basic
.
startsWith
(
AuthConstants
.
BASIC_PREFIX
))
{
basic
=
basic
.
replace
(
AuthConstants
.
BASIC_PREFIX
,
Strings
.
EMPTY
);
String
basicPlainText
=
new
String
(
new
BASE64Decoder
().
decodeBuffer
(
basic
),
StandardCharsets
.
UTF_8
);
//client:secret
clientId
=
basicPlainText
.
split
(
":"
)[
0
];
}
return
clientId
;
}
/**
* 发起http post请求
*
* @param url 请求地址
* @param entity 请求参数
* @return 返回信息,出错返回空
*/
@SneakyThrows
public
static
String
post
(
String
url
,
JSONObject
entity
,
Map
<
String
,
String
>
header
)
{
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
CloseableHttpResponse
response
=
null
;
try
{
HttpPost
httpPost
=
new
HttpPost
(
url
);
HttpHead
httpHead
=
new
HttpHead
();
//设置head
if
(
header
!=
null
)
{
header
.
forEach
(
httpHead:
:
setHeader
);
}
StringEntity
se
=
new
StringEntity
(
entity
.
toString
(),
"UTF-8"
);
se
.
setContentType
(
"application/json"
);
httpPost
.
setEntity
(
se
);
response
=
httpClient
.
execute
(
httpPost
);
HttpEntity
entity1
=
response
.
getEntity
();
String
resStr
=
null
;
if
(
entity1
!=
null
)
{
resStr
=
EntityUtils
.
toString
(
entity1
,
StandardCharsets
.
UTF_8
);
}
httpClient
.
close
();
response
.
close
();
return
resStr
;
}
catch
(
Exception
e
)
{
log
.
error
(
"POST请求:{},出现错误:{}"
,
url
,
e
.
getMessage
());
e
.
printStackTrace
();
}
finally
{
if
(
httpClient
!=
null
)
{
httpClient
.
close
();
}
if
(
response
!=
null
)
{
response
.
close
();
}
}
return
""
;
}
/**
* 发起http get请求
*
* @param url 请求地址
* @return 返回信息,出错返回空
*/
@SneakyThrows
public
static
String
get
(
String
url
)
{
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
CloseableHttpResponse
response
=
null
;
try
{
HttpGet
httpGet
=
new
HttpGet
(
url
);
response
=
httpClient
.
execute
(
httpGet
);
HttpEntity
entity1
=
response
.
getEntity
();
String
resStr
=
null
;
if
(
entity1
!=
null
)
{
resStr
=
EntityUtils
.
toString
(
entity1
,
StandardCharsets
.
UTF_8
);
}
httpClient
.
close
();
response
.
close
();
return
resStr
;
}
catch
(
Exception
e
)
{
log
.
error
(
"get请求:{},出现错误:{}"
,
url
,
e
.
getMessage
());
e
.
printStackTrace
();
}
finally
{
if
(
httpClient
!=
null
)
{
httpClient
.
close
();
}
if
(
response
!=
null
)
{
response
.
close
();
}
}
return
""
;
}
}
common/common-mybatis/pom.xml
View file @
55e3d881
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
common-mybatis
</artifactId>
<artifactId>
common-mybatis
</artifactId>
<packaging>
jar
</packaging>
<properties>
<properties>
<maven.compiler.source>
8
</maven.compiler.source>
<maven.compiler.source>
8
</maven.compiler.source>
...
@@ -23,11 +24,13 @@
...
@@ -23,11 +24,13 @@
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
3.3.1
</version>
<version>
3.3.1
</version>
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc6 -->
<dependency>
<dependency>
<groupId>
com.oracle
</groupId>
<groupId>
com.oracle
.database.jdbc
</groupId>
<artifactId>
ojdbc6
</artifactId>
<artifactId>
ojdbc6
</artifactId>
<version>
11.2.0.
3
</version>
<version>
11.2.0.
4
</version>
</dependency>
</dependency>
<!-- 引用Mybatis 和 Mysql驱动结束 -->
<!-- 引用Mybatis 和 Mysql驱动结束 -->
</dependencies>
</dependencies>
...
...
common/common-redis/pom.xml
View file @
55e3d881
...
@@ -2,38 +2,39 @@
...
@@ -2,38 +2,39 @@
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<parent>
<artifactId>
common
</artifactId>
<artifactId>
common
</artifactId>
<groupId>
com.hungraim.ltc
</groupId>
<groupId>
com.hungraim.ltc
</groupId>
<version>
0.0.1
</version>
<version>
0.0.1
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
common-redis
</artifactId>
<artifactId>
common-redis
</artifactId>
<packaging>
jar
</packaging>
<properties>
<properties>
<maven.compiler.source>
8
</maven.compiler.source>
<maven.compiler.source>
8
</maven.compiler.source>
<maven.compiler.target>
8
</maven.compiler.target>
<maven.compiler.target>
8
</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<!--redis 依赖-->
<!--redis 依赖-->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-pool2
</artifactId>
<artifactId>
commons-pool2
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.fasterxml.jackson.core
</groupId>
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-annotations
</artifactId>
<artifactId>
jackson-annotations
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.fasterxml.jackson.core
</groupId>
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-databind
</artifactId>
<artifactId>
jackson-databind
</artifactId>
</dependency>
</dependency>
<!--redis依赖 end-->
<!--redis依赖 end-->
</dependencies>
</dependencies>
</project>
</project>
gateway-service/src/main/resources/bootstrap.yml
View file @
55e3d881
...
@@ -9,9 +9,9 @@ spring:
...
@@ -9,9 +9,9 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
config
:
config
:
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
file-extension
:
yaml
# 必须修改成yaml
file-extension
:
yaml
# 必须修改成yaml
extension-configs
:
extension-configs
:
...
...
governance/src/main/resources/bootstrap.yml
View file @
55e3d881
...
@@ -9,9 +9,9 @@ spring:
...
@@ -9,9 +9,9 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
config
:
config
:
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
file-extension
:
yaml
# 必须修改成yaml
file-extension
:
yaml
# 必须修改成yaml
extension-configs
:
extension-configs
:
...
...
pom.xml
View file @
55e3d881
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<modules>
<modules>
<module>
gateway-service
</module>
<module>
gateway-service
</module>
<module>
auth-service
</module>
<module>
auth-service
</module>
<module>
common
</module>
<module>
common
</module>
<module>
system
</module>
<module>
system
</module>
<module>
apply
</module>
<module>
apply
</module>
<module>
governance
</module>
<module>
governance
</module>
</modules
>
<module>
assessment
</module
>
<parent
>
</modules
>
<
groupId>
org.springframework.boot
</groupId
>
<
parent
>
<artifactId>
spring-boot-starter-parent
</artifact
Id>
<groupId>
org.springframework.boot
</group
Id>
<version>
2.3.2.RELEASE
</version
>
<artifactId>
spring-boot-starter-parent
</artifactId
>
<relativePath/>
<!-- lookup parent from repository --
>
<version>
2.3.2.RELEASE
</version
>
</parent
>
<relativePath/>
<!-- lookup parent from repository --
>
<packaging>
pom
</packaging
>
</parent
>
<groupId>
com.hungraim.ltc
</groupId
>
<packaging>
pom
</packaging
>
<artifactId>
ltc
</artifact
Id>
<groupId>
com.hungraim.ltc
</group
Id>
<version>
0.0.1
</version
>
<artifactId>
ltc
</artifactId
>
<name>
spring-cloud-init
</name
>
<version>
0.0.1
</version
>
<description>
parent
</description>
<description>
parent
</description>
<properties>
<properties>
<java.version>
1.8
</java.version>
<java.version>
1.8
</java.version>
...
...
run.sh
0 → 100644
View file @
55e3d881
#!/bin/bash
git pull
mvn
install
docker stop ltc-poc
docker rmi ltc:latest
docker build
-t
ltc
.
docker run
-d
--name
ltc-poc
-p
9999:8001
-m
2G ltc
start.sh
0 → 100644
View file @
55e3d881
#!/bin/bash
mkdir
logs
nohup
java
-Xms50m
-Xmx200m
-jar
/auth.jar
>
./logs/auth.log &
nohup
java
-Xms50m
-Xmx200m
-jar
/system-admin.jar
>
./logs/admin.log &
nohup
java
-Xms50m
-Xmx200m
-jar
/gateway.jar
>
./logs/gateway.log &
nohup
java
-Xms50m
-Xmx200m
-jar
/apply.jar
>
./logs/apply.log &
nohup
java
-Xms50m
-Xmx200m
-jar
/governance.jar
>
./logs/govwenanc.log &
nohup
java
-Xms50m
-Xmx200m
-jar
/assessment.jar
>
./logs/assessment.log &
while
[[
true
]]
;
do
sleep
1
done
system/system-admin-service/DOCKERFILE
View file @
55e3d881
#指定依赖的镜像
#指定依赖的镜像
FROM
localhost:9999/library/
java:8
FROM
java:8
#springboot
#springboot
VOLUME
/tmp
VOLUME
/tmp
#容器使用端口
#容器使用端口
...
...
system/system-admin-service/src/main/resources/bootstrap.yml
View file @
55e3d881
...
@@ -10,9 +10,9 @@ spring:
...
@@ -10,9 +10,9 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
config
:
config
:
namespace
:
87d6f6f1-6583-46ea-ad02-7e8125f03c9
0
namespace
:
0e0f834a-a665-4d27-ae04-9d53c2e0214
0
server-addr
:
qw.hungraim.com:31158
server-addr
:
qw.hungraim.com:31158
file-extension
:
yaml
# 必须修改成yaml
file-extension
:
yaml
# 必须修改成yaml
extension-configs
:
extension-configs
:
...
...
system/system-api/pom.xml
View file @
55e3d881
...
@@ -2,38 +2,39 @@
...
@@ -2,38 +2,39 @@
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<parent>
<artifactId>
system
</artifactId>
<artifactId>
system
</artifactId>
<groupId>
com.hungraim.ltc
</groupId>
<groupId>
com.hungraim.ltc
</groupId>
<version>
0.0.1
</version>
<version>
0.0.1
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
system-api
</artifactId>
<artifactId>
system-api
</artifactId>
<packaging>
jar
</packaging>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-openfeign-core
</artifactId>
<artifactId>
spring-cloud-openfeign-core
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.hungraim.ltc
</groupId>
<groupId>
com.hungraim.ltc
</groupId>
<artifactId>
common-core
</artifactId>
<artifactId>
common-core
</artifactId>
<version>
0.0.1
</version>
<version>
0.0.1
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
<distributionManagement>
<distributionManagement>
<repository>
<repository>
<id>
releases
</id>
<id>
releases
</id>
<name>
Nexus Release Repository
</name>
<name>
Nexus Release Repository
</name>
<url>
http://121.5.28.27:9091/nexus/repository/maven-releases/
</url>
<url>
http://121.5.28.27:9091/nexus/repository/maven-releases/
</url>
</repository>
</repository>
<snapshotRepository>
<snapshotRepository>
<id>
snapshots
</id>
<id>
snapshots
</id>
<name>
Nexus Snapshot Repository
</name>
<name>
Nexus Snapshot Repository
</name>
<url>
http://121.5.28.27:9091/nexus/repository/maven-snapshots/
</url>
<url>
http://121.5.28.27:9091/nexus/repository/maven-snapshots/
</url>
</snapshotRepository>
</snapshotRepository>
</distributionManagement>
</distributionManagement>
</project>
</project>
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