|
@@ -114,9 +114,10 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="pageByAdminName" resultType="com.xy.dto.DeviceInfoDto$ListByAdminName">
|
|
|
- SELECT d.device_id, d.device_name, p.admin_name, d.device_type
|
|
|
+ SELECT d.device_id, d.device_name, p.admin_name, d.device_type,p.region_name,p.place_name,m.name as merc_name
|
|
|
FROM device_info d
|
|
|
left join merc_place p on p.id = d.place_id
|
|
|
+ left join merc m on m.id = d.merc_id
|
|
|
<where>
|
|
|
and d.merc_id = #{dto.mercId}
|
|
|
and d.active_state = 1
|
|
@@ -129,6 +130,18 @@
|
|
|
<if test="dto.searchKey != null and dto.searchKey != ''">
|
|
|
and CONCAT(IFNULL(d.device_name, ''), IFNULL(p.admin_name, '')) like CONCAT('%', #{dto.searchKey}, '%')
|
|
|
</if>
|
|
|
+ <if test="dto.deviceType != null">
|
|
|
+ and d.device_type = #{dto.deviceType}
|
|
|
+ </if>
|
|
|
+ <if test="dto.placeId != null">
|
|
|
+ and d.place_id = #{dto.placeId}
|
|
|
+ </if>
|
|
|
+ <if test="dto.deviceId != null">
|
|
|
+ and d.device_id = #{dto.deviceId}
|
|
|
+ </if>
|
|
|
+ <if test="dto.regionName != null and dto.regionName != ''">
|
|
|
+ and p.region_name = #{dto.regionName}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
order by p.admin_name asc,d.device_id desc
|
|
|
</select>
|