<?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.mzl.flower.mapper.SmsTemplateMapper">
|
|
|
<select id="queryPage" resultType="com.mzl.flower.entity.SmsTemplateDO">
|
select t.* from t_sms_template t
|
where t.deleted= 0
|
<if test="dto.id!=null ">
|
and t.id = #{dto.id}
|
</if>
|
<if test="dto.code != null and dto.code != ''">
|
and t.code like concat('%', #{dto.code}, '%')
|
</if>
|
<if test="dto.name != null and dto.name != ''">
|
and t.name like concat('%', #{dto.name}, '%')
|
</if>
|
<if test="dto.description != null and dto.description != ''">
|
and t.description like concat('%', #{dto.description}, '%')
|
</if>
|
<if test="dto.startDate!=null ">
|
<![CDATA[
|
AND t.create_time >= #{dto.startDate}
|
]]>
|
</if>
|
<if test="dto.endDate!=null ">
|
<![CDATA[
|
AND t.create_time <= #{dto.endDate}
|
]]>
|
</if>
|
|
</select>
|
|
</mapper>
|