Search in sources :

Example 1 with Notice

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;
}
Also used : Notice(com.ikoori.vip.common.persistence.model.Notice) BussinessException(com.ikoori.vip.common.exception.BussinessException) BussinessLog(com.ikoori.vip.common.annotion.log.BussinessLog) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 2 with Notice

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";
}
Also used : Notice(com.ikoori.vip.common.persistence.model.Notice) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

Notice (com.ikoori.vip.common.persistence.model.Notice)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 BussinessLog (com.ikoori.vip.common.annotion.log.BussinessLog)1 BussinessException (com.ikoori.vip.common.exception.BussinessException)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1