Ejemplo n.º 1
0
 public String resend() {
   String id = getRequest().getParameter("id");
   NoteSend noteSend = noteSendManager.getById(this.id);
   String[] sendids = noteSend.getSendid().split(",");
   String[] sendnames = noteSend.getRecipient().split(",");
   // 发件人存档
   noteSend.setCid(0);
   noteSend.setCdate(new Date());
   noteSend.setSendid(sendid);
   noteSend.setNotestatus("nosee");
   noteSend.setUuid(UUID.randomUUID().toString());
   noteSendManager.save(noteSend);
   noteSend.setUrl("/pages/NoteSend/showNoteReceiveView.do?id=" + noteSend.getId());
   // 收件人存档
   for (int i = 0; i < sendids.length; i++) {
     NoteReceive noteReceive = new NoteReceive();
     noteReceive.setCid(0);
     noteReceive.setCdate(new Date());
     noteReceive.setRecipient(sendnames[i]);
     noteReceive.setSendid(sendids[i]);
     noteReceive.setNotestatus("nosee");
     noteReceive.setUuid(UUID.randomUUID().toString());
     noteReceive.setMessage(noteSend.getMessage());
     noteReceive.setMsgTxt(noteSend.getMessage());
     noteReceiveManager.save(noteReceive);
     noteReceive.setUrl(
         "/pages/NoteSend/showNoteReceiveView.do?id="
             + noteReceive.getId()
             + "&uuid="
             + noteReceive.getUuid());
     noteReceiveManager.saveOrUpdate(noteReceive);
   }
   showMessage2("发送短信成功!", "/pages/NoteSend/list.do");
   return LIST_ACTION;
 }
Ejemplo n.º 2
0
 /** 回复短信 */
 public String reply() {
   User user = userManager.getById(Integer.parseInt(noteSend.getSendid()));
   getRequest().setAttribute("user", user);
   return NOTE_NEW_JSP;
 }