Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-opsdoc
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 90b4b9ab
authored
Apr 27, 2022
by
王欣伟
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/eshiled-new/ne-shield-opsdoc
2 parents
b35d3ac0
87e8257c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
217 additions
and
43 deletions
1.6.0_四月/1.6.0数据库SQL脚本.sql
1.6.0_四月/1.6.0生产环境配置release.md
1.6.0_四月/1.6.0配置中心配置.md
1.6.0_四月/1.6.0数据库SQL脚本.sql
View file @
90b4b9a
...
@@ -54,29 +54,9 @@ ALTER TABLE `t_device_journey_overview`
...
@@ -54,29 +54,9 @@ ALTER TABLE `t_device_journey_overview`
ALTER
TABLE
`t_device_journey_overview`
ALTER
TABLE
`t_device_journey_overview`
ADD
INDEX
idx_vd_id
(
`vd_id`
);
ADD
INDEX
idx_vd_id
(
`vd_id`
);
-- 设备行程表
create
table
t_device_journey
(
id
int
(
11
)
auto_increment
comment
'里程主键ID'
primary
key
,
sn
varchar
(
32
)
null
comment
'设备序列号'
,
vd_id
int
(
11
)
null
comment
'车辆、设备关系id'
,
begin_time
datetime
null
comment
'里程开始时间'
,
end_time
datetime
null
comment
'里程结束时间'
,
begin_address
varchar
(
64
)
null
comment
'里程开始地址'
,
end_address
varchar
(
64
)
null
comment
'里程结束地址'
,
mileage
int
(
11
)
null
comment
'行驶里程km'
,
del_flag
tinyint
default
0
null
comment
'是否删除 0=正常 -1=删除'
,
created_date
datetime
null
comment
'创建时间|入库时间'
,
created_by
int
(
11
)
null
comment
'创建人用户id'
,
updated_date
datetime
null
comment
'更新时间'
,
updated_by
int
(
11
)
null
comment
'更新人用户id'
)
comment
'新e盾|里程表'
;
ALTER
TABLE
`t_device_journey`
ADD
INDEX
idx_sn
(
`sn`
);
ALTER
TABLE
`t_device_journey`
ALTER
TABLE
`t_device_journey`
ADD
INDEX
idx_
vd_id
(
`vd_id
`
);
ADD
INDEX
idx_
begin_time
(
`begin_time
`
);
-- 设备电量表
-- 设备电量表
create
table
t_device_power
create
table
t_device_power
...
@@ -122,7 +102,13 @@ alter table t_electric_fence modify fence_name varchar(256) null comment '栅栏
...
@@ -122,7 +102,13 @@ alter table t_electric_fence modify fence_name varchar(256) null comment '栅栏
alter
table
t_vehicle
modify
engine
varchar
(
52
)
null
comment
'发动机'
;
alter
table
t_vehicle
modify
engine
varchar
(
52
)
null
comment
'发动机'
;
alter
table
t_workorder_vehicle
modify
engine_no
varchar
(
52
)
null
comment
'发动机号'
;
alter
table
t_workorder_vehicle
modify
engine_no
varchar
(
52
)
null
comment
'发动机号'
;
#
基础数据创建帐号
update
t_message_template
set
content
=
'【广联赛讯】尊敬的{0}先生/女士,({1})车辆于({2})发生出({3})围栏报警,请您留意具体车辆。'
where
template
=
'SMS_TEMPLATE_ENTER_FENCE'
;
update
t_message_template
set
content
=
'【广联赛讯】尊敬的{0}先生/女士,({1})车辆于({2})发生出({3})围栏报警,请您留意具体车辆。'
where
template
=
'SMS_TEMPLATE_LEAVE_FENCE'
;
update
t_message_template
set
content
=
'【广联赛讯】尊敬的{0}先生/女士,({1})车辆于({2})发生进出({3})围栏报警,请您留意具体车辆。'
where
template
=
'SMS_TEMPLATE_ENTER_LEAVE_FENCE'
;
-- #基础数据创建帐号
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
user_account
VARCHAR
(
50
)
DEFAULT
NULL
COMMENT
'用户名'
;
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
user_account
VARCHAR
(
50
)
DEFAULT
NULL
COMMENT
'用户名'
;
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
user_id
INT
(
11
)
DEFAULT
NULL
COMMENT
'用户ID'
;
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
user_id
INT
(
11
)
DEFAULT
NULL
COMMENT
'用户ID'
;
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
department_id
INT
(
11
)
DEFAULT
NULL
COMMENT
'组织ID'
;
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
department_id
INT
(
11
)
DEFAULT
NULL
COMMENT
'组织ID'
;
...
@@ -155,20 +141,18 @@ CREATE TABLE `t_zhongli_carservice_info` (
...
@@ -155,20 +141,18 @@ CREATE TABLE `t_zhongli_carservice_info` (
)
ENGINE
=
INNODB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'仲利新E盾包活干对应服务商信息'
;
)
ENGINE
=
INNODB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'仲利新E盾包活干对应服务商信息'
;
-- 里程初始化
-- 更新vdId
update
t_device_journey
tdj
INNER
JOIN
t_vehicle_device
tvd
on
tvd
.
sn
=
tdj
.
sn
LEFT
JOIN
t_vehicle
tv
on
tv
.
id
=
tvd
.
vehicle_id
SET
tdj
.
vd_id
=
tvd
.
id
,
tdj
.
created_by
=
tv
.
created_by
where
tvd
.
del_flag
=
0
and
tdj
.
begin_time
>=
tv
.
created_date
and
tvd
.
bind_status
=
1
and
tdj
.
id
<
500000
and
tdj
.
id
>=
0
;
INSERT
INTO
t_device_journey_overview
(
sn
,
vd_id
,
total_journey_count
,
distance
,
created_by
,
created_date
,
updated_date
)
select
sn
,
vd_id
,
count
(
1
),
sum
(
mileage
),
created_by
,
created_date
,
updated_date
from
t_device_journey
where
vd_id
is
not
null
group
by
sn
,
vd_id
;
\ No newline at end of file
\ No newline at end of file
alter
table
t_electric_fence_sns
add
vd_id
int
null
comment
'车辆设备绑定关系'
after
sn
;
alter
table
t_electric_fence_sns_copy
add
vd_id
int
null
comment
'车辆设备绑定关系'
after
sn
;
alter
table
t_electric_fence_sns_copy
add
index
idx_sn
(
sn
);
-- 更新围栏设备vdid
update
t_electric_fence_sns_copy
tefs
,
t_vehicle_device
tvd
,
t_vehicle
tv
set
tefs
.
vd_id
=
tvd
.
id
where
tvd
.
sn
=
tefs
.
sn
and
tv
.
id
=
tvd
.
vehicle_id
;
update
t_electric_fence_sns
tefs
,
t_vehicle_device
tvd
,
t_vehicle
tv
set
tefs
.
vd_id
=
tvd
.
id
where
tvd
.
sn
=
tefs
.
sn
and
tv
.
id
=
tvd
.
vehicle_id
;
\ No newline at end of file
\ No newline at end of file
1.6.0_四月/1.6.0生产环境配置release.md
0 → 100644
View file @
90b4b9a
# 1.6.0版本 配置中心配置
## 一、项目:ne-shield-alarmcenter-new
### 3、生产配置
```
properties
server.servlet.context-
path
=
/alarmcenternew
#配置服务中心,原则上用那个nacos配置中心就注册到那个nacos
spring.cloud.nacos.discovery.group
=
NES_GROUP
spring.cloud.nacos.discovery.server-
addr
=
registry.glsx.com:80
#actuator端点启用和暴露
management.endpoints.web.base-
path
=
/xactuator
management.endpoint.shutdown.enabled
=
true
management.endpoints.web.exposure.include
=
*
management.endpoint.sentinel.enabled
=
false
management.endpoint.health.show-
details
=
always
#动态刷新配置 ---需要忽略权限拦截
management.security.enabled
=
false
#spring boot admin
spring.boot.admin.client.url
=
http://192.168.5.28:9158
spring.boot.admin.client.username
=
admin
spring.boot.admin.client.password
=
[已加密]b8c6da3c306f616dfc52612df9ca073e
#sentinel-dashboard
spring.cloud.sentinel.transport.dashboard
=
http://192.168.5.28:7718
spring.cloud.sentinel.transport.port
=
7719
spring.cloud.sentinel.eager
=
true
#zipkin
spring.zipkin.base-
url
=
http://192.168.5.28:7411
spring.zipkin.discovery-client-
enabled
=
false
#采样百分比
spring.sleuth.sampler.rate
=
100
#jackson
spring.jackson.date-
format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.time-
zone
=
GMT+8
spring.jackson.serialization.write_dates_as_timestamps
=
false
spring.jackson.default-property-
inclusion
=
non_null
#database
spring.datasource.driver-class-
name
=
com.mysql.cj.jdbc.Driver
spring.datasource.url
=
jdbc:mysql://supplychain.db.glsx.com:13306/neshield?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username
=
biz_neshield
spring.datasource.password
=
[已加密]d854dc38160f1ab7aff0a4e6aec8b6b7
# Hikari
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-
idle
=
5
spring.datasource.hikari.maximum-pool-
size
=
15
spring.datasource.hikari.auto-
commit
=
true
spring.datasource.hikari.idle-
timeout
=
30000
spring.datasource.hikari.pool-
name
=
DatebookHikariCP
spring.datasource.hikari.max-
lifetime
=
1800000
spring.datasource.hikari.connection-
timeout
=
30000
spring.datasource.hikari.connection-test-
query
=
SELECT 1
# Druid
#spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
# 初始化大小,最小,最大
spring.datasource.druid.initialSize
=
3
spring.datasource.druid.minIdle
=
5
spring.datasource.druid.maxActive
=
20
# 配置获取连接等待超时的时间
spring.datasource.druid.maxWait
=
60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
spring.datasource.druid.timeBetweenEvictionRunsMillis
=
60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
spring.datasource.druid.minEvictableIdleTimeMillis
=
30000
spring.datasource.druid.validationQuery
=
select 'x'
spring.datasource.druid.testWhileIdle
=
true
spring.datasource.druid.testOnBorrow
=
false
spring.datasource.druid.testOnReturn
=
false
# 是否缓存preparedStatement,打开PSCache,并且指定每个连接上PSCache的大小。官方建议MySQL下建议关闭,如果用SQL防火墙 建议打开
spring.datasource.druid.poolPreparedStatements
=
true
spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize
=
20
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
spring.datasource.druid.filters
=
stat,wall,slf4j
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
spring.datasource.druid.connectionProperties
=
druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
#redis config
spring.redis.host
=
192.168.5.43
spring.redis.port
=
6380
spring.redis.password
=
[已加密]ad5a39f43c270277819042410e4cad0e
spring.redis.database
=
1
spring.redis.timeout
=
200000
spring.data.redis.repositories.enabled
=
false
#配置.xml文件路径
mybatis.mapper-
locations
=
classpath*:mapper/*.xml
#配置模型路径
mybatis.type-aliases-
package
=
cn.com.glsx.alarm.modules.entity
logging.level.com.glsx.plat.mybatis.mapper
=
debug
#基础平台文件服务上传
file.upload.string.url
=
http://gfs.glsx.com.cn/file/upstring
file.zip.string.url
=
http://gfs.glsx.com.cn/file/zip
feign.devicemonitor.name
=
ne-shield-devicemonitor
feign.devicemonitor.path
=
/devicemonitor
feign.usercenter.name
=
glsx-ne-shield-usercenter
feign.usercenter.path
=
/usercenter
#服务调用超时时间
ribbon.ConnectTimeout
=
60000
ribbon.ReadTimeout
=
60000
feign.client.config.default.connect-
timeout
=
60000
feign.client.config.default.read-
timeout
=
60000
#日志
loggin.strategy
=
mongodb
#mongodb
spring.data.mongodb.uri
=
mongodb://192.168.5.20:27017/ne-shield
```
## 二、项目:glsx-ne-shield-gateway-server
### 3、生产配置
```
properties
#alarmcenter-new
spring.cloud.gateway.routes[8]
.id
=
alarmcenter_new_route
spring.cloud.gateway.routes[8]
.uri
=
lb://ne-shield-alarmcenter-new
spring.cloud.gateway.routes[8].predicates[0]=
Path
=
/alarmcenternew/**
spring.cloud.gateway.routes[8].filters[0]=
StripPrefix
=
0
spring.cloud.gateway.routes[8].filters[1]=
DedupeResponseHeader
=
Access-Control-Allow-Origin Access-Control-Allow-Credentials, RETAIN_FIRST
```
## 二、项目:ne-shield-kafkaconsumer
### 3、生产配置
```
properties
#警情报警Topic
mq.kafka.fence.alarm.topic
=
gps_fence_alarm_neshield
#设备行程
mq.kafka.device.journey.topic
=
neshield_journey
#设备电量
mq.kafka.device.battery.topic
=
topic_device_battery
```
## 三、项目:ne-shield-notifycenter
### 3、生产配置
```
properties
#短信服务
sms.url
=
http://didicb.glsx.com.cn/router
```
## 四、项目:biz-gps-kafka
### 3、生产配置
```
properties
#电量数据生产与消费
topic.device.battery
=
topic_device_battery
```
1.6.0_四月/1.6.0配置中心配置.md
View file @
90b4b9a
...
@@ -145,6 +145,11 @@ ribbon.ReadTimeout=60000
...
@@ -145,6 +145,11 @@ ribbon.ReadTimeout=60000
feign.client.config.default.connect-
timeout
=
60000
feign.client.config.default.connect-
timeout
=
60000
feign.client.config.default.read-
timeout
=
60000
feign.client.config.default.read-
timeout
=
60000
#日志存储
loggin.strategy
=
mongodb
#mongodb
spring.data.mongodb.uri
=
mongodb://192.168.0.39:27017/ne-shield
```
```
...
@@ -263,6 +268,10 @@ ribbon.ReadTimeout=60000
...
@@ -263,6 +268,10 @@ ribbon.ReadTimeout=60000
feign.client.config.default.connect-
timeout
=
60000
feign.client.config.default.connect-
timeout
=
60000
feign.client.config.default.read-
timeout
=
60000
feign.client.config.default.read-
timeout
=
60000
#日志存储
loggin.strategy
=
mongodb
#mongodb
spring.data.mongodb.uri
=
mongodb://192.168.0.39:27017/ne-shield
```
```
...
@@ -310,9 +319,9 @@ spring.jackson.default-property-inclusion=non_null
...
@@ -310,9 +319,9 @@ spring.jackson.default-property-inclusion=non_null
#database
#database
spring.datasource.driver-class-
name
=
com.mysql.cj.jdbc.Driver
spring.datasource.driver-class-
name
=
com.mysql.cj.jdbc.Driver
spring.datasource.url
=
jdbc:mysql://
fin.db.glsx.com:3307/neshield?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries
=true
spring.datasource.url
=
jdbc:mysql://
supplychain.db.glsx.com:13306/neshield?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval
=true
spring.datasource.username
=
jieru89
spring.datasource.username
=
biz_neshield
spring.datasource.password
=
[已加密]
2cabbdfdfc7c24eabe39a6982a8b9121
spring.datasource.password
=
[已加密]
d854dc38160f1ab7aff0a4e6aec8b6b7
# Hikari
# Hikari
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-
idle
=
5
spring.datasource.hikari.minimum-
idle
=
5
...
@@ -378,6 +387,11 @@ ribbon.ReadTimeout=60000
...
@@ -378,6 +387,11 @@ ribbon.ReadTimeout=60000
feign.client.config.default.connect-
timeout
=
60000
feign.client.config.default.connect-
timeout
=
60000
feign.client.config.default.read-
timeout
=
60000
feign.client.config.default.read-
timeout
=
60000
#日志
loggin.strategy
=
mongodb
#mongodb
spring.data.mongodb.uri
=
mongodb://192.168.5.20:27017/ne-shield
```
```
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment