Bladeren bron

预警规则 保存

master
bovenliggende
commit
f7544931be
1 gewijzigde bestanden met toevoegingen van 42 en 0 verwijderingen
  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 Bestand weergeven

@@ -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);
}
}

Laden…
Annuleren
Opslaan