management/back/dkha-sz-main/dkha-admin/dkha-admin-server/target/classes/mapper/NewsDao.xml

20 lines
675 B
XML
Raw Normal View History

2023-12-18 13:12:25 +08:00
<?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>