yang_shj
1 year ago
3 changed files with 38 additions and 2 deletions
@ -0,0 +1,36 @@ |
|||||||
|
package com.hnac.hzims.alarm.monitor.controller; |
||||||
|
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import com.hnac.hzims.alarm.entity.AlarmEntity; |
||||||
|
import com.hnac.hzims.alarm.monitor.service.AlarmSaveService; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.boot.ctrl.BladeController; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ysj |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/alarm/test") |
||||||
|
@Api(value = "告警配置", tags = "告警配置") |
||||||
|
public class AlarmTestController extends BladeController { |
||||||
|
|
||||||
|
private final AlarmSaveService alarmSaveService; |
||||||
|
|
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "新增告警", notes = "传入AlarmConfigEntity对象") |
||||||
|
public R save(@RequestBody List<AlarmEntity> entitys) { |
||||||
|
return R.status(alarmSaveService.save(entitys)); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue