You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.0 KiB
47 lines
1.0 KiB
package com.liuyanzhao.ssm.blog.service.impl;
|
|
|
|
import com.liuyanzhao.ssm.blog.entity.Notice;
|
|
import com.liuyanzhao.ssm.blog.mapper.NoticeMapper;
|
|
import com.liuyanzhao.ssm.blog.service.NoticeService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @author liuyanzhao
|
|
*/
|
|
@Service
|
|
public class NoticeServiceImpl implements NoticeService {
|
|
|
|
@Autowired
|
|
private NoticeMapper noticeMapper;
|
|
|
|
@Override
|
|
public List<Notice> listNotice(Integer status) {
|
|
return noticeMapper.listNotice(status);
|
|
}
|
|
|
|
@Override
|
|
public void insertNotice(Notice notice) {
|
|
noticeMapper.insert(notice);
|
|
}
|
|
|
|
@Override
|
|
public void deleteNotice(Integer id) {
|
|
noticeMapper.deleteById(id);
|
|
}
|
|
|
|
@Override
|
|
public void updateNotice(Notice notice) {
|
|
noticeMapper.update(notice);
|
|
}
|
|
|
|
@Override
|
|
public Notice getNoticeById(Integer id) {
|
|
return noticeMapper.getNoticeById(id);
|
|
}
|
|
|
|
}
|