package com.sptg.estate.biz.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.sptg.estate.api.dto.NoticePushDto;
import com.sptg.estate.api.dto.UserDto;
import com.sptg.estate.api.entity.NoticePush;
import com.sptg.estate.api.entity.User;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * title: NoticePushServiceInterface
 * package: com.sptg.estate.biz.security
 * description:发布公告-服务层接口
 *
 *                
 *                
 */
public interface NoticePushServiceInterface extends IService<NoticePush> {
    /**
     * 功能描述:分页展示发布公告
     * @param noticePushDto
     * @return com.baomidou.mybatisplus.plugins.Page<com.sptg.estate.api.entity.NoticePush>
     *                
     *                      
     */
    Page<NoticePush> showNoticePushList(NoticePushDto noticePushDto);
    /**
     * 功能描述:根据id查询公告发布信息
     * @param id
     * @return com.sptg.estate.api.entity.NoticePush
     *                
     *                       
     */
    NoticePush findNoticePushById(long id);
    /**
     * 功能描述:添加公告发布
     * @param noticePush
     * @return Long
     *                
     *                       
     */
    @Transactional(rollbackFor = {Exception.class})
    Long addNoticePush(NoticePush noticePush);
    /**
     * 功能描述:更新公告发布状态
     * @param id
     * @param pushStatus 发布状态
     * @return boolean
     *                
     *                       
     */
    boolean updatePushStatus(long id, int pushStatus);
    /**
     * 功能描述:根据住户信息获取公告
     * @param userDto
     * @return List<NoticePush>
     *               
     *                       
     */
    List<NoticePush> getListByUser(UserDto userDto);
}
