diff --git a/.idea/material_theme_project_new.xml b/.idea/material_theme_project_new.xml
index 69f3723..601c128 100644
--- a/.idea/material_theme_project_new.xml
+++ b/.idea/material_theme_project_new.xml
@@ -3,7 +3,9 @@
diff --git a/gradle.properties b/gradle.properties
index 78f8da7..7330c5f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,5 +3,5 @@ org.gradle.downloadSources=false
org.gradle.parallel=true
org.gradle.degree_of_parallelism=16
project_group=top.r3944realms.ltdmanager
-project_version=1.19-SNAPSHOT
+project_version=1.20-SNAPSHOT
dg_lab_version=4.4.14.19
diff --git a/src/main/kotlin/top/r3944realms/ltdmanager/module/InvitationCodesModule.kt b/src/main/kotlin/top/r3944realms/ltdmanager/module/InvitationCodesModule.kt
index 4948cee..b5b6d3b 100644
--- a/src/main/kotlin/top/r3944realms/ltdmanager/module/InvitationCodesModule.kt
+++ b/src/main/kotlin/top/r3944realms/ltdmanager/module/InvitationCodesModule.kt
@@ -208,7 +208,7 @@ class InvitationCodesModule(
val placeholders = java.lang.String.join(",", Collections.nCopies(qqIds.size, "?"))
// 修正SQL语句的表名引用
val sql = """
- SELECT q.player_id, q.effective, q.is_used, q.qq
+ SELECT q.player_id, q.effective, q.is_used, q.qq, q.status
FROM ltd_manager_bot.qualified_user_info q
WHERE q.qq IN ($placeholders)
""".trimIndent()
@@ -223,20 +223,33 @@ class InvitationCodesModule(
pstmt.executeQuery().use { rs ->
// 创建结果映射表
val resultMap = mutableMapOf>()
-
+ var invalidMap = mutableMapOf()
while (rs.next()) {
+ val state = rs.getInt("status")
val qq = rs.getLong("qq")
- val playerId = rs.getLong("player_id")
- // 处理可能的null值
- val playerIdValue = if (rs.wasNull()) null else playerId
- val effective = rs.getBoolean("effective")
- val isUsed = rs.getBoolean("is_used")
-
- resultMap[qq] = Triple(playerIdValue, effective, isUsed)
+ invalidMap[qq] = when (state) {
+ 1 -> {
+ val playerId = rs.getLong("player_id")
+ // 处理可能的null值
+ val playerIdValue = if (rs.wasNull()) null else playerId
+ val effective = rs.getBoolean("effective")
+ val isUsed = rs.getBoolean("is_used")
+ resultMap[qq] = Triple(playerIdValue, effective, isUsed)
+ null
+ }
+ 2 -> "白名单在审核中,请耐心等待"
+ 3 -> "白名单不通过,无权获得邀请码"
+ else -> "无效状态,请联系管理员,错误状态码: $state"
+ }
}
// 分类处理每个消息
for (msg in msgs) {
+ var invalidMsg = invalidMap[msg.userId]
+ if (invalidMsg != null) { //无效时这里有值
+ sendFailedMessage(napCatClient, msg.userId, msg.realId, msg.time, invalidMsg)
+ return
+ }
val result = resultMap[msg.userId]
when {