|
|
@@ -18,11 +18,11 @@
|
|
|
<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,
|
|
|
+ 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
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from amb_system
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
@@ -32,15 +32,15 @@
|
|
|
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,
|
|
|
+ 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},
|
|
|
+ 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">
|
|
|
@@ -190,4 +190,13 @@
|
|
|
ancestors_names = #{ancestorsNames,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
-</mapper>
|
|
|
+
|
|
|
+ <select id="getAncestorsList" resultType="com.goafanti.common.model.AmbSystem">
|
|
|
+ select id,name
|
|
|
+ from amb_system
|
|
|
+ where id in
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
+</mapper>
|