<?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.rongwei.bscommon.sys.dao.QuShiftDetailDao">
  <resultMap id="BaseResultMap" type="com.rongwei.bsentity.domin.QuShiftDetailDo">
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="TENANTID" jdbcType="VARCHAR" property="tenantid" />
    <result column="ROPTION" jdbcType="VARCHAR" property="roption" />
    <result column="DELETED" jdbcType="VARCHAR" property="deleted" />
    <result column="REMARK" jdbcType="VARCHAR" property="remark" />
    <result column="CREATEDATE" jdbcType="TIMESTAMP" property="createdate" />
    <result column="CREATEUSERID" jdbcType="VARCHAR" property="createuserid" />
    <result column="MODIFYDATE" jdbcType="TIMESTAMP" property="modifydate" />
    <result column="MODIFYUSERID" jdbcType="VARCHAR" property="modifyuserid" />
    <result column="CREATEUSERNAME" jdbcType="VARCHAR" property="createusername" />
    <result column="MODIFYUSERNAME" jdbcType="VARCHAR" property="modifyusername" />
    <result column="SHIFTID" jdbcType="VARCHAR" property="shiftid" />
    <result column="DAYNUM" jdbcType="INTEGER" property="daynum" />
    <result column="FORESHIFT" jdbcType="VARCHAR" property="foreshift" />
    <result column="MIDDLESHIFT" jdbcType="VARCHAR" property="middleshift" />
    <result column="NIGHTSHIFT" jdbcType="VARCHAR" property="nightshift" />
    <result column="RESTSHIFT" jdbcType="VARCHAR" property="restshift" />
  </resultMap>
  <sql id="Base_Column_List">
    ID, TENANTID, ROPTION, DELETED, REMARK, CREATEDATE, CREATEUSERID, MODIFYDATE, MODIFYUSERID, 
    CREATEUSERNAME, MODIFYUSERNAME, SHIFTID, DAYNUM, FORESHIFT, MIDDLESHIFT, NIGHTSHIFT, 
    RESTSHIFT
  </sql>

  <delete id="deleteByShiftId">
    delete from qu_shift_detail
      <where>
          <if test="shiftIds != null and shiftIds.size() >0">
              SHIFTID IN
              <foreach collection="shiftIds" item="id" separator="," open="(" close=")">
                  #{id}
              </foreach>
          </if>
      </where>
  </delete>
</mapper>
