mappers.InlongClusterEntityMapper.xml Maven / Gradle / Ivy
<?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.inlong.manager.dao.mapper.InlongClusterEntityMapper"> <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.InlongClusterEntity"> <id column="id" jdbcType="INTEGER" property="id"/> <result column="name" jdbcType="VARCHAR" property="name"/> <result column="type" jdbcType="VARCHAR" property="type"/> <result column="url" jdbcType="VARCHAR" property="url"/> <result column="cluster_tag" jdbcType="VARCHAR" property="clusterTag"/> <result column="ext_tag" jdbcType="VARCHAR" property="extTag"/> <result column="token" jdbcType="VARCHAR" property="token"/> <result column="ext_params" jdbcType="LONGVARCHAR" property="extParams"/> <result column="heartbeat" jdbcType="LONGVARCHAR" property="heartbeat"/> <result column="in_charges" jdbcType="VARCHAR" property="inCharges"/> <result column="status" jdbcType="INTEGER" property="status"/> <result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/> <result column="creator" jdbcType="VARCHAR" property="creator"/> <result column="modifier" jdbcType="VARCHAR" property="modifier"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/> </resultMap> <sql id="Base_Column_List"> id, name, type, url, cluster_tag, ext_tag, token, ext_params, heartbeat, in_charges, status, is_deleted, creator, modifier, create_time, modify_time </sql> <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="org.apache.inlong.manager.dao.entity.InlongClusterEntity"> insert into inlong_cluster (id, name, type, url, cluster_tag, ext_tag, token, ext_params, heartbeat, in_charges, status, is_deleted, creator, modifier, create_time, modify_time) values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{clusterTag,jdbcType=VARCHAR}, #{extTag,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR}, #{extParams,jdbcType=LONGVARCHAR}, #{heartbeat,jdbcType=LONGVARCHAR}, #{inCharges,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{isDeleted,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR}, #{modifier,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP}) </insert> <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="org.apache.inlong.manager.dao.entity.InlongClusterEntity"> insert into inlong_cluster <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="name != null"> name, </if> <if test="type != null"> type, </if> <if test="url != null"> url, </if> <if test="clusterTag != null"> cluster_tag, </if> <if test="extTag != null"> ext_tag, </if> <if test="token != null"> token, </if> <if test="inCharges != null"> in_charges, </if> <if test="status != null"> status, </if> <if test="isDeleted != null"> is_deleted, </if> <if test="creator != null"> creator, </if> <if test="modifier != null"> modifier, </if> <if test="createTime != null"> create_time, </if> <if test="modifyTime != null"> modify_time, </if> <if test="extParams != null"> ext_params, </if> <if test="heartbeat != null"> heartbeat, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=INTEGER}, </if> <if test="name != null"> #{name,jdbcType=VARCHAR}, </if> <if test="type != null"> #{type,jdbcType=VARCHAR}, </if> <if test="url != null"> #{url,jdbcType=VARCHAR}, </if> <if test="clusterTag != null"> #{clusterTag,jdbcType=VARCHAR}, </if> <if test="extTag != null"> #{extTag,jdbcType=VARCHAR}, </if> <if test="token != null"> #{token,jdbcType=VARCHAR}, </if> <if test="inCharges != null"> #{inCharges,jdbcType=VARCHAR}, </if> <if test="status != null"> #{status,jdbcType=INTEGER}, </if> <if test="isDeleted != null"> #{isDeleted,jdbcType=INTEGER}, </if> <if test="creator != null"> #{creator,jdbcType=VARCHAR}, </if> <if test="modifier != null"> #{modifier,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="modifyTime != null"> #{modifyTime,jdbcType=TIMESTAMP}, </if> <if test="extParams != null"> #{extParams,jdbcType=LONGVARCHAR}, </if> <if test="heartbeat != null"> #{heartbeat,jdbcType=LONGVARCHAR}, </if> </trim> </insert> <select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap"> select <include refid="Base_Column_List"/> from inlong_cluster where id = #{id,jdbcType=INTEGER} </select> <update id="updateById" parameterType="org.apache.inlong.manager.dao.entity.InlongClusterEntity"> update inlong_cluster set name = #{name,jdbcType=VARCHAR}, type = #{type,jdbcType=VARCHAR}, url = #{url,jdbcType=VARCHAR}, cluster_tag = #{clusterTag,jdbcType=VARCHAR}, ext_tag = #{extTag,jdbcType=VARCHAR}, token = #{token,jdbcType=VARCHAR}, ext_params = #{extParams,jdbcType=LONGVARCHAR}, heartbeat = #{heartbeat,jdbcType=LONGVARCHAR}, in_charges = #{inCharges,jdbcType=VARCHAR}, status = #{status,jdbcType=INTEGER}, is_deleted = #{isDeleted,jdbcType=INTEGER}, creator = #{creator,jdbcType=VARCHAR}, modifier = #{modifier,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, modify_time = #{modifyTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=INTEGER} </update> <select id="selectByKey" parameterType="org.apache.inlong.manager.common.pojo.cluster.InlongClusterRequest" resultType="org.apache.inlong.manager.dao.entity.InlongClusterEntity"> select <include refid="Base_Column_List"/> from inlong_cluster <where> is_deleted = 0 and `type` = #{type, jdbcType=VARCHAR} <if test="clusterTag != null and clusterTag != ''"> and cluster_tag = #{clusterTag, jdbcType=VARCHAR} </if> <if test="name != null and name != ''"> and name = #{name, jdbcType=VARCHAR} </if> </where> order by modify_time desc </select> <select id="selectByCondition" parameterType="org.apache.inlong.manager.common.pojo.cluster.InlongClusterPageRequest" resultType="org.apache.inlong.manager.dao.entity.InlongClusterEntity"> select <include refid="Base_Column_List"/> from inlong_cluster <where> is_deleted = 0 <if test="name != null and name != ''"> and name = #{name, jdbcType=VARCHAR} </if> <if test="type != null and type != ''"> and `type` = #{type, jdbcType=VARCHAR} </if> <if test="typeList != null and typeList.size()>0"> and `type` in <foreach item="item" index="index" collection="typeList" open="(" close=")" separator=","> #{item} </foreach> </if> <if test="clusterTag != null and clusterTag != ''"> and cluster_tag = #{clusterTag, jdbcType=VARCHAR} </if> <if test="keyword != null and keyword != ''"> name like CONCAT('%', #{keyword}, '%') or cluster_tag like CONCAT('%', #{keyword}, '%') or url like CONCAT('%', #{keyword}, '%') ) </if> <if test="status != null and status != ''"> and status = #{status, jdbcType=INTEGER} </if> </where> order by modify_time desc </select> <update id="updateByIdSelective" parameterType="org.apache.inlong.manager.dao.entity.InlongClusterEntity"> update inlong_cluster <set> <if test="name != null"> name = #{name,jdbcType=VARCHAR}, </if> <if test="type != null"> type = #{type,jdbcType=VARCHAR}, </if> <if test="url != null"> url = #{url,jdbcType=VARCHAR}, </if> <if test="clusterTag != null"> cluster_tag = #{clusterTag,jdbcType=VARCHAR}, </if> <if test="extTag != null"> ext_tag = #{extTag,jdbcType=VARCHAR}, </if> <if test="token != null"> token = #{token,jdbcType=VARCHAR}, </if> <if test="extParams != null"> ext_params = #{extParams,jdbcType=LONGVARCHAR}, </if> <if test="heartbeat != null"> heartbeat = #{heartbeat,jdbcType=LONGVARCHAR}, </if> <if test="inCharges != null"> in_charges = #{inCharges,jdbcType=VARCHAR}, </if> <if test="status != null"> status = #{status,jdbcType=INTEGER}, </if> <if test="isDeleted != null"> is_deleted = #{isDeleted,jdbcType=INTEGER}, </if> <if test="creator != null"> creator = #{creator,jdbcType=VARCHAR}, </if> <if test="modifier != null"> modifier = #{modifier,jdbcType=VARCHAR}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="modifyTime != null"> modify_time = #{modifyTime,jdbcType=TIMESTAMP}, </if> </set> where id = #{id,jdbcType=INTEGER} </update> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> delete from inlong_cluster where id = #{id,jdbcType=INTEGER} </delete> </mapper>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy