|
|
@@ -79,6 +79,11 @@ public class QwSopLogsServiceImpl extends ServiceImpl<QwSopLogsMapper, QwSopLogs
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(QwSopLogsServiceImpl.class);
|
|
|
public static final String FS_USER_BLACKLIST_REMARK = "该客户已经被管理员拉黑";
|
|
|
+
|
|
|
+ /** 发群/群公告:目标为群聊,不按单个客户拉黑拦截 */
|
|
|
+ private static boolean shouldSkipBlacklistCheck(Integer sendType) {
|
|
|
+ return sendType != null && (sendType == 6 || sendType == 21);
|
|
|
+ }
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
|
@Autowired
|
|
|
@@ -1081,7 +1086,8 @@ public class QwSopLogsServiceImpl extends ServiceImpl<QwSopLogsMapper, QwSopLogs
|
|
|
for (QwSopLogsDoSendListTVO log : result) {
|
|
|
|
|
|
try {
|
|
|
- if (log.getFsUserId() != null && isFsUserBlacklisted(log.getFsUserId())) {
|
|
|
+ if (!shouldSkipBlacklistCheck(log.getSendType())
|
|
|
+ && log.getFsUserId() != null && isFsUserBlacklisted(log.getFsUserId())) {
|
|
|
qwSopLogsService.updateQwSopLogsByWatchLogType(log.getId(), FS_USER_BLACKLIST_REMARK);
|
|
|
continue;
|
|
|
}
|
|
|
@@ -1611,7 +1617,7 @@ public class QwSopLogsServiceImpl extends ServiceImpl<QwSopLogsMapper, QwSopLogs
|
|
|
|
|
|
@Override
|
|
|
public void applyBlacklistCheck(QwSopLogs sopLogs) {
|
|
|
- if (sopLogs == null || sopLogs.getFsUserId() == null) {
|
|
|
+ if (sopLogs == null || sopLogs.getFsUserId() == null || shouldSkipBlacklistCheck(sopLogs.getSendType())) {
|
|
|
return;
|
|
|
}
|
|
|
if (isFsUserBlacklisted(sopLogs.getFsUserId())) {
|
|
|
@@ -1636,7 +1642,8 @@ public class QwSopLogsServiceImpl extends ServiceImpl<QwSopLogsMapper, QwSopLogs
|
|
|
return;
|
|
|
}
|
|
|
for (QwSopLogs sopLog : sopLogs) {
|
|
|
- if (sopLog.getFsUserId() != null && blacklistedUserIds.contains(sopLog.getFsUserId())) {
|
|
|
+ if (!shouldSkipBlacklistCheck(sopLog.getSendType())
|
|
|
+ && sopLog.getFsUserId() != null && blacklistedUserIds.contains(sopLog.getFsUserId())) {
|
|
|
markSopLogAsBlacklisted(sopLog);
|
|
|
}
|
|
|
}
|