public void prepareModel() throws Exception {
    // 新增
    if (StringUtils.isEmpty(id)) {
      String[] receiverIdsa = receiverIds.split(",");
      if (receiverIdsa != null && receiverIdsa.length > 0) {
        SysUser receiver = null;
        for (String receiverId : receiverIdsa) {
          if (StringUtils.isNotEmpty(receiverId)) {
            receiver = userService.get(receiverId);
            intenalMessage = new OaIntenalMessage();
            intenalMessage.setIsRead("0"); // 0:未阅读,1:已阅读
            intenalMessage.setCreateTime(DateUtils.getCurrentDate());
            intenalMessage.setCreateUser(Sessions.getSysUser());
            intenalMessage.setSender(Sessions.getSysUser());
            intenalMessage.setSendTime(DateUtils.getCurrentDate());
            intenalMessage.setMsgTitle(msgTitle);
            intenalMessage.setMsgContent(msgContent);
            intenalMessage.setReceiver(receiver);

            iMsgList.add(intenalMessage);
          }
        }
      }
    } else { // 修改/查看
      intenalMessage = intenalMessageService.get(id);
      if ("2".equals(queryType) && "0".equals(intenalMessage.getIsRead())) {
        intenalMessage.setIsRead("1"); // 已阅读
        intenalMessage.setReadTime(DateUtils.getCurrentDate());
        intenalMessageService.update(intenalMessage);
      }

      // 获得附件
      setUploadFileList(getUploadFileService().findByOwnerId(intenalMessage.getId()));
    }
  }
  public void prepareRead() throws Exception {
    intenalMessage = intenalMessageService.get(id);

    // 获得附件
    setUploadFileList(getUploadFileService().findByOwnerId(intenalMessage.getId()));

    if ("0".equals(intenalMessage.getIsRead())) {
      intenalMessage.setIsRead("1"); // 已阅读
      intenalMessage.setReadTime(DateUtils.getCurrentDate());
      intenalMessageService.update(intenalMessage);
    }
  }