Commit 1c27ff1212cbbda40ddfe4da6788804e3f3b7089
1 parent
2e42aeea9c
Exists in
master
1、麻亮工作交接
Showing 5 changed files with 8 additions and 3 deletions
- parent/center.manager/src/main/resources/xml/app-timer.xml
- parent/center.manager/src/test/java/center/manager/test/user/WorkTest.java
- parent/core.sdk/src/main/java/com/lyms/sync/SyncCenter.java
- parent/core.sdk/src/main/java/com/lyms/sync/SyncHandler.java
- parent/core.sdk/src/main/java/com/lyms/sync/queue/SyncQueue.java
parent/center.manager/src/main/resources/xml/app-timer.xml
View file @
1c27ff1
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | |
| 15 | 15 | <!-- 同步远程数据, 定时任务处理同步任务 --> |
| 16 | 16 | <task:scheduled-tasks> |
| 17 | - <task:scheduled ref="syncTmpJob" method="excute" cron="*/10 * * * * ?"/> | |
| 17 | + <!-- <task:scheduled ref="syncTmpJob" method="excute" cron="*/10 * * * * ?"/> --> | |
| 18 | 18 | <task:scheduled ref="syncFixJob" method="excute" cron="*/30 * * * * ?"/> |
| 19 | 19 | </task:scheduled-tasks> |
| 20 | 20 |
parent/center.manager/src/test/java/center/manager/test/user/WorkTest.java
View file @
1c27ff1
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | import org.junit.Test; |
| 5 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 6 | |
| 7 | +import com.lyms.sync.ParamsAdpter; | |
| 7 | 8 | import com.lyms.sync.SyncCallback; |
| 8 | 9 | import com.lyms.sync.SyncCenter; |
| 9 | 10 | import com.lyms.sync.channel.ChannelData; |
| ... | ... | @@ -32,7 +33,7 @@ |
| 32 | 33 | @Test |
| 33 | 34 | public void pushFix() { |
| 34 | 35 | String id = StrUtils.uuid(); |
| 35 | - String remote = "http://127.0.0.1:9090/hospital.web/remote/sycn"; | |
| 36 | + String remote = "http://127.0.0.1:8080/hospital.web/remote/sycn"; | |
| 36 | 37 | String remoteClazz = "com.lyms.hospital.service.sys.impl.SyncDataBasicServiceImpl"; |
| 37 | 38 | String remoteMethod = "selectOne"; |
| 38 | 39 | center.pushFix(id, remote, remoteClazz, remoteMethod, null); |
| ... | ... | @@ -55,6 +56,7 @@ |
| 55 | 56 | // 参数构建如下注释方式 |
| 56 | 57 | // ParamsAdpter adpter = |
| 57 | 58 | // ParamsAdpter.builder().push(null).push(null).push(null);; |
| 59 | + //ParamsAdpter adpter = ParamsAdpter.builder().push("ddd").push(User) | |
| 58 | 60 | center.pushFix(id, remote, remoteClazz, remoteMethod, null); |
| 59 | 61 | } |
| 60 | 62 |
parent/core.sdk/src/main/java/com/lyms/sync/SyncCenter.java
View file @
1c27ff1
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | * <li>修改时间: |
| 55 | 55 | */ |
| 56 | 56 | public boolean pushFix(String id, String remote, String remoteClazz, String remoteMethod, ParamsAdpter adpter) { |
| 57 | - ChannelData data = new ChannelData(id, remote, remoteClazz, remoteMethod, adpter.toJsonString(), true); | |
| 57 | + ChannelData data = new ChannelData(id, remote, remoteClazz, remoteMethod, adpter ==null ? null :adpter.toJsonString(), true); | |
| 58 | 58 | |
| 59 | 59 | int tag = 0; |
| 60 | 60 | |
| ... | ... | @@ -202,6 +202,7 @@ |
| 202 | 202 | * <li>修改时间: |
| 203 | 203 | */ |
| 204 | 204 | public void backPressure() { |
| 205 | + //TODO tag++ >>handl | |
| 205 | 206 | if (data == null) |
| 206 | 207 | return; |
| 207 | 208 | this.push(data, new SyncCallback() { |
parent/core.sdk/src/main/java/com/lyms/sync/SyncHandler.java
View file @
1c27ff1
parent/core.sdk/src/main/java/com/lyms/sync/queue/SyncQueue.java
View file @
1c27ff1