Package com.vsked.dao

Examples of com.vsked.dao.MessageToSentDAO


public class OracleSendMsgThread implements Runnable{

  public void run() {   
    try{
      while(true){
        List<MessageToSent> messageToSentList=new MessageToSentDAO().getMessageToSentListByZT("0");
        if(messageToSentList!=null){
          for(int i=0;i<messageToSentList.size();i++){
            MessageToSent mts=messageToSentList.get(i);
            Connection conn=ConnectDB.getSqlServerConnection();
            Statement st=conn.createStatement();
            String sendTime="";
            SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            sendTime=sdf.format(new Date()).toString();
            st=new TblSmsSendDAO().add(st,new TblSmsSend(mts.getSjhm().trim(),sendTime,mts.getDfnr(),0));
            if(st.executeBatch().length>0)
            {
              new MessageToSentDAO().updateMessageToSentZT(mts.getMsgId());
            }
            st.close();
            conn.close();           
          }
        }//end if
View Full Code Here

TOP

Related Classes of com.vsked.dao.MessageToSentDAO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.