Ver código fonte

通知:增加获取接收人列表

yf_zn 8 meses atrás
pai
commit
601fc27cd2

+ 9 - 0
src/main/java/com/yunfeiyun/agmp/iotm/web/controller/IotWarnreceiverController.java

@@ -42,6 +42,15 @@ public class IotWarnreceiverController extends BaseController{
     }
 
     /**
+     *根据配置查询接收人列表
+     */
+    @PreAuthorize("@ss.hasPermi('iot:warn:receiver:list')")
+    @GetMapping("/config/list")
+    public AjaxResult listByWcBid(String wcBid){
+        List<IotWarnreceiver> list = iotWarnreceiverService.selectIotWarnreceiversByWcBid(wcBid);
+        return AjaxResult.success(list);
+    }
+    /**
      * 导出告警接收者列表
      */
     @PreAuthorize("@ss.hasPermi('iot:warn:receiver:export')")

+ 3 - 2
src/main/resources/mapper/IotWarnreceiverMapper.xml

@@ -31,8 +31,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where wrBid = #{wrBid} and tid = #{tid}
     </select>
     <select id="selectIotWarnreceiversByWcBid" resultType="com.yunfeiyun.agmp.iot.common.domain.IotWarnreceiver">
-        SELECT *
-        FROM IotWarnreceiver
+        SELECT ic.*,su.userName FROM IotWarnreceiver ic
+                 left join SysUser su on ic.wruserId = su.userId
+
         WHERE wcBid = #{wcBid}
     </select>