BaseNoticeMapper.java 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. package com.ozs.base.mapper;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.ozs.base.domain.BaseNotice;
  4. import com.ozs.base.vo.BaseNoticePageReqVo;
  5. import org.apache.ibatis.annotations.Mapper;
  6. import org.apache.ibatis.annotations.Select;
  7. import org.w3c.dom.stylesheets.LinkStyle;
  8. import java.util.List;
  9. /**
  10. * 公告管理Mapper接口
  11. *
  12. * @author ruoyi
  13. * @date 2023-01-14
  14. */
  15. @Mapper
  16. public interface BaseNoticeMapper extends BaseMapper<BaseNotice> {
  17. @Select("select b.* from " +
  18. " base_notice b left join pm_audit_dept_ref r " +
  19. " on b.demand_id = r.ref_id " +
  20. " where (#{userId} = 1 or (r.dept_id = #{deptId} and r.ref_type = 2) ) " +
  21. " and (#{title} is null or b.title like concat('%',#{title},'%')) " +
  22. " and (#{type} is null or b.type = #{type}) " +
  23. " and (#{startTime} is null or to_days(b.release_time) >= to_days(#{startTime}) ) " +
  24. " and (#{entTime} is null or to_days(b.release_time) <= to_days(#{entTime}) ) " +
  25. " ")
  26. List<BaseNotice> query(BaseNoticePageReqVo vo);
  27. }