5.5.3 留言短信发送与全球呼短信的关系 paper51.com “全时通”系统获得的主叫号码与被叫号码都是通过全球呼平台的下发短信(全球呼短信tdownmsg)而得到的,所以给主叫号码发送留言短信时号码的获得是以全球呼短信为前提的,实现方法如下: copyright paper51.com
public void DealBackMsgLogic(){ copyright paper51.com TDownMsgtdownmsg = (TDownMsg)memmgr.readTDownMsg(); paper51.com Stringsrcmobile = tdownmsg.srcmobile; //获取主叫号码 paper51.com Stringdestmobile = tdownmsg.destmobile; paper51.com longtime = tdownmsg.time; paper51.com PsUserpsuser = (PsUser)Memory.mem_psuser.GetKey(destmobile); 内容来自论文无忧网 www.paper51.com if(psuser!= null){ paper51.com if(Memory.mem_psuser.HasKey(destmobile)&& copyright paper51.com
!Memory.mem_black.HasKey(srcmobile)&& 内容来自www.paper51.com !Memory.mem_red.HasKey(destmobile) 内容来自www.paper51.com ){ http://www.paper51.com if(psuser.duration== 0){ 内容来自www.paper51.com if(psuser.msg!= null && !psuser.msg.trim().equals("") &&!psuser.msg.equals("null")) copyright paper51.com
SMS.sendSMS(srcmobile,"温馨提醒:" +destmobile + "机主留言:" + psuser.msg); http://www.paper51.com }else{ copyright paper51.com
if(!Util.isDateBefore(psuser.sendtime,newSimpleDateFormat("yyyy-MM-dd HH:mm:ss").format( 内容来自www.paper51.com
newDate(tdownmsg.time - psuser.duration * 60 *60 * 1000)))){ http://www.paper51.com if(psuser.msg!=null&& !psuser.msg.equals("") &&!psuser.msg.equals("null")) http://www.paper51.com
SMS.sendSMS(srcmobile,"温馨提醒:" +destmobile + "机主留言:" + psuser.msg); http://www.paper51.com
} copyright paper51.com
psuser= null; paper51.com } 内容来自论文无忧网 www.paper51.com } http://www.paper51.com
} paper51.com
tdownmsg= null; 内容来自论文无忧网 www.paper51.com
srcmobile= null; 内容来自论文无忧网 www.paper51.com destmobile= null; 内容来自论文无忧网 www.paper51.com } 内容来自论文无忧网 www.paper51.com 5.6 短信退定 内容来自www.paper51.com 用户通过短信的方式定制了机主留言短信功能,同样如果用户不需要该功能了,也通过短信的方式退定该功能,退定短信内容为:MQ(大写与小写字母作用都是一样,程序判断是自动把小写字母转换成大写字母),同样是发送到“全时通”业务的相关代码(01258)。系统实现程序如下: http://www.paper51.com String mobile = typevalue.substring(0,11); paper51.com
Stringcommand = typevalue.substring(11, typevalue.length()) 内容来自论文无忧网 www.paper51.com .toUpperCase(); copyright paper51.com log.info(mobile+ ":" + command); 内容来自www.paper51.com if(command.equals("MQ")) { http://www.paper51.com PsUserpsuser = (PsUser)Memory.mem_psuser.GetKey(mobile); http://www.paper51.com if(psuser!= null){ paper51.com log.info(mobile+ ":取消被叫提醒业务"); copyright paper51.com Memory.mem_psuser.RemoveElement(mobile); http://www.paper51.com memmgr.AddUpdateList("deletefrom lh_ps_userinfo where psmobile = '"+ mobile +"'"); http://www.paper51.com Stringmessage = Memory.glodata.userexitmsg; 内容来自论文无忧网 www.paper51.com
SMS.sendSMS(mobile,message); copyright paper51.com
psuser= null; 内容来自论文无忧网 www.paper51.com message= null; http://www.paper51.com } 内容来自www.paper51.com }else if…… paper51.com |