package com.zsc.edu.gateway.modules.notice.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zsc.edu.gateway.framework.security.UserDetailsImpl;
import com.zsc.edu.gateway.modules.notice.dto.BulletinDto;
import com.zsc.edu.gateway.modules.notice.dto.PageDto;
import com.zsc.edu.gateway.modules.notice.entity.Bulletin;
import com.zsc.edu.gateway.modules.notice.query.BulletinQuery;
import com.zsc.edu.gateway.modules.notice.vo.BulletinVo;

import java.util.List;
import java.util.Set;

/**
 * 系统公告Service
 *
 * @author harry_yao
 */

public interface BulletinService extends IService<Bulletin> {

    List<BulletinVo> detail(UserDetailsImpl userDetails, Long id, Bulletin.State state);

    Bulletin create(UserDetailsImpl userDetails, BulletinDto dto);

    Boolean update(UserDetailsImpl userDetails, BulletinDto dto, Long id);

    Boolean toggleTop(Long id);

    List<String> publish(UserDetailsImpl userDetails, List<Long> id);

    Boolean close(UserDetailsImpl userDetails,Long id);

    Boolean insertInto(Long bulletinId, Set<String> attachmentIds);

    IPage<BulletinVo> selectPageByConditions(Page<BulletinVo> page, BulletinQuery query);
}
