From c87aad7ead38e508e9fd683a5c6f44e85fd3dea5 Mon Sep 17 00:00:00 2001 From: zhangrui Date: Tue, 7 Jul 2026 09:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=97=E5=A4=A7=E4=B8=89=E5=8D=81=E5=B9=B4?= =?UTF-8?q?=E6=95=99=E8=81=8C=E5=B7=A5=E7=96=97=E4=BC=91=E5=85=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SysDataUserPullServiceImpl.java | 2 +- .../views/platform/sys/data/user/pull.html | 40 ++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/budwk/app/sys/services/impl/SysDataUserPullServiceImpl.java b/src/main/java/com/budwk/app/sys/services/impl/SysDataUserPullServiceImpl.java index 2d4365f2..74d48e43 100644 --- a/src/main/java/com/budwk/app/sys/services/impl/SysDataUserPullServiceImpl.java +++ b/src/main/java/com/budwk/app/sys/services/impl/SysDataUserPullServiceImpl.java @@ -49,7 +49,7 @@ import java.util.stream.Collectors; public class SysDataUserPullServiceImpl extends BaseServiceImpl implements SysDataUserPullService { private static final String TEACHER_MOBILE_CONFIG_KEY = "teacherMobile"; - private static final int TEACHER_MOBILE_PAGE_SIZE = 1000; + private static final int TEACHER_MOBILE_PAGE_SIZE = 10; private static final int TEACHER_MOBILE_DB_BATCH_SIZE = 500; @Inject diff --git a/src/main/resources/views/platform/sys/data/user/pull.html b/src/main/resources/views/platform/sys/data/user/pull.html index bf9f69f8..34036c1b 100644 --- a/src/main/resources/views/platform/sys/data/user/pull.html +++ b/src/main/resources/views/platform/sys/data/user/pull.html @@ -63,6 +63,7 @@ layout("/layouts/platform.html"){ 拉取信息中心数据 + 同步教职工手机号 删除本地数据源 @@ -120,7 +121,8 @@ layout("/layouts/platform.html"){ pullTimeOptions: false, sourceTime: [], pullTimeDialogVisible: false, - pullLoading: false + pullLoading: false, + syncTeacherMobileLoading: false } }, methods: { @@ -148,6 +150,42 @@ layout("/layouts/platform.html"){ .catch(() => {}) }, + syncTeacherMobile() { + this.$confirm("确定要同步教职工手机号吗?", "提示", { + type: "warning", + confirmButtonText: "确定", + cancelButtonText: "取消" + }) + .then(() => { + this.syncTeacherMobileLoading = true + this.$axios + .post("/platform/sys/data/user/pull/syncTeacherMobile") + .then((resp) => { + if (resp.code === 0) { + const data = resp.data || {} + this.$alert( + "接口总数:" + (data.total || 0) + + "
总页数:" + (data.pages || 0) + + "
拉取数量:" + (data.pulledCount || 0) + + "
有效手机号数量:" + (data.validMobileCount || 0) + + "
匹配用户数量:" + (data.matchedUserCount || 0) + + "
更新用户数量:" + (data.updatedUserCount || 0), + "同步完成", + { + dangerouslyUseHTMLString: true, + confirmButtonText: "确定" + } + ) + this.pageData() + } + }) + .finally(() => { + this.syncTeacherMobileLoading = false + }) + }) + .catch(() => {}) + }, + getSearchOptions() { this.$axios.post("/platform/sys/data/user/pull/searchOptions").then((resp) => { if (resp.code === 0) {