From f10bce85b3da7777473c3a5f092a6c1e31e89309 Mon Sep 17 00:00:00 2001
From: BAOLH <baolh@yhzhg.cn>
Date: Mon, 12 Jan 2026 03:39:08 +0000
Subject: [PATCH] 微信考勤白名单字典Key常量化
---
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java | 3 +++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/WeComServiceImpl.java | 6 +++---
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java
index a660502..d62a126 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceServiceImpl.java
@@ -93,7 +93,7 @@
public Map<String,Object> queryAllNotNormal(AttendanceQueryCriteria criteria, Pageable pageable) {
if (criteria.getUserId() == null) {
- List<String> wecomExcludeList = dictDetailRepository.findByDictName("wecom_exclude_list").stream().map(DictDetail::getValue).collect(Collectors.toList());
+ List<String> wecomExcludeList = dictDetailRepository.findByDictName(Constant.DICT_WECOM_EXCLUDE_LIST).stream().map(DictDetail::getValue).collect(Collectors.toList());
criteria.setUserIds(userRepository.findAllByEnabled(true).stream().filter(user ->!wecomExcludeList.contains(user.getWeComId())).map(User::getId).collect(Collectors.toList()));
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
index 593cc99..b66748a 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
@@ -450,4 +450,7 @@
public static final String REMIND_REPORT_MSG = "remind_report_msg";
// 企微机器人参数:提醒周报生成成功消息内容
public static final String REMIND_REPORT_SUCCESS_MSG = "remind_report_success_msg";
+
+ // 字典:企业微信考勤白名单
+ public static final String DICT_WECOM_EXCLUDE_LIST = "wecom_exclude_list";
}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/WeComServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/WeComServiceImpl.java
index 89e0e1c..c4c7147 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/WeComServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/WeComServiceImpl.java
@@ -118,7 +118,7 @@
// 用户列表
List<User> userList = new ArrayList<>();
// 获取企业微信考勤白名单
- List<String> excludeList = dictDetailService.getDictByName("wecom_exclude_list").stream().map(i -> i.getValue()).collect(Collectors.toList());
+ List<String> excludeList = dictDetailService.getDictByName(Constant.DICT_WECOM_EXCLUDE_LIST).stream().map(i -> i.getValue()).collect(Collectors.toList());
// 参数用户不为空(考勤按钮调用)
if (ObjectUtils.isNotEmpty(attUser)) {
// 用户列表
@@ -220,7 +220,7 @@
// 用户列表
List<User> userList;
// 获取企业微信考勤白名单
- List<String> excludeList = dictDetailService.getDictByName("wecom_exclude_list").stream().map(i -> i.getValue()).collect(Collectors.toList());
+ List<String> excludeList = dictDetailService.getDictByName(Constant.DICT_WECOM_EXCLUDE_LIST).stream().map(i -> i.getValue()).collect(Collectors.toList());
// 参数用户不为空(考勤按钮调用)
if (ObjectUtils.isNotEmpty(attUser)) {
// 用户列表
@@ -368,7 +368,7 @@
// 用户列表
List<User> userList;
// 获取企业微信考勤白名单
- List<String> excludeList = dictDetailService.getDictByName("wecom_exclude_list").stream().map(i -> i.getValue()).collect(Collectors.toList());
+ List<String> excludeList = dictDetailService.getDictByName(Constant.DICT_WECOM_EXCLUDE_LIST).stream().map(i -> i.getValue()).collect(Collectors.toList());
// 参数用户不为空(考勤按钮调用)
if (ObjectUtils.isNotEmpty(attUser)) {
// 用户列表
--
Gitblit v1.9.3