更新部门排序

This commit is contained in:
panshuling321 2022-06-10 16:22:21 +08:00
parent 191a365f10
commit 8b6a6b3099

View File

@ -16,7 +16,7 @@
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
work_dept_id, dept_name, code, sort, parent_dept_id, `status`, del_flag, tenant_id, work_dept_id, dept_name, code, sort, parent_dept_id, `status`, del_flag, tenant_id,
create_time, create_by, update_time, update_by create_time, create_by, update_time, update_by
</sql> </sql>
@ -43,6 +43,7 @@
and parent_dept_id is null and parent_dept_id is null
</otherwise> </otherwise>
</choose> </choose>
order by sort desc
</select> </select>
@ -63,11 +64,12 @@
and parent_dept_id is null and parent_dept_id is null
</otherwise> </otherwise>
</choose> </choose>
order by sort desc
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from xhpc_work_dept from xhpc_work_dept
where work_dept_id = #{workDeptId,jdbcType=BIGINT} where work_dept_id = #{workDeptId,jdbcType=BIGINT}
@ -97,11 +99,11 @@
<insert id="insert" keyColumn="work_dept_id" keyProperty="workDeptId" parameterType="com.xhpc.activity.domain.XhpcWorkDeptDomain" useGeneratedKeys="true"> <insert id="insert" keyColumn="work_dept_id" keyProperty="workDeptId" parameterType="com.xhpc.activity.domain.XhpcWorkDeptDomain" useGeneratedKeys="true">
insert into xhpc_work_dept (dept_name, code, sort, insert into xhpc_work_dept (dept_name, code, sort,
parent_dept_id, `status`, del_flag, parent_dept_id, `status`, del_flag,
tenant_id, create_time, create_by, tenant_id, create_time, create_by,
update_time, update_by) update_time, update_by)
values (#{deptName,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{sort,jdbcType=SMALLINT}, values (#{deptName,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{sort,jdbcType=SMALLINT},
#{parentDeptId,jdbcType=BIGINT}, #{status,jdbcType=SMALLINT}, 0, #{parentDeptId,jdbcType=BIGINT}, #{status,jdbcType=SMALLINT}, 0,
#{tenantId,jdbcType=VARCHAR}, SYSDATE(), #{createBy,jdbcType=VARCHAR}, #{tenantId,jdbcType=VARCHAR}, SYSDATE(), #{createBy,jdbcType=VARCHAR},
SYSDATE(), #{updateBy,jdbcType=VARCHAR}) SYSDATE(), #{updateBy,jdbcType=VARCHAR})