|  |  |  | 
|---|
|  |  |  | import cn.hutool.core.util.XmlUtil; | 
|---|
|  |  |  | import cn.hutool.http.HttpUtil; | 
|---|
|  |  |  | import com.xcong.excoin.common.exception.GlobalException; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.HashMap; | 
|---|
|  |  |  | 
|---|
|  |  |  | * @author wzy | 
|---|
|  |  |  | * @date 2020-07-14 | 
|---|
|  |  |  | **/ | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | public class Sms106Send { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static final String URL = "http://www.qf106.com/sms.aspx"; | 
|---|
|  |  |  | private static final String ID = "16580"; | 
|---|
|  |  |  | private static final String ACCOUNT = "Biue"; | 
|---|
|  |  |  | private static final String ID = "16615"; | 
|---|
|  |  |  | private static final String ACCOUNT = "hibit"; | 
|---|
|  |  |  | private static final String PASSWORD = "123456"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static boolean sendRechargeMsg(String phone, String time, String orderNo) { | 
|---|
|  |  |  | String msg = "尊敬的用户,您的帐号于{}有一笔成功充值订单,如有疑问请联系客服,订单编号为{}"; | 
|---|
|  |  |  | String msg = "尊敬的用户,您的帐号于{}有一笔成功充值订单,订单编号为{}"; | 
|---|
|  |  |  | String content = StrUtil.format(msg, time, orderNo); | 
|---|
|  |  |  | log.info("短信发送:{}", content); | 
|---|
|  |  |  | return request(phone, content, "充值"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | param.put("telephonenumber", 0); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String response = HttpUtil.post(URL, param); | 
|---|
|  |  |  | log.info("短信发送:{}, {}", tagName, response); | 
|---|
|  |  |  | if ("Success".equals(XmlUtil.xmlToMap(response).get("returnstatus"))) { | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } else { | 
|---|