package com.zsc.edu.gateway.modules.message.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.message.dto.BulletinDto;
import com.zsc.edu.gateway.modules.message.entity.Bulletin;
import com.zsc.edu.gateway.modules.message.query.BulletinQuery;
import com.zsc.edu.gateway.modules.message.vo.BulletinVo;

import java.util.List;

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

public interface BulletinService extends IService<Bulletin> {

    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);

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

    Boolean close(UserDetailsImpl userDetails,Long id);

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

    Boolean delete(Long id);
}
