|
|
|
@@ -6,29 +6,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
<resultMap type="SysDeptExt" id="SysDeptExtResult"> |
|
|
|
<result property="deptId" column="dept_id" /> |
|
|
|
<result property="workdayHourStart" column="workday_hour_start" /> |
|
|
|
<result property="workdayHourEnd" column="workday_hour_end" /> |
|
|
|
<result property="weekendHourStart" column="weekend_hour_start" /> |
|
|
|
<result property="weekendHourEnd" column="weekend_hour_end" /> |
|
|
|
<result property="onDutyHourStart" column="on_duty_hour_start" /> |
|
|
|
<result property="onDutyHourEnd" column="on_duty_hour_end" /> |
|
|
|
<result property="offDutyHourStart" column="off_duty_hour_start" /> |
|
|
|
<result property="weekendHourEnd" column="off_duty_hour_end" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<select id="selectWorkTimeByDeptId" parameterType="java.lang.Long" resultMap="SysDeptExtResult"> |
|
|
|
select dept_id, workday_hour_start, workday_hour_end, weekend_hour_start, weekend_hour_end from sys_dept_ext u |
|
|
|
select dept_id, on_duty_hour_start, on_duty_hour_end, off_duty_hour_start, off_duty_hour_end from sys_dept_ext u |
|
|
|
where dept_id = #{deptId} |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertWorkTimeByDeptId" parameterType="SysDeptExt"> |
|
|
|
insert into sys_dept_ext (dept_id,workday_hour_start,workday_hour_end,weekend_hour_start,weekend_hour_end) |
|
|
|
values (#{deptId},#{workdayHourStart},#{workdayHourEnd},#{weekendHourStart},#{weekendHourEnd}) |
|
|
|
insert into sys_dept_ext (dept_id,on_duty_hour_start,on_duty_hour_end,off_duty_hour_start,off_duty_hour_end) |
|
|
|
values (#{deptId},#{workdayHourStart},#{workdayHourEnd},#{offDutyHourStart},#{weekendHourEnd}) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updateWorkTimeByDeptId" parameterType="SysDeptExt"> |
|
|
|
update sys_dept_ext |
|
|
|
<set> |
|
|
|
<if test="workdayHourStart != null ">workday_hour_start = #{workdayHourStart},</if> |
|
|
|
<if test="workdayHourEnd != null ">workday_hour_end = #{workdayHourEnd},</if> |
|
|
|
<if test="weekendHourStart != null ">weekend_hour_start = #{weekendHourStart},</if> |
|
|
|
<if test="weekendHourEnd != null ">weekend_hour_end = #{weekendHourEnd},</if> |
|
|
|
<if test="workdayHourStart != null ">on_duty_hour_start = #{workdayHourStart},</if> |
|
|
|
<if test="workdayHourEnd != null ">on_duty_hour_end = #{workdayHourEnd},</if> |
|
|
|
<if test="offDutyHourStart != null ">off_duty_hour_start = #{weekendHourStart},</if> |
|
|
|
<if test="offDutyHourEnd != null ">off_duty_hour_end = #{offDutyHourEnd},</if> |
|
|
|
</set> |
|
|
|
where dept_id = #{deptId} |
|
|
|
</update> |