|
|
@@ -23,6 +23,33 @@
|
|
|
#{available}
|
|
|
)
|
|
|
</insert>
|
|
|
+ <update id="updateById">
|
|
|
+ update yt_middle_dept
|
|
|
+ <set>
|
|
|
+ <if test=" parentId!=null" >
|
|
|
+ parent_id = #{parentId},
|
|
|
+ </if>
|
|
|
+ <if test=" deptId!=null" >
|
|
|
+ dept_name = #{deptId},
|
|
|
+ </if>
|
|
|
+ <if test=" describe!=null" >
|
|
|
+ `describe` = #{describe},
|
|
|
+ </if>
|
|
|
+ <if test=" !=null" >
|
|
|
+ sort = #{sort},
|
|
|
+ </if>
|
|
|
+ <if test=" !=null" >
|
|
|
+ update_time = #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test=" !=null" >
|
|
|
+ update_user_id = #{updateUserId},
|
|
|
+ </if>
|
|
|
+ <if test=" !=null" >
|
|
|
+ available = #{available}
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where dept_id = #{deptId}
|
|
|
+ </update>
|
|
|
|
|
|
<select id="queryList" resultType="com.ytpm.middle.view.MiddleDeptVO">
|
|
|
select
|
|
|
@@ -46,4 +73,10 @@
|
|
|
from yt_middle_dept
|
|
|
where available = 1 and dept_name = #{deptName}
|
|
|
</select>
|
|
|
+ <select id="selectPrimary" resultType="com.ytpm.middle.model.YtMiddleDept">
|
|
|
+ select
|
|
|
+ dept_id, parent_id, dept_name, `describe`, sort, create_time, create_user_id, update_time, update_user_id, available
|
|
|
+ from yt_middle_dept
|
|
|
+ where dept_id = #{deptId}
|
|
|
+ </select>
|
|
|
</mapper>
|