| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.xunmei.system.mapper.SysWorkTimeMapper">
- <resultMap type="com.xunmei.system.domain.SysWorkTime" id="SysWorkTimeResult">
- <result property="id" column="id"/>
- <result property="createTime" column="create_time"/>
- <result property="modifiedId" column="modified_id"/>
- <result property="modifiedName" column="modified_name"/>
- <result property="updateTime" column="update_time"/>
- <result property="closeTime" column="close_time"/>
- <result property="isEnable" column="is_enable"/>
- <result property="openTime" column="open_time"/>
- <result property="noonbreakStart" column="noonbreak_start"/>
- <result property="noonbreakEnd" column="noonbreak_end"/>
- <result property="orgId" column="org_id"/>
- <result property="workOffTime" column="work_off_time"/>
- <result property="workTime" column="work_time"/>
- <result property="workTimeMonthId" column="work_time_month_id"/>
- <result property="ymdDate" column="ymd_date"/>
- <result property="ymdDay" column="ymd_day"/>
- <result property="ymdMonth" column="ymd_month"/>
- <result property="ymdQuarter" column="ymd_quarter"/>
- <result property="ymdWeek" column="ymd_week"/>
- <result property="ymdYear" column="ymd_year"/>
- <result property="ymdHalfyear" column="ymd_halfyear"/>
- <result property="isError" column="is_error"/>
- <result property="offDutyTime" column="off_duty_time"/>
- <result property="onDutyTime" column="on_duty_time"/>
- <result property="ymdHour" column="ymd_hour"/>
- <result property="ymdMinute" column="ymd_minute"/>
- <result property="isManual" column="is_manual"/>
- </resultMap>
- <sql id="selectSysWorkTimeVo">
- select id, create_time, modified_id, modified_name, update_time, close_time, is_enable, open_time, noonbreak_start, noonbreak_end, org_id, work_off_time, work_time, work_time_month_id, ymd_date, ymd_day, ymd_month, ymd_quarter, ymd_week, ymd_year, ymd_halfyear, is_error, off_duty_time, on_duty_time, ymd_hour, ymd_minute, is_manual
- from sys_work_time
- </sql>
- <select id="selectSysWorkTimeList" parameterType="com.xunmei.system.domain.SysWorkTime"
- resultMap="SysWorkTimeResult">
- <include refid="selectSysWorkTimeVo"/>
- <where>
- <if test="modifiedId != null ">
- and modified_id = #{modifiedId}
- </if>
- <if test="modifiedName != null and modifiedName != ''">
- and modified_name like concat('%', #{modifiedName}, '%')
- </if>
- <if test="closeTime != null and closeTime != ''">
- and close_time = #{closeTime}
- </if>
- <if test="isEnable != null ">
- and is_enable = #{isEnable}
- </if>
- <if test="openTime != null and openTime != ''">
- and open_time = #{openTime}
- </if>
- <if test="noonbreakStart != null and noonbreakStart != ''">
- and noonbreak_start = #{noonbreakStart}
- </if>
- <if test="noonbreakEnd != null and noonbreakEnd != ''">
- and noonbreak_end = #{noonbreakEnd}
- </if>
- <if test="orgId != null ">
- and org_id = #{orgId}
- </if>
- <if test="workOffTime != null and workOffTime != ''">
- and work_off_time = #{workOffTime}
- </if>
- <if test="workTime != null and workTime != ''">
- and work_time = #{workTime}
- </if>
- <if test="workTimeMonthId != null and workTimeMonthId != ''">
- and work_time_month_id = #{workTimeMonthId}
- </if>
- <if test="ymdDate != null ">
- and ymd_date = #{ymdDate}
- </if>
- <if test="ymdDay != null ">
- and ymd_day = #{ymdDay}
- </if>
- <if test="ymdMonth != null ">
- and ymd_month = #{ymdMonth}
- </if>
- <if test="ymdQuarter != null ">
- and ymd_quarter = #{ymdQuarter}
- </if>
- <if test="ymdWeek != null ">
- and ymd_week = #{ymdWeek}
- </if>
- <if test="ymdYear != null ">
- and ymd_year = #{ymdYear}
- </if>
- <if test="ymdHalfyear != null ">
- and ymd_halfyear = #{ymdHalfyear}
- </if>
- <if test="isError != null ">
- and is_error = #{isError}
- </if>
- <if test="offDutyTime != null ">
- and off_duty_time = #{offDutyTime}
- </if>
- <if test="onDutyTime != null ">
- and on_duty_time = #{onDutyTime}
- </if>
- <if test="ymdHour != null ">
- and ymd_hour = #{ymdHour}
- </if>
- <if test="ymdMinute != null ">
- and ymd_minute = #{ymdMinute}
- </if>
- <if test="isManual != null ">
- and is_manual = #{isManual}
- </if>
- </where>
- </select>
- <select id="selectSysWorkTimeById" parameterType="String"
- resultMap="SysWorkTimeResult">
- <include refid="selectSysWorkTimeVo"/>
- where id = #{id}
- </select>
- <select id="selectByPage" resultType="com.xunmei.system.dto.SysWorkTimeDto">
- SELECT
- t.*,
- o.NAME as orgName
- FROM
- sys_work_time t
- LEFT JOIN sys_org o ON t.org_id = o.id
- ${ew.customSqlSegment}
- </select>
- <select id="findByOrgAndMonth" resultType="com.xunmei.system.domain.SysWorkTime">
- select *
- from sys_work_time
- where org_id = #{orgId}
- and ymd_date like concat(#{monthStr}, '%')
- </select>
- <select id="findByYmd" resultType="com.xunmei.system.domain.SysWorkTime">
- select * from sys_work_time where org_id in
- <foreach item="orgId" collection="list" open="(" separator="," close=")">
- #{orgId}
- </foreach>
- and ymd_date=#{date}
- </select>
- <insert id="insertSysWorkTime" parameterType="com.xunmei.system.domain.SysWorkTime">
- insert into sys_work_time
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,
- </if>
- <if test="createTime != null">create_time,
- </if>
- <if test="modifiedId != null">modified_id,
- </if>
- <if test="modifiedName != null">modified_name,
- </if>
- <if test="updateTime != null">update_time,
- </if>
- <if test="closeTime != null">close_time,
- </if>
- <if test="isEnable != null">is_enable,
- </if>
- <if test="openTime != null">open_time,
- </if>
- <if test="noonbreakStart != null">noonbreak_start,
- </if>
- <if test="noonbreakEnd != null">noonbreak_end,
- </if>
- <if test="orgId != null">org_id,
- </if>
- <if test="workOffTime != null">work_off_time,
- </if>
- <if test="workTime != null">work_time,
- </if>
- <if test="workTimeMonthId != null">work_time_month_id,
- </if>
- <if test="ymdDate != null">ymd_date,
- </if>
- <if test="ymdDay != null">ymd_day,
- </if>
- <if test="ymdMonth != null">ymd_month,
- </if>
- <if test="ymdQuarter != null">ymd_quarter,
- </if>
- <if test="ymdWeek != null">ymd_week,
- </if>
- <if test="ymdYear != null">ymd_year,
- </if>
- <if test="ymdHalfyear != null">ymd_halfyear,
- </if>
- <if test="isError != null">is_error,
- </if>
- <if test="offDutyTime != null">off_duty_time,
- </if>
- <if test="onDutyTime != null">on_duty_time,
- </if>
- <if test="ymdHour != null">ymd_hour,
- </if>
- <if test="ymdMinute != null">ymd_minute,
- </if>
- <if test="isManual != null">is_manual,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},
- </if>
- <if test="createTime != null">#{createTime},
- </if>
- <if test="modifiedId != null">#{modifiedId},
- </if>
- <if test="modifiedName != null">#{modifiedName},
- </if>
- <if test="updateTime != null">#{updateTime},
- </if>
- <if test="closeTime != null">#{closeTime},
- </if>
- <if test="isEnable != null">#{isEnable},
- </if>
- <if test="openTime != null">#{openTime},
- </if>
- <if test="noonbreakStart != null">#{noonbreakStart},
- </if>
- <if test="noonbreakEnd != null">#{noonbreakEnd},
- </if>
- <if test="orgId != null">#{orgId},
- </if>
- <if test="workOffTime != null">#{workOffTime},
- </if>
- <if test="workTime != null">#{workTime},
- </if>
- <if test="workTimeMonthId != null">#{workTimeMonthId},
- </if>
- <if test="ymdDate != null">#{ymdDate},
- </if>
- <if test="ymdDay != null">#{ymdDay},
- </if>
- <if test="ymdMonth != null">#{ymdMonth},
- </if>
- <if test="ymdQuarter != null">#{ymdQuarter},
- </if>
- <if test="ymdWeek != null">#{ymdWeek},
- </if>
- <if test="ymdYear != null">#{ymdYear},
- </if>
- <if test="ymdHalfyear != null">#{ymdHalfyear},
- </if>
- <if test="isError != null">#{isError},
- </if>
- <if test="offDutyTime != null">#{offDutyTime},
- </if>
- <if test="onDutyTime != null">#{onDutyTime},
- </if>
- <if test="ymdHour != null">#{ymdHour},
- </if>
- <if test="ymdMinute != null">#{ymdMinute},
- </if>
- <if test="isManual != null">#{isManual},
- </if>
- </trim>
- </insert>
- <update id="updateSysWorkTime" parameterType="com.xunmei.system.domain.SysWorkTime">
- update sys_work_time
- <trim prefix="SET" suffixOverrides=",">
- <if test="createTime != null">create_time =
- #{createTime},
- </if>
- <if test="modifiedId != null">modified_id =
- #{modifiedId},
- </if>
- <if test="modifiedName != null">modified_name =
- #{modifiedName},
- </if>
- <if test="updateTime != null">update_time =
- #{updateTime},
- </if>
- <if test="closeTime != null">close_time =
- #{closeTime},
- </if>
- <if test="isEnable != null">is_enable =
- #{isEnable},
- </if>
- <if test="openTime != null">open_time =
- #{openTime},
- </if>
- <if test="noonbreakStart != null">noonbreak_start =
- #{noonbreakStart},
- </if>
- <if test="noonbreakEnd != null">noonbreak_end =
- #{noonbreakEnd},
- </if>
- <if test="orgId != null">org_id =
- #{orgId},
- </if>
- <if test="workOffTime != null">work_off_time =
- #{workOffTime},
- </if>
- <if test="workTime != null">work_time =
- #{workTime},
- </if>
- <if test="workTimeMonthId != null">work_time_month_id =
- #{workTimeMonthId},
- </if>
- <if test="ymdDate != null">ymd_date =
- #{ymdDate},
- </if>
- <if test="ymdDay != null">ymd_day =
- #{ymdDay},
- </if>
- <if test="ymdMonth != null">ymd_month =
- #{ymdMonth},
- </if>
- <if test="ymdQuarter != null">ymd_quarter =
- #{ymdQuarter},
- </if>
- <if test="ymdWeek != null">ymd_week =
- #{ymdWeek},
- </if>
- <if test="ymdYear != null">ymd_year =
- #{ymdYear},
- </if>
- <if test="ymdHalfyear != null">ymd_halfyear =
- #{ymdHalfyear},
- </if>
- <if test="isError != null">is_error =
- #{isError},
- </if>
- <if test="offDutyTime != null">off_duty_time =
- #{offDutyTime},
- </if>
- <if test="onDutyTime != null">on_duty_time =
- #{onDutyTime},
- </if>
- <if test="ymdHour != null">ymd_hour =
- #{ymdHour},
- </if>
- <if test="ymdMinute != null">ymd_minute =
- #{ymdMinute},
- </if>
- <if test="isManual != null">is_manual =
- #{isManual},
- </if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteSysWorkTimeById" parameterType="String">
- delete
- from sys_work_time where id = #{id}
- </delete>
- <delete id="deleteSysWorkTimeByIds" parameterType="String">
- delete from sys_work_time where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|