コード例 #1
0
 public void prepare() throws Exception {
   if (isNullOrEmptyString(id)) {
     noteSend = new NoteSend();
   } else {
     noteSend = (NoteSend) noteSendManager.getById(id);
   }
 }
コード例 #2
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;
 }
コード例 #3
0
 /** 进入更新页面 */
 public String edit() {
   getRelative();
   String id = getRequest().getParameter("id");
   if (id != null) {
     NoteSend noteSend = noteSendManager.getById(Integer.parseInt(id));
     getRequest().setAttribute("noteSend", noteSend);
   }
   return EDIT_JSP;
 }