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
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
242 additions
and
167 deletions
+242
-167
Dockerfile
Dockerfile
+18
-0
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+24
-1
FndDistrictMapper.java
...src/main/java/com/hungraim/ltc/dao/FndDistrictMapper.java
+32
-0
DisableService.java
...rc/main/java/com/hungraim/ltc/service/DisableService.java
+16
-1
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
+1
-0
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
+1
-0
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
+1
-1
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
+1
-0
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
)
{
...
...
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
;
...
@@ -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
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
</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>
...
...
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
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<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>
...
...
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
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<module>
system
</module>
<module>
system
</module>
<module>
apply
</module>
<module>
apply
</module>
<module>
governance
</module>
<module>
governance
</module>
<module>
assessment
</module>
</modules>
</modules>
<parent>
<parent>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
@@ -20,7 +21,6 @@
...
@@ -20,7 +21,6 @@
<groupId>
com.hungraim.ltc
</groupId>
<groupId>
com.hungraim.ltc
</groupId>
<artifactId>
ltc
</artifactId>
<artifactId>
ltc
</artifactId>
<version>
0.0.1
</version>
<version>
0.0.1
</version>
<name>
spring-cloud-init
</name>
<description>
parent
</description>
<description>
parent
</description>
<properties>
<properties>
...
...
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
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
</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>
...
...
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