| | |
| | | package com.xiaopeng.pushMessage.webSocket.controller; |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.DeserializationFeature; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
| | | import com.xiaopeng.api.dto.pushMessage.SendMessageDTO; |
| | | import com.xiaopeng.api.vo.TaskVO; |
| | | import com.xiaopeng.common.core.domain.R; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | |
| | | @Autowired |
| | | private WebSocketUserService webSocketUserService; |
| | | |
| | | private ObjectMapper om; |
| | | |
| | | @PostConstruct |
| | | void setupObjectMapper() { |
| | | // 允许对象忽略json中不存在的属性 |
| | | om = new ObjectMapper(); |
| | | om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
| | | om.registerModule(new JavaTimeModule()); |
| | | } |
| | | @Autowired ObjectMapper om; |
| | | |
| | | // ==================== 基于XpAppUser的WebSocket接口 ==================== |
| | | |
| | |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | } |