| | |
| | | package com.smartor.message; |
| | | |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.message.sms.provider.ls.LishuiMessageConfig; |
| | |
| | | */ |
| | | private static final String CONFIG_KEY = "ls.msg.info"; |
| | | |
| | | private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); |
| | | |
| | | private static final TypeReference<Map<String, String>> MSG_INFO_TYPE = |
| | | new TypeReference<Map<String, String>>() { |
| | | }; |
| | | |
| | | private final ISysConfigService configService; |
| | | |
| | | public LishuiMessageConfigProviderImpl(ISysConfigService configService) { |
| | |
| | | Map<String, String> msgInfo = new HashMap<>(); |
| | | if (StringUtils.isNotEmpty(configValue)) { |
| | | try { |
| | | msgInfo = new ObjectMapper().readValue(configValue, Map.class); |
| | | msgInfo = OBJECT_MAPPER.readValue(configValue, MSG_INFO_TYPE); |
| | | } catch (Exception e) { |
| | | log.error("【LishuiMessageConfigProviderImpl】解析 {} 失败,orgid:{},value:{},err:{}", |
| | | CONFIG_KEY, orgid, configValue, e.getMessage(), e); |