java发送手机信息代码 java发送手机信息代码是什么( 五 )


}else if(BaseConstant.yewu.equals(smsSend.getVisit_deal_business_type())){
msg.append(smsSend.getVisit_name_cn())
.append(",您好!您于")
.append(smsSend.getVisit_deal_time().substring(4, 6)).append("月")
.append(smsSend.getVisit_deal_time().substring(6, 8)).append("日")
.append("办理").append(smsSend.getVisit_deal_business()).append("业务,")
.append("现进行满意度回访 , 请回复数字:1为满意;2为基本满意;3为不满意 。感谢您对消防工作的支持!");
}
return msg.toString();
}
public BaseService getBaseService() {
return baseService;
}
public void setBaseService(BaseService baseService) {
this.baseService = baseService;
}
public BaseService getBaseServiceMas() {
return baseServiceMas;
}
public void setBaseServiceMas(BaseService baseServiceMas) {
this.baseServiceMas = baseServiceMas;
}
public static void main(String[] args){
List smsMasList = new ArrayList();
try {
String msg = "***,您好!*********于2015年5月2日对你单位进行监督检查,现进行满意度回访,请回复数字:1为满意;2为基本满意;3为不满意 。感谢您对消防工作的支持!";
SmsOutBox smsOutBox = new SmsOutBox();
smsOutBox.setSismsid("12344");
smsOutBox.setReqdeliveryreport(BaseConstant.NoReport);
smsOutBox.setApplicationid(BaseConstant.APPLICATIONID);
smsOutBox.setDestaddr("111");
smsOutBox.setMsgfmt(BaseConstant.MSGFMT);
smsOutBox.setRequesttime(new Date());
smsOutBox.setExtcode("2222");
smsOutBox.setSendmethod(BaseConstant.NoMsg);// 正常短信
boolean con = true;
String lastMsg = msg;
while(con){
lastMsg = msg.substring(0,msg.length()55 ? 55 : msg.length());
msg = msg.substring(msg.length()55 ? 55 : msg.length(),msg.length());
if (msg.equals("")) {
con = false;
}
SmsOutBox smOutBox_temp = new SmsOutBox();
smOutBox_temp = smsOutBox;
smOutBox_temp.setMessagecontent(lastMsg);
smsMasList.add(smOutBox_temp);
}
for(Object o:smsMasList){
SmsOutBox smsOutBox2 = (SmsOutBox)o;
System.out.println(smsOutBox2.getMessagecontent());
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static String getTrace(Throwable t) {
StringWriter stringWriter= new StringWriter();
PrintWriter writer= new PrintWriter(stringWriter);
t.printStackTrace(writer);
StringBuffer buffer= stringWriter.getBuffer();
return buffer.toString();
}
}
短信不是你想发想发就能发,是收费的,我们公司是租用的移动MAS平台的短信发送接收平台,上面那是和一个和mas同步的一个小程序,租用别人的mas平台是收费的,平台有很多自己选择,有发送接口可以调,发送内容自己提供
java发送手机信息代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于java发送手机信息代码是什么、java发送手机信息代码的信息别忘了在本站进行查找喔 。

推荐阅读