فهرست منبع

修改标签名称

wangyangyang 4 سال پیش
والد
کامیت
4bc6fa5576
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      sms_water/src/main/resources/mapper/MonitorInfoMapper.xml

+ 2 - 1
sms_water/src/main/resources/mapper/MonitorInfoMapper.xml

@@ -31,7 +31,7 @@
          a.scene_id as "sceneId" ,
          a.device_id as "deviceId" ,
          a.attribute_id as "attributeId" ,
-         a.monitor_name as "monitorName" ,
+         case when a.monitor_type=0 then IFNULL(d.remark,a.monitor_name) else  a.monitor_name end as "monitorName" ,
          a.image_type as "imageType" ,
          a.monitor_type as "monitorType" ,
          a.point_left as "pointLeft" ,
@@ -49,6 +49,7 @@
      </sql>
     <sql id="leftJoins">
           LEFT JOIN sms_device b on a.DEVICE_ID=b.ID
+          left join sms_device_parm d on d.DEVICE_ID=a.DEVICE_ID and d.ATTRIBUTE_ID = a.ATTRIBUTE_ID and  d.`STATUS`=1
     </sql>
     <!--  根据主键获取实体   -->
     <select id="findMonitorInfoById" resultType="com.huaxu.entity.MonitorInfoEntity">