Bläddra i källkod

预警规则 保存

tags/24080901
förälder
incheckning
618b4c47de
1 ändrade filer med 42 tillägg och 0 borttagningar
  1. +42
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java

+ 42
- 0
pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java Visa fil

@@ -0,0 +1,42 @@
package com.ningdatech.pmapi.sys.controller;

import com.ningdatech.log.annotation.WebLog;
import com.wflow.bean.dto.WflowEarlyWarningDTO;
import com.wflow.bean.vo.WflowEarlyWarningVO;
import com.wflow.service.IEarlyWarningService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
* @Classname EarlyWarningController
* @Description
* @Date 2023/8/01 14:28
* @Author PoffyZhang
*/
@Slf4j
@Validated
@RestController
@RequestMapping("/api/v1/sys/early-warning")
@Api(value = "EarlyWarning", tags = "系统管理-预警规则")
@RequiredArgsConstructor
public class EarlyWarningController {

private final IEarlyWarningService earlyWarningService;

@ApiOperation(value = "预警规则获取", notes = "预警规则获取")
@GetMapping("/detail/{regionCode}")
public WflowEarlyWarningVO detail(@PathVariable String regionCode) {
return earlyWarningService.detailByRegion(regionCode);
}

@ApiOperation(value = "预警规则保存", notes = "预警规则保存")
@PostMapping("/save")
@WebLog("预警规则保存")
public String save(@Validated @RequestBody WflowEarlyWarningDTO dto) {
return earlyWarningService.saveByDto(dto);
}
}

Laddar…
Avbryt
Spara