forked from zhurui/management
20 lines
675 B
XML
20 lines
675 B
XML
|
<?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="com.dkha.dao.NewsDao">
|
||
|
|
||
|
<select id="getList" resultType="com.dkha.entity.NewsEntity">
|
||
|
select * from tb_news where 1=1
|
||
|
<if test="title != null and title.trim() != ''">
|
||
|
and title like #{title}
|
||
|
</if>
|
||
|
<if test="startDate != null and startDate.trim() != ''">
|
||
|
and pub_date >= #{startDate}
|
||
|
</if>
|
||
|
<if test="endDate != null and endDate.trim() != ''">
|
||
|
<![CDATA[and pub_date <= #{endDate}]]>
|
||
|
</if>
|
||
|
</select>
|
||
|
|
||
|
</mapper>
|