|
|
@ -24,6 +24,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="fenceField" column="fence_field" />
|
|
|
|
<result property="fenceField" column="fence_field" />
|
|
|
|
<result property="sceneName" column="scene_name" />
|
|
|
|
<result property="sceneName" column="scene_name" />
|
|
|
|
|
|
|
|
<result property="deviceModeName" column="device_mode_name" />
|
|
|
|
|
|
|
|
<result property="deviceName" column="device_name" />
|
|
|
|
|
|
|
|
<result property="deviceModeId" column="device_mode_id" />
|
|
|
|
|
|
|
|
<result property="deviceId" column="device_id" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="HwElectronicFenceHwFenceTargetResult" type="HwElectronicFence" extends="HwElectronicFenceResult">
|
|
|
|
<resultMap id="HwElectronicFenceHwFenceTargetResult" type="HwElectronicFence" extends="HwElectronicFenceResult">
|
|
|
@ -37,7 +41,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectHwElectronicFenceVo">
|
|
|
|
<sql id="selectHwElectronicFenceVo">
|
|
|
|
select electronic_fence_id, electronic_fence_name, tenant_id, scene_id, fence_type, effective_time_flag, time_zone, effective_time, trigger_status, fence_push_flag, fence_push_content, fence_recover_content, remark, create_by, create_time, update_by, update_time, fence_field from hw_electronic_fence
|
|
|
|
select hwf.electronic_fence_id,
|
|
|
|
|
|
|
|
hwf.electronic_fence_name,
|
|
|
|
|
|
|
|
hwf.tenant_id,
|
|
|
|
|
|
|
|
hwf.scene_id,
|
|
|
|
|
|
|
|
hwf.fence_type,
|
|
|
|
|
|
|
|
hwf.effective_time_flag,
|
|
|
|
|
|
|
|
hwf.time_zone,
|
|
|
|
|
|
|
|
hwf.effective_time,
|
|
|
|
|
|
|
|
hwf.trigger_status,
|
|
|
|
|
|
|
|
hwf.fence_push_flag,
|
|
|
|
|
|
|
|
hwf.fence_push_content,
|
|
|
|
|
|
|
|
hwf.fence_recover_content,
|
|
|
|
|
|
|
|
hwf.remark,
|
|
|
|
|
|
|
|
hwf.create_by,
|
|
|
|
|
|
|
|
hwf.create_time,
|
|
|
|
|
|
|
|
hwf.update_by,
|
|
|
|
|
|
|
|
hwf.update_time,
|
|
|
|
|
|
|
|
hwf.fence_field,
|
|
|
|
|
|
|
|
hdm.device_mode_name,
|
|
|
|
|
|
|
|
hd.device_name,
|
|
|
|
|
|
|
|
hwf.device_mode_id,
|
|
|
|
|
|
|
|
hwf.device_id
|
|
|
|
|
|
|
|
from hw_electronic_fence hwf
|
|
|
|
|
|
|
|
left join hw_device_model hdm on hdm.device_mode_id = hwf.device_mode_id
|
|
|
|
|
|
|
|
left join hw_device hd on hd.device_id = hwf.device_id
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectHwElectronicFenceList" parameterType="HwElectronicFence" resultMap="HwElectronicFenceResult">
|
|
|
|
<select id="selectHwElectronicFenceList" parameterType="HwElectronicFence" resultMap="HwElectronicFenceResult">
|
|
|
@ -45,17 +73,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
trigger_status !='9'
|
|
|
|
trigger_status !='9'
|
|
|
|
<if test="electronicFenceName != null and electronicFenceName != ''"> and electronic_fence_name like concat('%', #{electronicFenceName}, '%')</if>
|
|
|
|
<if test="electronicFenceName != null and electronicFenceName != ''"> and electronic_fence_name like concat('%', #{electronicFenceName}, '%')</if>
|
|
|
|
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
|
|
|
|
<if test="tenantId != null "> and hwf.tenant_id = #{tenantId}</if>
|
|
|
|
<if test="sceneId != null "> and scene_id = #{sceneId}</if>
|
|
|
|
<if test="sceneId != null "> and hwf.scene_id = #{sceneId}</if>
|
|
|
|
<if test="fenceType != null and fenceType != ''"> and fence_type = #{fenceType}</if>
|
|
|
|
<if test="fenceType != null and fenceType != ''"> and hwf.fence_type = #{fenceType}</if>
|
|
|
|
<if test="effectiveTimeFlag != null and effectiveTimeFlag != ''"> and effective_time_flag = #{effectiveTimeFlag}</if>
|
|
|
|
<if test="effectiveTimeFlag != null and effectiveTimeFlag != ''"> and hwf.effective_time_flag = #{effectiveTimeFlag}</if>
|
|
|
|
<if test="timeZone != null and timeZone != ''"> and time_zone = #{timeZone}</if>
|
|
|
|
<if test="timeZone != null and timeZone != ''"> and hwf.time_zone = #{timeZone}</if>
|
|
|
|
<if test="effectiveTime != null and effectiveTime != ''"> and effective_time = #{effectiveTime}</if>
|
|
|
|
<if test="effectiveTime != null and effectiveTime != ''"> and hwf.effective_time = #{effectiveTime}</if>
|
|
|
|
<if test="triggerStatus != null and triggerStatus != ''"> and trigger_status = #{triggerStatus}</if>
|
|
|
|
<if test="triggerStatus != null and triggerStatus != ''"> and hwf.trigger_status = #{triggerStatus}</if>
|
|
|
|
<if test="fencePushFlag != null and fencePushFlag != ''"> and fence_push_flag = #{fencePushFlag}</if>
|
|
|
|
<if test="fencePushFlag != null and fencePushFlag != ''"> and hwf.fence_push_flag = #{fencePushFlag}</if>
|
|
|
|
<if test="fencePushContent != null and fencePushContent != ''"> and fence_push_content = #{fencePushContent}</if>
|
|
|
|
<if test="fencePushContent != null and fencePushContent != ''"> and hwf.fence_push_content = #{fencePushContent}</if>
|
|
|
|
<if test="fenceRecoverContent != null and fenceRecoverContent != ''"> and fence_recover_content = #{fenceRecoverContent}</if>
|
|
|
|
<if test="fenceRecoverContent != null and fenceRecoverContent != ''"> and hwf.fence_recover_content = #{fenceRecoverContent}</if>
|
|
|
|
<if test="fenceField != null and fenceField != ''"> and fence_field = #{fenceField}</if>
|
|
|
|
<if test="fenceField != null and fenceField != ''"> and hwf.fence_field = #{fenceField}</if>
|
|
|
|
|
|
|
|
<if test="deviceModeName != null and deviceModeName != ''"> and hdm.device_mode_name = #{deviceModeName}</if>
|
|
|
|
|
|
|
|
<if test="deviceName != null and deviceName != ''"> and hd.device_name = #{deviceName}</if>
|
|
|
|
|
|
|
|
<if test="deviceModeId != null "> and hwf.device_mode_id = #{deviceModeId}</if>
|
|
|
|
|
|
|
|
<if test="deviceId != null "> and hwf.device_id = #{deviceId}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
@ -87,6 +119,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
<if test="fenceField != null">fence_field,</if>
|
|
|
|
<if test="fenceField != null">fence_field,</if>
|
|
|
|
|
|
|
|
<if test="deviceModeId != null">device_mode_id,</if>
|
|
|
|
|
|
|
|
<if test="deviceId != null">device_id,</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="electronicFenceName != null and electronicFenceName != ''">#{electronicFenceName},</if>
|
|
|
|
<if test="electronicFenceName != null and electronicFenceName != ''">#{electronicFenceName},</if>
|
|
|
@ -106,6 +140,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
<if test="fenceField != null">#{fenceField},</if>
|
|
|
|
<if test="fenceField != null">#{fenceField},</if>
|
|
|
|
|
|
|
|
<if test="deviceModeId != null">#{deviceModeId},</if>
|
|
|
|
|
|
|
|
<if test="deviceId != null">#{deviceId},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
@ -129,6 +165,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
<if test="fenceField != null">fence_field = #{fenceField},</if>
|
|
|
|
<if test="fenceField != null">fence_field = #{fenceField},</if>
|
|
|
|
|
|
|
|
<if test="deviceModeId != null">device_mode_id = #{deviceModeId},</if>
|
|
|
|
|
|
|
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
where electronic_fence_id = #{electronicFenceId}
|
|
|
|
where electronic_fence_id = #{electronicFenceId}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|