NoticeMapper.xml 843 B

1234567891011121314151617181920
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.web.work.mapper.NoticeMapper">
  6. <select id="selectList" resultType="com.ruoyi.web.work.domain.Notice">
  7. select id,title,top,state,create_time,create_by from tb_notice
  8. <where>
  9. <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
  10. <if test="top != null "> and top = #{top}</if>
  11. <if test="state != null "> and state = #{state}</if>
  12. </where>
  13. </select>
  14. <select id="indexList" resultType="com.ruoyi.web.work.domain.vo.NoticeVoList">
  15. SELECT id,top,title,create_time FROM tb_notice WHERE state=0 ORDER BY top DESC,id DESC LIMIT 5
  16. </select>
  17. </mapper>