use of com.ikoori.vip.common.persistence.model.Notice in project vip by guangdada.
the class NoticeController method update.
/**
* 修改通知
*/
@RequestMapping(value = "/update")
@ResponseBody
@BussinessLog(value = "修改通知", key = "title", dict = Dict.NoticeMap)
public Object update(Notice notice) {
if (ToolUtil.isOneEmpty(notice, notice.getId(), notice.getTitle(), notice.getContent())) {
throw new BussinessException(BizExceptionEnum.REQUEST_NULL);
}
Notice old = this.noticeMapper.selectById(notice.getId());
old.setTitle(notice.getTitle());
old.setContent(notice.getContent());
old.updateById();
return super.SUCCESS_TIP;
}
use of com.ikoori.vip.common.persistence.model.Notice in project vip by guangdada.
the class NoticeController method noticeUpdate.
/**
* 跳转到修改通知
*/
@RequestMapping("/notice_update/{noticeId}")
public String noticeUpdate(@PathVariable Integer noticeId, Model model) {
Notice notice = this.noticeMapper.selectById(noticeId);
model.addAttribute("notice", notice);
LogObjectHolder.me().set(notice);
return PREFIX + "notice_edit.html";
}
Aggregations