|
...
|
...
|
@@ -165,6 +165,7 @@ public class UserInfoAlarmController extends BaseController { |
|
|
|
|
|
|
|
@ApiOperation("更新告警通知渠道配置")
|
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(value = "离线通知渠道(iot_alert_notice_channel表的id集合,多个英文逗号分割)",name = "online_channels"),
|
|
|
|
@ApiImplicitParam(value = "通知渠道(iot_alert_notice_channel表的id集合,多个英文逗号分割)",name = "channels"),
|
|
|
|
@ApiImplicitParam(value = "告警id集合(关联iot_alert和iot_alert_user表的id,多个英文逗号分割,*表示所有)",name = "alert_ids"),
|
|
|
|
@ApiImplicitParam(value = "主键id",name = "id"),
|
|
...
|
...
|
@@ -172,18 +173,20 @@ public class UserInfoAlarmController extends BaseController { |
|
|
|
@Log(title = "更新告警通知渠道配置", businessType = BusinessType.UPDATE)
|
|
|
|
@Transactional
|
|
|
|
@PostMapping(value = "upIotAlertUserNotice/{id}")
|
|
|
|
public AjaxResult upIotAlertUserNotice(@PathVariable Integer id,String channels, String alert_ids)
|
|
|
|
public AjaxResult upIotAlertUserNotice(@PathVariable Integer id,String channels, String alert_ids,String online_channels)
|
|
|
|
{
|
|
|
|
IotAlertUserNotice iotAlertUserNotice = new IotAlertUserNotice();
|
|
|
|
iotAlertUserNotice.setId(id);
|
|
|
|
iotAlertUserNotice.setChannels(channels);
|
|
|
|
iotAlertUserNotice.setAlert_ids(alert_ids);
|
|
|
|
iotAlertUserNotice.setOnline_channels(online_channels);
|
|
|
|
int i = publicService.updateObject(iotAlertUserNotice,"id");
|
|
|
|
return AjaxResult.success(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("更新指定产品的告警通知渠道配置")
|
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(value = "离线通知渠道(iot_alert_notice_channel表的id集合,多个英文逗号分割)",name = "online_channels"),
|
|
|
|
@ApiImplicitParam(value = "通知渠道(iot_alert_notice_channel表的id集合,多个英文逗号分割)",name = "channels"),
|
|
|
|
@ApiImplicitParam(value = "告警id集合(关联iot_alert和iot_alert_user表的id,多个英文逗号分割,*表示所有)",name = "alert_ids"),
|
|
|
|
@ApiImplicitParam(value = "主键id",name = "id"),
|
|
...
|
...
|
@@ -192,7 +195,7 @@ public class UserInfoAlarmController extends BaseController { |
|
|
|
@Log(title = "更新指定产品的告警通知渠道配置", businessType = BusinessType.UPDATE)
|
|
|
|
@Transactional
|
|
|
|
@PostMapping(value = "upIotAlertUserNoticeByProduct/{id}/{product_id}")
|
|
|
|
public AjaxResult upIotAlertUserNoticeByProduct(@PathVariable Integer id,@PathVariable Long product_id,String channels, String alert_ids)
|
|
|
|
public AjaxResult upIotAlertUserNoticeByProduct(@PathVariable Integer id,@PathVariable Long product_id,String channels, String alert_ids,String online_channels)
|
|
|
|
{
|
|
|
|
IotAlertUserNotice iotAlertUserNotice = publicService.getObject(IotAlertUserNotice.class,"id",id+"");
|
|
|
|
|
|
...
|
...
|
@@ -219,6 +222,10 @@ public class UserInfoAlarmController extends BaseController { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(online_channels))
|
|
|
|
{
|
|
|
|
uPiotAlertUserNotice.setOnline_channels(online_channels);
|
|
|
|
}
|
|
|
|
int upi = 0;
|
|
|
|
if(StringUtils.isNotEmpty(uPiotAlertUserNotice.getChannels()) || StringUtils.isNotEmpty(uPiotAlertUserNotice.getAlert_ids()))
|
|
|
|
{
|
...
|
...
|
|