<?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="cn.flightfeather.supervision.domain.mapper.EnvironmentalScheduleMapper" >
|
<resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.EnvironmentalSchedule" >
|
<!--
|
WARNING - @mbg.generated
|
-->
|
<id column="SC_ID" property="scId" jdbcType="INTEGER" />
|
<result column="SC_Title" property="scTitle" jdbcType="VARCHAR" />
|
<result column="SC_Step_Name" property="scStepName" jdbcType="VARCHAR" />
|
<result column="SC_Type" property="scType" jdbcType="TINYINT" />
|
<result column="SC_Type_Name" property="scTypeName" jdbcType="VARCHAR" />
|
<result column="SC_Period_Type" property="scPeriodType" jdbcType="TINYINT" />
|
<result column="SC_Period_Type_Name" property="scPeriodTypeName" jdbcType="VARCHAR" />
|
<result column="SC_Every_Week" property="scEveryWeek" jdbcType="VARCHAR" />
|
<result column="SC_Every_Month" property="scEveryMonth" jdbcType="VARCHAR" />
|
<result column="SC_Every_Year" property="scEveryYear" jdbcType="VARCHAR" />
|
<result column="SC_Effective_Time" property="scEffectiveTime" jdbcType="TIMESTAMP" />
|
<result column="SC_User_ID" property="scUserId" jdbcType="VARCHAR" />
|
<result column="SC_User_Config_Id" property="scUserConfigId" jdbcType="INTEGER" />
|
<result column="SC_Scene_Type" property="scSceneType" jdbcType="INTEGER" />
|
<result column="SC_Need_Sign" property="scNeedSign" jdbcType="BIT" />
|
</resultMap>
|
<resultMap id="ResultMapWithBLOBs" type="cn.flightfeather.supervision.domain.entity.EnvironmentalSchedule" extends="BaseResultMap" >
|
<!--
|
WARNING - @mbg.generated
|
-->
|
<result column="SC_Content" property="scContent" jdbcType="LONGVARCHAR" />
|
<result column="SC_Step_Detail" property="scStepDetail" jdbcType="LONGVARCHAR" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
<!--
|
WARNING - @mbg.generated
|
-->
|
SC_ID, SC_Title, SC_Step_Name, SC_Type, SC_Type_Name, SC_Period_Type, SC_Period_Type_Name,
|
SC_Every_Week, SC_Every_Month, SC_Every_Year, SC_Effective_Time, SC_User_ID, SC_User_Config_Id,
|
SC_Scene_Type, SC_Need_Sign
|
</sql>
|
<sql id="Blob_Column_List" >
|
<!--
|
WARNING - @mbg.generated
|
-->
|
SC_Content, SC_Step_Detail
|
</sql>
|
|
<select id="getSchedules" resultMap="ResultMapWithBLOBs">
|
SELECT
|
*
|
FROM
|
ea_t_schedule
|
WHERE
|
(SC_User_ID = '${param1}'
|
OR (
|
SC_User_Config_Id in
|
<foreach collection="param2" index="index" item="item" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
AND (
|
SC_Scene_Type = '${param3}'
|
OR SC_Scene_Type IS NULL
|
)
|
)
|
OR (
|
SC_User_ID IS NULL
|
AND SC_User_Config_Id IS NULL
|
AND SC_Scene_Type IS NULL
|
))
|
<if test="param4 != null">
|
AND SC_Type = ${param4}
|
</if>
|
</select>
|
</mapper>
|