yang_shj
1 year ago
2 changed files with 19 additions and 56 deletions
@ -1,47 +0,0 @@
|
||||
package com.hnac.hzims.alarm.show.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.alarm.entity.AlarmEntity; |
||||
import com.hnac.hzims.alarm.show.service.AlarmService; |
||||
import com.hnac.hzims.alarm.vo.AlarmCountVo; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/alarm/show") |
||||
@Api(value = "告警配置", tags = "告警配置") |
||||
public class AlarmController extends BladeController { |
||||
|
||||
private final AlarmService alarmService; |
||||
|
||||
@PostMapping("/alarms") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "告警列表分页", notes = "传入: AlarmConfigEntity对象,分页参数") |
||||
public R<IPage<AlarmEntity>> alarms(@ApiIgnore @RequestParam AlarmEntity alarm, Query query) { |
||||
return R.data(alarmService.alarms(alarm,Condition.getPage(query))); |
||||
} |
||||
|
||||
@PostMapping("/count") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "告警分类数量", notes = "不需要传入参数") |
||||
public R<List<AlarmCountVo>> counts() { |
||||
return R.data(alarmService.counts()); |
||||
} |
||||
} |
Loading…
Reference in new issue