| | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | } else if (active.equals("sltd")) { |
| | | //省立同德的短信发送方式 |
| | | String data = MessageSend.sendMsg(sendMagParam.getContent(), "6", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
| | | if (StringUtils.isNotEmpty(data) && data.contains("result=0")) { |
| | | if (StringUtils.isNotEmpty(data)) { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | JsonNode root = mapper.readTree(data); |
| | | String status = root.get("result").get(0).get("status").asText(); |
| | | if (status.equals("00000")) { |
| | | s = "true"; |
| | | } else { |
| | | setFailPreachForm(serviceSubtask, sendPreachform, "短信发送失败: " + data, "5"); |
| | | throw new BaseException("短信发送失败"); |
| | | } |
| | | } else { |
| | | setFailPreachForm(serviceSubtask, sendPreachform, "短信发送失败: " + data, "5"); |
| | | throw new BaseException("短信发送失败"); |
| | | } |
| | | } else if (active.equals("hzszlyy")) { |
| | | //市一 |
| | | long timestamp = new Date().getTime(); |