1
This commit is contained in:
@@ -140,16 +140,23 @@ public class WXUtil {
|
||||
*/
|
||||
public static String getTouserByUnionId(String unionId) {
|
||||
if (unionId == null || unionId.trim().isEmpty()) {
|
||||
logger.debug("getTouserByUnionId: unionId为空");
|
||||
return null;
|
||||
}
|
||||
logger.debug("getTouserByUnionId: 查找unionId={}, super_admins数量={}", unionId, super_admins.size());
|
||||
for (SuperAdmin admin : super_admins.values()) {
|
||||
if (unionId.equals(admin.getUnionId())) {
|
||||
String touser = admin.getTouser();
|
||||
logger.debug("getTouserByUnionId: 找到匹配的SuperAdmin, unionId={}, name={}, touser={}",
|
||||
admin.getUnionId(), admin.getName(), touser);
|
||||
if (touser != null && !touser.trim().isEmpty()) {
|
||||
return touser.trim();
|
||||
} else {
|
||||
logger.debug("getTouserByUnionId: SuperAdmin的touser字段为空或未配置");
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.debug("getTouserByUnionId: 未找到匹配的SuperAdmin, unionId={}", unionId);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user