Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
aserver
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
15所TongWeb
aserver
Commits
14aefa80
Commit
14aefa80
authored
Nov 30, 2020
by
李德才
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入同步Redis数据的条件
parent
44cd2cf0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
GoodSync.java
src/main/java/com/archser/aserver/itask/GoodSync.java
+5
-2
config-pro.properties
src/main/resources/config-pro.properties
+10
-7
No files found.
src/main/java/com/archser/aserver/itask/GoodSync.java
View file @
14aefa80
...
...
@@ -6,6 +6,7 @@ import com.archser.aserver.model.User;
import
com.archser.aserver.util.redis.InfoOrgan
;
import
com.archser.aserver.util.redis.InfoSystem
;
import
com.archser.aserver.util.redis.InfoUser
;
import
com.jfinal.kit.PropKit
;
import
com.jfinal.plugin.cron4j.ITask
;
...
...
@@ -16,12 +17,12 @@ public class GoodSync implements ITask {
@Override
public
void
stop
()
{
}
@Override
public
void
run
()
{
// 同步用户数据
if
(
PropKit
.
getBoolean
(
"updateRedisData"
))
{
// 同步用户数据
java
.
lang
.
System
.
err
.
println
(
"同步用户信息"
);
User
.
dao
.
findAll
().
forEach
(
InfoUser:
:
saveUser
);
// 同步系统数据
...
...
@@ -31,4 +32,6 @@ public class GoodSync implements ITask {
java
.
lang
.
System
.
err
.
println
(
"同步机构数据"
);
Organ
.
dao
.
findAll
().
forEach
(
InfoOrgan:
:
saveOrgan
);
}
}
}
src/main/resources/config-pro.properties
View file @
14aefa80
dbType
=
DM
jdbcUrl
=
jdbc:dm://39.104.
21.218
:5236
jdbcUrl
=
jdbc:dm://39.104.
174.12
:5236
jdbc.driver
=
dm.jdbc.driver.DmDriver
user
=
archser
_hywdtest
password
=
archser_
hywdtest
basic.url
=
http://39.104.
21.218
:11028
user
=
archser
password
=
archser_
v2.0
basic.url
=
http://39.104.
174.12
:11028
devMode
=
true
engineDevMode
=
true
## 是否同步Redis中的数据
updateRedisData
=
false
authUrl
=
http://125.77.26.133:7001/auth/token
userInfoUrl
=
http://125.77.26.133:7001/api/info/user_info
redirect_uri
=
http://192.168.31.17:8080/
redis.url
=
39.104.
21.218
redis.url
=
39.104.
174.12
redis.password
=
archser_redis
# --- 消息中心websocket配置 ---
...
...
@@ -26,4 +29,4 @@ messageWsTimeout=30000
## 是否开启消息中心的websocket
openMessageWebSocket
=
true
MyIpAddress
=
127.0.0.1,39.104.28.145,39.104.21.218
\ No newline at end of file
MyIpAddress
=
127.0.0.1,39.104.28.145,39.104.174.12
\ 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