提交 | 用户 | 时间
|
0cceb6
|
1 |
package com.jcdm.system.service.impl; |
Y |
2 |
|
|
3 |
import java.util.List; |
|
4 |
import org.springframework.beans.factory.annotation.Autowired; |
|
5 |
import org.springframework.stereotype.Service; |
|
6 |
import com.jcdm.system.domain.SysNotice; |
|
7 |
import com.jcdm.system.mapper.SysNoticeMapper; |
|
8 |
import com.jcdm.system.service.ISysNoticeService; |
|
9 |
|
|
10 |
/** |
|
11 |
* 公告 服务层实现 |
|
12 |
* |
|
13 |
* @author jc |
|
14 |
*/ |
|
15 |
@Service |
|
16 |
public class SysNoticeServiceImpl implements ISysNoticeService |
|
17 |
{ |
|
18 |
@Autowired |
|
19 |
private SysNoticeMapper noticeMapper; |
|
20 |
|
|
21 |
/** |
|
22 |
* 查询公告信息 |
|
23 |
* |
|
24 |
* @param noticeId 公告ID |
|
25 |
* @return 公告信息 |
|
26 |
*/ |
|
27 |
@Override |
|
28 |
public SysNotice selectNoticeById(Long noticeId) |
|
29 |
{ |
|
30 |
return noticeMapper.selectNoticeById(noticeId); |
|
31 |
} |
|
32 |
|
|
33 |
/** |
|
34 |
* 查询公告列表 |
|
35 |
* |
|
36 |
* @param notice 公告信息 |
|
37 |
* @return 公告集合 |
|
38 |
*/ |
|
39 |
@Override |
|
40 |
public List<SysNotice> selectNoticeList(SysNotice notice) |
|
41 |
{ |
|
42 |
return noticeMapper.selectNoticeList(notice); |
|
43 |
} |
|
44 |
|
|
45 |
/** |
|
46 |
* 新增公告 |
|
47 |
* |
|
48 |
* @param notice 公告信息 |
|
49 |
* @return 结果 |
|
50 |
*/ |
|
51 |
@Override |
|
52 |
public int insertNotice(SysNotice notice) |
|
53 |
{ |
|
54 |
return noticeMapper.insertNotice(notice); |
|
55 |
} |
|
56 |
|
|
57 |
/** |
|
58 |
* 修改公告 |
|
59 |
* |
|
60 |
* @param notice 公告信息 |
|
61 |
* @return 结果 |
|
62 |
*/ |
|
63 |
@Override |
|
64 |
public int updateNotice(SysNotice notice) |
|
65 |
{ |
|
66 |
return noticeMapper.updateNotice(notice); |
|
67 |
} |
|
68 |
|
|
69 |
/** |
|
70 |
* 删除公告对象 |
|
71 |
* |
|
72 |
* @param noticeId 公告ID |
|
73 |
* @return 结果 |
|
74 |
*/ |
|
75 |
@Override |
|
76 |
public int deleteNoticeById(Long noticeId) |
|
77 |
{ |
|
78 |
return noticeMapper.deleteNoticeById(noticeId); |
|
79 |
} |
|
80 |
|
|
81 |
/** |
|
82 |
* 批量删除公告信息 |
|
83 |
* |
|
84 |
* @param noticeIds 需要删除的公告ID |
|
85 |
* @return 结果 |
|
86 |
*/ |
|
87 |
@Override |
|
88 |
public int deleteNoticeByIds(Long[] noticeIds) |
|
89 |
{ |
|
90 |
return noticeMapper.deleteNoticeByIds(noticeIds); |
|
91 |
} |
|
92 |
} |