change - hw_electronic_fence数据库由maxw加上device_mode_id和device_id,连表查询,修改相应mapper和do层

master
zangch 3 months ago committed by zch
parent 2267de6c0e
commit d5e8c950e8

@ -77,6 +77,43 @@ public class HwElectronicFence extends BaseEntity
private String alarmInfoFlag;//是否有报警信息关联标识
private String deviceModeName;
private String deviceName;
private Long deviceModeId;
private Long deviceId;
public String getDeviceModeName() {
return deviceModeName;
}
public void setDeviceModeName(String deviceModeName) {
this.deviceModeName = deviceModeName;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public Long getDeviceModeId() {
return deviceModeId;
}
public void setDeviceModeId(Long deviceModeId) {
this.deviceModeId = deviceModeId;
}
public Long getDeviceId() {
return deviceId;
}
public void setDeviceId(Long deviceId) {
this.deviceId = deviceId;
}
public void setElectronicFenceId(Long electronicFenceId)
{
this.electronicFenceId = electronicFenceId;
@ -259,6 +296,10 @@ public class HwElectronicFence extends BaseEntity
.append("updateTime", getUpdateTime())
.append("fenceField", getFenceField())
.append("hwFenceTargetList", getHwFenceTargetList())
.append("deviceModeName", getDeviceModeName())
.append("deviceName", getDeviceName())
.append("deviceModeId", getDeviceModeId())
.append("deviceId", getDeviceId())
.toString();
}
}

@ -24,6 +24,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="fenceField" column="fence_field" />
<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 id="HwElectronicFenceHwFenceTargetResult" type="HwElectronicFence" extends="HwElectronicFenceResult">
@ -37,7 +41,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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>
<select id="selectHwElectronicFenceList" parameterType="HwElectronicFence" resultMap="HwElectronicFenceResult">
@ -45,17 +73,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
trigger_status !='9'
<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="sceneId != null "> and scene_id = #{sceneId}</if>
<if test="fenceType != null and fenceType != ''"> and fence_type = #{fenceType}</if>
<if test="effectiveTimeFlag != null and effectiveTimeFlag != ''"> and effective_time_flag = #{effectiveTimeFlag}</if>
<if test="timeZone != null and timeZone != ''"> and time_zone = #{timeZone}</if>
<if test="effectiveTime != null and effectiveTime != ''"> and effective_time = #{effectiveTime}</if>
<if test="triggerStatus != null and triggerStatus != ''"> and trigger_status = #{triggerStatus}</if>
<if test="fencePushFlag != null and fencePushFlag != ''"> and fence_push_flag = #{fencePushFlag}</if>
<if test="fencePushContent != null and fencePushContent != ''"> and fence_push_content = #{fencePushContent}</if>
<if test="fenceRecoverContent != null and fenceRecoverContent != ''"> and fence_recover_content = #{fenceRecoverContent}</if>
<if test="fenceField != null and fenceField != ''"> and fence_field = #{fenceField}</if>
<if test="tenantId != null "> and hwf.tenant_id = #{tenantId}</if>
<if test="sceneId != null "> and hwf.scene_id = #{sceneId}</if>
<if test="fenceType != null and fenceType != ''"> and hwf.fence_type = #{fenceType}</if>
<if test="effectiveTimeFlag != null and effectiveTimeFlag != ''"> and hwf.effective_time_flag = #{effectiveTimeFlag}</if>
<if test="timeZone != null and timeZone != ''"> and hwf.time_zone = #{timeZone}</if>
<if test="effectiveTime != null and effectiveTime != ''"> and hwf.effective_time = #{effectiveTime}</if>
<if test="triggerStatus != null and triggerStatus != ''"> and hwf.trigger_status = #{triggerStatus}</if>
<if test="fencePushFlag != null and fencePushFlag != ''"> and hwf.fence_push_flag = #{fencePushFlag}</if>
<if test="fencePushContent != null and fencePushContent != ''"> and hwf.fence_push_content = #{fencePushContent}</if>
<if test="fenceRecoverContent != null and fenceRecoverContent != ''"> and hwf.fence_recover_content = #{fenceRecoverContent}</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>
</select>
@ -87,6 +119,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</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 prefix="values (" suffix=")" suffixOverrides=",">
<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="updateTime != null">#{updateTime},</if>
<if test="fenceField != null">#{fenceField},</if>
<if test="deviceModeId != null">#{deviceModeId},</if>
<if test="deviceId != null">#{deviceId},</if>
</trim>
</insert>
@ -129,6 +165,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</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>
where electronic_fence_id = #{electronicFenceId}
</update>

Loading…
Cancel
Save