zjh
2025-06-20 ac544c1d85c53e7f51e4ea76aa2489a14aef03d9
ltkj-system/src/main/java/com/ltkj/system/mapper/SysNoticeMapper.java
@@ -2,14 +2,17 @@
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 {
public interface SysNoticeMapper extends BaseMapper<SysNotice> {
    /**
     * 查询公告信息
     *
@@ -57,4 +60,13 @@
     * @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();
}