| | |
| | | @Data |
| | | public class SendMessageUtils { |
| | | |
| | | public static void sendMsg(String phone, String message, WinnerLookProperties properties) { |
| | | public static void sendMsg(String url, String phone, String message, WinnerLookProperties properties) { |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("userCode", properties.getUserCode()); |
| | | params.put("userPass", properties.getUserPass()); |
| | | params.put("DesNo", phone); |
| | | params.put("Msg", message + "【立研】"); |
| | | params.put("smsType", "101"); |
| | | String str = HttpRequest.exchangeMsg(HttpMethod.POST, properties.getUrlSendMsg(), convert(params)); |
| | | String str = HttpRequest.exchangeMsg(HttpMethod.POST, url, convert(params)); |
| | | if (ObjectUtils.isEmpty(extractWithRegex(str))) { |
| | | log.error("短信调用异常 {}", str); |
| | | throw new BadRequestException("短信调用异常"); |