package com.ozs.base.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ozs.base.domain.BaseNotice; import com.ozs.base.vo.BaseNoticePageReqVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import org.w3c.dom.stylesheets.LinkStyle; import java.util.List; /** * 公告管理Mapper接口 * * @author ruoyi * @date 2023-01-14 */ @Mapper public interface BaseNoticeMapper extends BaseMapper { @Select("select b.* from " + " base_notice b left join pm_audit_dept_ref r " + " on b.demand_id = r.ref_id " + " where (#{userId} = 1 or (r.dept_id = #{deptId} and r.ref_type = 2) ) " + " and (#{title} is null or b.title like concat('%',#{title},'%')) " + " and (#{type} is null or b.type = #{type}) " + " and (#{startTime} is null or to_days(b.release_time) >= to_days(#{startTime}) ) " + " and (#{entTime} is null or to_days(b.release_time) <= to_days(#{entTime}) ) " + " ") List query(BaseNoticePageReqVo vo); }