mappers.RoleEntityMapper.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.RoleEntityMapper"> <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.RoleEntity"> <id column="id" jdbcType="INTEGER" property="id"/> <result column="role_code" jdbcType="VARCHAR" property="roleCode"/> <result column="role_name" jdbcType="VARCHAR" property="roleName"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="create_by" jdbcType="VARCHAR" property="createBy"/> <result column="update_by" jdbcType="VARCHAR" property="updateBy"/> <result column="disabled" jdbcType="BIT" property="disabled"/> </resultMap> <sql id="Base_Column_List"> id, role_code, role_name, create_time, update_time, create_by, update_by, disabled </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> select <include refid="Base_Column_List"/> from role where id = #{id,jdbcType=INTEGER} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> delete from role where id = #{id,jdbcType=INTEGER} </delete> <insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.RoleEntity"> insert into role (id, role_code, role_name, create_time, update_time, create_by, update_by, disabled) values (#{id,jdbcType=INTEGER}, #{roleCode,jdbcType=VARCHAR}, #{roleName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{disabled,jdbcType=INTEGER}) </insert> <insert id="insertSelective" parameterType="org.apache.inlong.manager.dao.entity.RoleEntity"> insert into role <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="roleCode != null"> role_code, </if> <if test="roleName != null"> role_name, </if> <if test="createTime != null"> create_time, </if> <if test="updateTime != null"> update_time, </if> <if test="createBy != null"> create_by, </if> <if test="updateBy != null"> update_by, </if> <if test="disabled != null"> disabled, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=INTEGER}, </if> <if test="roleCode != null"> #{roleCode,jdbcType=VARCHAR}, </if> <if test="roleName != null"> #{roleName,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="createBy != null"> #{createBy,jdbcType=VARCHAR}, </if> <if test="updateBy != null"> #{updateBy,jdbcType=VARCHAR}, </if> <if test="disabled != null"> #{disabled,jdbcType=INTEGER}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="org.apache.inlong.manager.dao.entity.RoleEntity"> update role <set> <if test="roleCode != null"> role_code = #{roleCode,jdbcType=VARCHAR}, </if> <if test="roleName != null"> role_name = #{roleName,jdbcType=VARCHAR}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null"> update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="createBy != null"> create_by = #{createBy,jdbcType=VARCHAR}, </if> <if test="updateBy != null"> update_by = #{updateBy,jdbcType=VARCHAR}, </if> <if test="disabled != null"> disabled = #{disabled,jdbcType=INTEGER}, </if> </set> where id = #{id,jdbcType=INTEGER} </update> <update id="updateByPrimaryKey" parameterType="org.apache.inlong.manager.dao.entity.RoleEntity"> update role set role_code = #{roleCode,jdbcType=VARCHAR}, role_name = #{roleName,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP}, create_by = #{createBy,jdbcType=VARCHAR}, update_by = #{updateBy,jdbcType=VARCHAR}, disabled = #{disabled,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER} </update> </mapper>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy