| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one or more |
| ~ contributor license agreements. See the NOTICE file distributed with |
| ~ this work for additional information regarding copyright ownership. |
| ~ The ASF licenses this file to You under the Apache License, Version 2.0 |
| ~ (the "License"); you may not use this file except in compliance with |
| ~ the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| <mapper namespace="org.apache.shenyu.admin.mapper.AlertTemplateMapper"> |
| <resultMap id="BaseResultMap" type="org.apache.shenyu.admin.model.entity.AlertTemplateDO"> |
| <!--@mbg.generated--> |
| <!--@Table alert_template--> |
| <id column="id" jdbcType="BIGINT" property="id" /> |
| <result column="name" jdbcType="VARCHAR" property="name" /> |
| <result column="strategy_name" jdbcType="VARCHAR" property="strategyName" /> |
| <result column="content" jdbcType="VARCHAR" property="content" /> |
| <result column="date_created" jdbcType="TIMESTAMP" property="dateCreated" /> |
| <result column="date_updated" jdbcType="TIMESTAMP" property="dateUpdated" /> |
| </resultMap> |
| <sql id="Base_Column_List"> |
| id, `name`, strategy_name, content, date_created, date_updated |
| </sql> |
| <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| select |
| <include refid="Base_Column_List" /> |
| from alert_template |
| where id = #{id,jdbcType=BIGINT} |
| </select> |
| <delete id="deleteByIds" parameterType="java.lang.Long"> |
| delete from alert_template |
| where id in |
| <foreach item="id" collection="list" open="(" separator="," close=")"> |
| #{id, jdbcType=VARCHAR} |
| </foreach> |
| </delete> |
| <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="org.apache.shenyu.admin.model.dto.AlertTemplateDTO" useGeneratedKeys="true"> |
| insert into alert_template |
| <trim prefix="(" suffix=")" suffixOverrides=","> |
| <if test="name != null"> |
| `name`, |
| </if> |
| <if test="strategyName != null"> |
| strategy_name, |
| </if> |
| <if test="content != null"> |
| content, |
| </if> |
| </trim> |
| <trim prefix="values (" suffix=")" suffixOverrides=","> |
| <if test="name != null"> |
| #{name,jdbcType=VARCHAR}, |
| </if> |
| <if test="strategyName != null"> |
| #{strategyName,jdbcType=VARCHAR}, |
| </if> |
| <if test="content != null"> |
| #{content,jdbcType=VARCHAR}, |
| </if> |
| </trim> |
| </insert> |
| <update id="updateByPrimaryKeySelective" parameterType="org.apache.shenyu.admin.model.dto.AlertTemplateDTO"> |
| update alert_template |
| <set> |
| <if test="name != null"> |
| `name` = #{name,jdbcType=VARCHAR}, |
| </if> |
| <if test="strategyName != null"> |
| strategy_name = #{strategyName,jdbcType=VARCHAR}, |
| </if> |
| <if test="content != null"> |
| content = #{content,jdbcType=VARCHAR}, |
| </if> |
| </set> |
| where id = #{id,jdbcType=BIGINT} |
| </update> |
| |
| <select id="selectAll" resultType="org.apache.shenyu.admin.model.vo.AlertTemplateVO"> |
| select <include refid="Base_Column_List"/> from alert_template |
| </select> |
| </mapper> |