package com.yiqi.system.service.impl;

import java.util.List;
import com.yiqi.common.utils.DateUtils;
import com.yiqi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiqi.system.mapper.SysNoticeOrgRelationMapper;
import com.yiqi.system.domain.SysNoticeOrgRelation;
import com.yiqi.system.service.ISysNoticeOrgRelationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 公告组织关联Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-24
 */
@Service
public class SysNoticeOrgRelationServiceImpl extends ServiceImpl<SysNoticeOrgRelationMapper,SysNoticeOrgRelation> implements ISysNoticeOrgRelationService {

    /**
     * 查询公告组织关联
     *
     * @param id 公告组织关联主键
     * @return 公告组织关联
     */
    @Override
    public SysNoticeOrgRelation selectSysNoticeOrgRelationById(Long id) {
        return baseMapper.selectSysNoticeOrgRelationById(id);
    }

    /**
     * 查询公告组织关联列表
     *
     * @param sysNoticeOrgRelation 公告组织关联
     * @return 公告组织关联
     */
    @Override
    public List<SysNoticeOrgRelation> selectSysNoticeOrgRelationList(SysNoticeOrgRelation sysNoticeOrgRelation) {
        return baseMapper.selectSysNoticeOrgRelationList(sysNoticeOrgRelation);
    }

    /**
     * 新增公告组织关联
     *
     * @param sysNoticeOrgRelation 公告组织关联
     * @return 结果
     */
    @Override
    public int insertSysNoticeOrgRelation(SysNoticeOrgRelation sysNoticeOrgRelation) {
        sysNoticeOrgRelation.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertSysNoticeOrgRelation(sysNoticeOrgRelation);
    }

    /**
     * 修改公告组织关联
     *
     * @param sysNoticeOrgRelation 公告组织关联
     * @return 结果
     */
    @Override
    public int updateSysNoticeOrgRelation(SysNoticeOrgRelation sysNoticeOrgRelation) {
        sysNoticeOrgRelation.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateSysNoticeOrgRelation(sysNoticeOrgRelation);
    }

    /**
     * 批量删除公告组织关联
     *
     * @param ids 需要删除的公告组织关联主键
     * @return 结果
     */
    @Override
    public int deleteSysNoticeOrgRelationByIds(Long[] ids) {
        return baseMapper.deleteSysNoticeOrgRelationByIds(ids);
    }

    /**
     * 删除公告组织关联信息
     *
     * @param id 公告组织关联主键
     * @return 结果
     */
    @Override
    public int deleteSysNoticeOrgRelationById(Long id) {
        return baseMapper.deleteSysNoticeOrgRelationById(id);
    }



}
