Browse Source

设备需要启用状态才可用

xucaiqin 2 years ago
parent
commit
fccf581aae

+ 6 - 0
iot-module/iot-module-manage/iot-module-manage-biz/src/main/java/com/middle/platform/manage/biz/mapper/IotProductMapper.java

@@ -32,6 +32,12 @@ public interface IotProductMapper extends BaseMapper<IotProduct> {
 
     List<IotProductDownVo> list();
 
+    /**
+     * 查询指定产品下的指定设备
+     * @param productKey 产品code
+     * @param deviceSn 设备sn
+     * @return
+     */
     ProductVo selectProduct(@Param("productKey") String productKey,@Param("deviceSn")String deviceSn);
 
     /**

+ 1 - 0
iot-module/iot-module-manage/iot-module-manage-biz/src/main/resources/mapper/IotProductMapper.xml

@@ -88,6 +88,7 @@
             <if test="deviceSn != null and deviceSn != ''">
                 and id.sn = #{deviceSn,jdbcType=VARCHAR}
             </if>
+            and id.enable_flag = 1
             and ip.del_flag = 0
         </where>
     </select>