fix(TASK-031): 修复 Java 8 兼容性问题
- 将 Map.of() 替换为 HashMap - 添加 HashMap import
This commit is contained in:
parent
067c70f116
commit
84edbccb1b
|
|
@ -15,6 +15,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
|
|||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -129,15 +130,14 @@ public class MessageRouterServiceImpl implements MessageRouterService {
|
|||
log.info("[AC-MCA-10] 分发到人工客服: sessionId={}, manualCsId={}",
|
||||
session.getSessionId(), session.getManualCsId());
|
||||
|
||||
Map<String, Object> wsMessage = Map.of(
|
||||
"type", "customer_message",
|
||||
"sessionId", session.getSessionId(),
|
||||
"content", message.getContent(),
|
||||
"msgType", message.getMsgType(),
|
||||
"customerId", message.getCustomerId(),
|
||||
"channelType", message.getChannelType(),
|
||||
"timestamp", System.currentTimeMillis()
|
||||
);
|
||||
Map<String, Object> wsMessage = new HashMap<>();
|
||||
wsMessage.put("type", "customer_message");
|
||||
wsMessage.put("sessionId", session.getSessionId());
|
||||
wsMessage.put("content", message.getContent());
|
||||
wsMessage.put("msgType", message.getMsgType());
|
||||
wsMessage.put("customerId", message.getCustomerId());
|
||||
wsMessage.put("channelType", message.getChannelType());
|
||||
wsMessage.put("timestamp", System.currentTimeMillis());
|
||||
|
||||
webSocketService.notifyNewMessage(session.getSessionId(),
|
||||
createWxCallbackMessage(message));
|
||||
|
|
|
|||
Loading…
Reference in New Issue