Browse Source

业务数据同步

dev
zhuibobo 1 month ago
parent
commit
4a5bf3d551
  1. 12
      ng/3/nginx.conf
  2. 8
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/businessdatasyn/executor/TableSyncExecutor.java
  3. 4
      zdxt-web-server/zdxt-admin-web-server/src/main/resources/businessdatasyn/enforcement_registration.json

12
ng/3/nginx.conf

@ -108,12 +108,12 @@ http {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /efcode20-sup-web/ {
proxy_pass http://10.76.108.15:12004/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# location /efcode20-sup-web/ {
# proxy_pass http://10.76.108.15:12004/;
# proxy_set_header Host $http_host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# }
#location ~* /(uploads|images)/.*\.(php|php2|php3|php4|php5|phpm|phpml|phtml|phtm|phps|pht|asp|aspx|asa|cer|cdx|ashx|exe|sh|bash|jsp|jspx|jspa|html|web.config|cfm|cgi|war|ashx|htaccess|py|pl)$ {
#deny all; # 拦截.html和.htm文件,并返回403禁止访问
#return 403;

8
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/businessdatasyn/executor/TableSyncExecutor.java

@ -60,9 +60,13 @@ public class TableSyncExecutor {
syncTaskService.abortStaleRunningTasks(configKey, 30);
// 获取上一次成功任务的扫描窗口
// 窗口回退1秒:防止同步执行期间业务写入 update_time 恰好等于窗口终点的行被 > 条件漏掉
// 重复扫描无副作用(哈希比对一致则 SKIP,天然幂等)
BizSyncTask lastTask = forceFull ? null : syncTaskService.getLastSuccess(configKey);
LocalDateTime sinceV1 = (lastTask != null) ? lastTask.getLastScanV1() : null;
LocalDateTime sinceV2 = (lastTask != null) ? lastTask.getLastScanV2() : null;
LocalDateTime sinceV1 = (lastTask != null && lastTask.getLastScanV1() != null)
? lastTask.getLastScanV1().minusSeconds(1) : null;
LocalDateTime sinceV2 = (lastTask != null && lastTask.getLastScanV2() != null)
? lastTask.getLastScanV2().minusSeconds(1) : null;
// 开始新任务
String triggerType = forceFull ? "FORCE" : "QUARTZ";

4
zdxt-web-server/zdxt-admin-web-server/src/main/resources/businessdatasyn/enforcement_registration.json

@ -51,7 +51,7 @@
"has_union", "has_auto", "union_no",
"law_enforce_category", "entrust_dept_id", "entrust_dept_name",
"enterprise_address", "district", "street", "zone", "is_real_union",
"law_case_id", "has_evaluate", "create_dept", "update_by", "update_time"
"law_case_id", "has_evaluate", "create_dept", "update_by", "update_time","other_reasons"
]
},
@ -132,7 +132,7 @@
"typeConverters": {},
"v2OnlyColumnsIgnoredOnV1": ["law_case_id", "has_evaluate", "create_dept", "update_by"],
"v2OnlyColumnsIgnoredOnV1": ["law_case_id", "has_evaluate", "create_dept", "update_by","other_reasons"],
"v2OnlyColumnsDefaults": {
"law_case_id": null,

Loading…
Cancel
Save