|
|
@@ -0,0 +1,193 @@
|
|
|
+<?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.goafanti.common.dao.AmbSystemMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.AmbSystem">
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
+ <result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
|
|
+ <result column="ancestors" jdbcType="VARCHAR" property="ancestors" />
|
|
|
+ <result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
+ <result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
|
|
+ <result column="leader" jdbcType="VARCHAR" property="leader" />
|
|
|
+ <result column="status" jdbcType="CHAR" property="status" />
|
|
|
+ <result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="lvl" jdbcType="INTEGER" property="lvl" />
|
|
|
+ <result column="finance_id" jdbcType="VARCHAR" property="financeId" />
|
|
|
+ <result column="ancestors_names" jdbcType="VARCHAR" property="ancestorsNames" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, parent_id, ancestors, `name`, order_num, leader, `status`, create_by, create_time,
|
|
|
+ update_by, update_time, lvl, finance_id, ancestors_names
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from amb_system
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ delete from amb_system
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbSystem" useGeneratedKeys="true">
|
|
|
+ insert into amb_system (parent_id, ancestors, `name`,
|
|
|
+ order_num, leader, `status`,
|
|
|
+ create_by, create_time, update_by,
|
|
|
+ update_time, lvl, finance_id,
|
|
|
+ ancestors_names)
|
|
|
+ values (#{parentId,jdbcType=BIGINT}, #{ancestors,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
+ #{orderNum,jdbcType=INTEGER}, #{leader,jdbcType=VARCHAR}, #{status,jdbcType=CHAR},
|
|
|
+ #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{lvl,jdbcType=INTEGER}, #{financeId,jdbcType=VARCHAR},
|
|
|
+ #{ancestorsNames,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbSystem" useGeneratedKeys="true">
|
|
|
+ insert into amb_system
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="parentId != null">
|
|
|
+ parent_id,
|
|
|
+ </if>
|
|
|
+ <if test="ancestors != null">
|
|
|
+ ancestors,
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ `name`,
|
|
|
+ </if>
|
|
|
+ <if test="orderNum != null">
|
|
|
+ order_num,
|
|
|
+ </if>
|
|
|
+ <if test="leader != null">
|
|
|
+ leader,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status`,
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ create_by,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ update_by,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time,
|
|
|
+ </if>
|
|
|
+ <if test="lvl != null">
|
|
|
+ lvl,
|
|
|
+ </if>
|
|
|
+ <if test="financeId != null">
|
|
|
+ finance_id,
|
|
|
+ </if>
|
|
|
+ <if test="ancestorsNames != null">
|
|
|
+ ancestors_names,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="parentId != null">
|
|
|
+ #{parentId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="ancestors != null">
|
|
|
+ #{ancestors,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderNum != null">
|
|
|
+ #{orderNum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="leader != null">
|
|
|
+ #{leader,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ #{createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ #{updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="lvl != null">
|
|
|
+ #{lvl,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="financeId != null">
|
|
|
+ #{financeId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ancestorsNames != null">
|
|
|
+ #{ancestorsNames,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AmbSystem">
|
|
|
+ update amb_system
|
|
|
+ <set>
|
|
|
+ <if test="parentId != null">
|
|
|
+ parent_id = #{parentId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="ancestors != null">
|
|
|
+ ancestors = #{ancestors,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ `name` = #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderNum != null">
|
|
|
+ order_num = #{orderNum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="leader != null">
|
|
|
+ leader = #{leader,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status` = #{status,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="lvl != null">
|
|
|
+ lvl = #{lvl,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="financeId != null">
|
|
|
+ finance_id = #{financeId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ancestorsNames != null">
|
|
|
+ ancestors_names = #{ancestorsNames,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AmbSystem">
|
|
|
+ update amb_system
|
|
|
+ set parent_id = #{parentId,jdbcType=BIGINT},
|
|
|
+ ancestors = #{ancestors,jdbcType=VARCHAR},
|
|
|
+ `name` = #{name,jdbcType=VARCHAR},
|
|
|
+ order_num = #{orderNum,jdbcType=INTEGER},
|
|
|
+ leader = #{leader,jdbcType=VARCHAR},
|
|
|
+ `status` = #{status,jdbcType=CHAR},
|
|
|
+ create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ lvl = #{lvl,jdbcType=INTEGER},
|
|
|
+ finance_id = #{financeId,jdbcType=VARCHAR},
|
|
|
+ ancestors_names = #{ancestorsNames,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+</mapper>
|