| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ruoyi.common.utils.HttpUtil; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sign.Md5Utils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | public class smsUtils { |
| | | |
| | | |
| | |
| | | "\"timestamp\": " + timestamp + "," + |
| | | "\"sign\": \"" + sign + "\"" + |
| | | "}"; |
| | | return HttpUtil.postJsonRequest(url, jsonMsg); |
| | | String sendMsg=HttpUtil.postJsonRequest(url, jsonMsg); |
| | | return sendMsg; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 杭州市一医院吴山院区我短信接口 |
| | | * |
| | | * @param url 微信URL |
| | | * @param phone 手机号 13500000001 |
| | | * @param idCard 身份证 |
| | | * @return 两个参数的和 |
| | | */ |
| | | public static String sendChat(String url,String phone,String idCard){ |
| | | String urlTemp = "http://192.200.54.14:5003/sfjk/SendMessage?sfzh=" |
| | | + idCard |
| | | + "&title=您好,邀请您填写出院调查表,请点击填写。&content=待随访&phone=" + phone |
| | | + "&url=" + url + "&key=ff76f8904f5f32b5ee1739e8ea46e60g"; |
| | | String sendMsg = ""; |
| | | try { |
| | | sendMsg = HttpUtils.sendPost(urlTemp); |
| | | log.info(sendMsg); |
| | | } catch (Exception ex) { |
| | | sendMsg=ex.getMessage(); |
| | | log.error(ex.getMessage()); |
| | | } |
| | | return sendMsg; |
| | | } |
| | | } |