From 2390d668f77641f9b62e1e210d855df87ee7d390 Mon Sep 17 00:00:00 2001 From: cloudroam <cloudroam> Date: 星期日, 29 十二月 2024 13:11:55 +0800 Subject: [PATCH] add:阿里云短信模板获取签名和模板信息5 --- src/main/resources/mapper/sms/SmsTemplateMapper.xml | 40 ++++++++++++++++++++++++++++------------ 1 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/main/resources/mapper/sms/SmsTemplateMapper.xml b/src/main/resources/mapper/sms/SmsTemplateMapper.xml index 7f1b9f1..8185740 100644 --- a/src/main/resources/mapper/sms/SmsTemplateMapper.xml +++ b/src/main/resources/mapper/sms/SmsTemplateMapper.xml @@ -2,17 +2,33 @@ <!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"> - <!-- 通用查询映射结果 --> - <resultMap id="BaseResultMap" type="com.mzl.flower.entity.SmsTemplateDO"> - <id column="id" property="id" /> - <result column="deleted" property="deleted" /> - <result column="create_by" property="createBy" /> - <result column="create_time" property="createTime" /> - <result column="update_by" property="updateBy" /> - <result column="update_time" property="updateTime" /> - <result column="code" property="code" /> - <result column="name" property="name" /> - <result column="description" property="description" /> - </resultMap> + + <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> -- Gitblit v1.9.3