@Transactional(readOnly = false) public void save(OaNotify oaNotify) { super.save(oaNotify); // 更新发送接受人记录 oaNotifyRecordDao.deleteByOaNotifyId(oaNotify.getId()); if (oaNotify.getOaNotifyRecordList().size() > 0) { oaNotifyRecordDao.insertAll(oaNotify.getOaNotifyRecordList()); } }
/** 更新阅读状态 */ @Transactional(readOnly = false) public void updateReadFlag(OaNotify oaNotify) { OaNotifyRecord oaNotifyRecord = new OaNotifyRecord(oaNotify); oaNotifyRecord.setUser(oaNotifyRecord.getCurrentUser()); oaNotifyRecord.setReadDate(new Date()); oaNotifyRecord.setReadFlag("1"); oaNotifyRecordDao.update(oaNotifyRecord); }
/** * 获取通知发送记录 * * @param oaNotify * @return */ public OaNotify getRecordList(OaNotify oaNotify) { oaNotify.setOaNotifyRecordList(oaNotifyRecordDao.findList(new OaNotifyRecord(oaNotify))); return oaNotify; }