|
|
@@ -19,11 +19,12 @@
|
|
|
<result column="province" jdbcType="INTEGER" property="province" />
|
|
|
<result column="working_hours_type" jdbcType="INTEGER" property="workingHoursType" />
|
|
|
<result column="hide_sign" jdbcType="INTEGER" property="hideSign" />
|
|
|
+ <result column="lvl" jdbcType="INTEGER" property="lvl" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, create_id, create_time, update_time, deleted_sign, `name`, `type`, manager_id,
|
|
|
dep_no, super_id, remarks, `status`, abbreviation, finance_id, province, working_hours_type,
|
|
|
- hide_sign
|
|
|
+ hide_sign, lvl
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -41,13 +42,15 @@
|
|
|
`type`, manager_id, dep_no,
|
|
|
super_id, remarks, `status`,
|
|
|
abbreviation, finance_id, province,
|
|
|
- working_hours_type, hide_sign)
|
|
|
+ working_hours_type, hide_sign, lvl
|
|
|
+ )
|
|
|
values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
|
|
|
#{type,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR}, #{depNo,jdbcType=VARCHAR},
|
|
|
#{superId,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
|
|
#{abbreviation,jdbcType=VARCHAR}, #{financeId,jdbcType=VARCHAR}, #{province,jdbcType=INTEGER},
|
|
|
- #{workingHoursType,jdbcType=INTEGER}, #{hideSign,jdbcType=INTEGER})
|
|
|
+ #{workingHoursType,jdbcType=INTEGER}, #{hideSign,jdbcType=INTEGER}, #{lvl,jdbcType=INTEGER}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.Department">
|
|
|
insert into department
|
|
|
@@ -103,6 +106,9 @@
|
|
|
<if test="hideSign != null">
|
|
|
hide_sign,
|
|
|
</if>
|
|
|
+ <if test="lvl != null">
|
|
|
+ lvl,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -156,6 +162,9 @@
|
|
|
<if test="hideSign != null">
|
|
|
#{hideSign,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="lvl != null">
|
|
|
+ #{lvl,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Department">
|
|
|
@@ -209,6 +218,9 @@
|
|
|
<if test="hideSign != null">
|
|
|
hide_sign = #{hideSign,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="lvl != null">
|
|
|
+ lvl = #{lvl,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -229,7 +241,8 @@
|
|
|
finance_id = #{financeId,jdbcType=VARCHAR},
|
|
|
province = #{province,jdbcType=INTEGER},
|
|
|
working_hours_type = #{workingHoursType,jdbcType=INTEGER},
|
|
|
- hide_sign = #{hideSign,jdbcType=INTEGER}
|
|
|
+ hide_sign = #{hideSign,jdbcType=INTEGER},
|
|
|
+ lvl = #{lvl,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
@@ -519,5 +532,11 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</select>
|
|
|
+ <select id="selectByDepNo" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from department where super_id= #{superId}
|
|
|
+ order by dep_no desc limit 1
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|