Commit 8320a55c by hayden

后台管理系统设备管理-设备信息:新增筛选条件门店、房间

parent c1ed7fee
...@@ -83,6 +83,9 @@ public class Device extends BaseEntity ...@@ -83,6 +83,9 @@ public class Device extends BaseEntity
/** 门店房间ID */ /** 门店房间ID */
private Long roomId; private Long roomId;
/** 门店ID */
private Long storeId;
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
...@@ -106,6 +109,8 @@ public class Device extends BaseEntity ...@@ -106,6 +109,8 @@ public class Device extends BaseEntity
.append("gatewayId", getGatewayId()) .append("gatewayId", getGatewayId())
.append("voltage", getVoltage()) .append("voltage", getVoltage())
.append("signalValue", getSignalValue()) .append("signalValue", getSignalValue())
.append("roomId", getRoomId())
.append("storeId", getStoreId())
.toString(); .toString();
} }
} }
...@@ -35,23 +35,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -35,23 +35,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectDeviceList" parameterType="Device" resultMap="DeviceResult"> <select id="selectDeviceList" parameterType="Device" resultMap="DeviceResult">
<include refid="selectDeviceVo"/> select
t1.id,
t1.dev_name,
t1.dev_mac,
t1.dev_id,
t1.dev_psw,
t1.dev_ver,
t1.dev_type,
t1.projt_id,
t1.projt_psw,
t1.`group`,
t1.status,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.remark,
t1.dev_position,
t1.gateway_id,
t1.voltage,
t1.signal_value,
t1.room_id
from s_device t1
join s_room t2 on t1.room_id = t2.id
join s_store t3 on t2.store_id = t3.id
<where> <where>
<if test="devName != null and devName != ''"> and dev_name like concat('%', #{devName}, '%')</if> <if test="devName != null and devName != ''">and t1.dev_name like concat('%', #{devName}, '%')</if>
<if test="devMac != null and devMac != ''"> and dev_mac = #{devMac}</if> <if test="devMac != null and devMac != ''">and t1.dev_mac = #{devMac}</if>
<if test="devId != null and devId != ''"> and dev_id = #{devId}</if> <if test="devId != null and devId != ''">and t1.dev_id = #{devId}</if>
<if test="devPsw != null and devPsw != ''"> and dev_psw = #{devPsw}</if> <if test="devPsw != null and devPsw != ''">and t1.dev_psw = #{devPsw}</if>
<if test="devVer != null and devVer != ''"> and dev_ver = #{devVer}</if> <if test="devVer != null and devVer != ''">and t1.dev_ver = #{devVer}</if>
<if test="devType != null and devType != ''"> and dev_type = #{devType}</if> <if test="devType != null and devType != ''">and t1.dev_type = #{devType}</if>
<if test="projtId != null and projtId != ''"> and projt_id = #{projtId}</if> <if test="projtId != null and projtId != ''">and t1.projt_id = #{projtId}</if>
<if test="projtPsw != null and projtPsw != ''"> and projt_psw = #{projtPsw}</if> <if test="projtPsw != null and projtPsw != ''">and t1.projt_psw = #{projtPsw}</if>
<if test="group != null and group != ''"> and `group` = #{group}</if> <if test="group != null and group != ''">and `groupt1.` = #{group}</if>
<if test="status != null and status != ''"> and status = #{status}</if> <if test="status != null and status != ''">and t1.status = #{status}</if>
<if test="devPosition != null and devPosition != ''"> and dev_position = #{devPosition}</if> <if test="devPosition != null and devPosition != ''">and t1.dev_position = #{devPosition}</if>
<if test="gatewayId != null and gatewayId != ''"> and gateway_id = #{gatewayId}</if> <if test="gatewayId != null and gatewayId != ''">and t1.gateway_id = #{gatewayId}</if>
<if test="voltage != null and voltage != ''"> and voltage = #{voltage}</if> <if test="voltage != null and voltage != ''">and t1.voltage = #{voltage}</if>
<if test="signalValue != null and signalValue != ''"> and signal_value = #{signalValue}</if> <if test="signalValue != null and signalValue != ''">and t1.signal_value = #{signalValue}</if>
<if test="roomId != null"> and room_id = #{roomId}</if> <if test="roomId != null">and t1.room_id = #{roomId}</if>
<if test="storeId != null">and t3.id = #{storeId}</if>
</where> </where>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment