zjh
2025-06-20 ac544c1d85c53e7f51e4ea76aa2489a14aef03d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package com.ltkj.system.mapper;
 
import java.util.List;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ltkj.system.domain.SysNotice;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
/**
 * 通知公告表 数据层
 *
 * @author ltkj
 */
public interface SysNoticeMapper extends BaseMapper<SysNotice> {
    /**
     * 查询公告信息
     *
     * @param noticeId 公告ID
     * @return 公告信息
     */
    public SysNotice selectNoticeById(Long noticeId);
 
    /**
     * 查询公告列表
     *
     * @param notice 公告信息
     * @return 公告集合
     */
    public List<SysNotice> selectNoticeList(SysNotice notice);
 
    /**
     * 新增公告
     *
     * @param notice 公告信息
     * @return 结果
     */
    public int insertNotice(SysNotice notice);
 
    /**
     * 修改公告
     *
     * @param notice 公告信息
     * @return 结果
     */
    public int updateNotice(SysNotice notice);
 
    /**
     * 批量删除公告
     *
     * @param noticeId 公告ID
     * @return 结果
     */
    public int deleteNoticeById(Long noticeId);
 
    /**
     * 批量删除公告信息
     *
     * @param noticeIds 需要删除的公告ID
     * @return 结果
     */
    public int deleteNoticeByIds(Long[] noticeIds);
 
    @Select("SELECT s.* FROM sys_notice s\n" +
            "  JOIN sys_notice_user n ON s.notice_id = n.notice_id\n" +
            " WHERE DATE(s.create_time) = CURDATE() AND n.user_id = #{userId}")
    List<SysNotice> selectAll(@Param("userId") String userId);
 
    @Select("SELECT s.* FROM sys_notice s\n" +
            " WHERE DATE(s.create_time) = CURDATE()")
    List<SysNotice> selectAllByAdmin();
}