| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="bus.mapper.BNoticeInfoMapper">
- <select id="list" parameterType="bus.model.dto.page.BNoticeInfoPageDto" resultType="bus.model.dto.BNoticeInfoDto">
- select
- id,
- title,
- content,
- type,
- pub_time,
- status
- from
- b_notice_info
- <where>
- is_delete = 0
- <if test="title != null and title != ''">
- and title like concat('%',#{title},'%')
- </if>
- <if test="type != null and type != ''">
- and type = #{type}
- </if>
- <if test="status != null and status != ''">
- and status = #{status}
- </if>
- <if test="pubBeginTime != null ">
- and pub_time >= #{pubBeginTime}
- </if>
- <if test="pubEndTime != null">
- and pub_time <= #{pubEndTime}
- </if>
- </where>
- order by pub_time desc
- </select>
- <select id="getNoticeInfoList" resultType="bus.model.dto.BNoticeInfoDto">
- SELECT
- a.id,
- a.title,
- a.content,
- a.type,
- a.pub_time,
- a.status
- FROM
- b_notice_info a
- WHERE
- a.status = '1'
- AND a.is_delete = 0
- ORDER BY
- a.pub_time DESC
- </select>
- </mapper>
|