fix:()补全swagger接口文档
parent
b9c4334cb5
commit
875391757f
|
@ -5,6 +5,9 @@ import javax.annotation.Resource;
|
|||
import com.muyu.common.domain.WarnStrategy;
|
||||
import com.muyu.common.domain.req.WarnStrategyReq;
|
||||
import com.muyu.server.service.WarnStrategyService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
|
@ -23,6 +26,8 @@ import com.muyu.common.core.domain.Result;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/strategy")
|
||||
@Log4j2
|
||||
@Tag(name = "预警策略管理",description = "预警策略管理")
|
||||
public class WarnStrategyController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
|
@ -32,6 +37,7 @@ public class WarnStrategyController extends BaseController
|
|||
* 查询预警策略列表
|
||||
*/
|
||||
@PostMapping("/selectWarnStrategyList")
|
||||
@Operation(summary = "预警策略列表",description = "预警策略列表")
|
||||
public Result selectWarnStrategyList(@RequestBody WarnStrategyReq warnStrategyReq)
|
||||
{
|
||||
return Result.success(warnStrategyService.selectWarnStrategyList(warnStrategyReq));
|
||||
|
@ -42,6 +48,7 @@ public class WarnStrategyController extends BaseController
|
|||
* 获取预警策略详细信息
|
||||
*/
|
||||
@GetMapping( "selectById/{id}")
|
||||
@Operation(summary = "预警策略详细信息",description = "预警策略详细信息")
|
||||
public Result selectById(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(warnStrategyService.selectWarnStrategyById(id));
|
||||
|
@ -51,6 +58,7 @@ public class WarnStrategyController extends BaseController
|
|||
* 新增预警策略
|
||||
*/
|
||||
@PostMapping("/addWarnStrategy")
|
||||
@Operation(summary = "预警策略添加",description = "预警策略添加")
|
||||
public Result addWarnStrategy(@RequestBody WarnStrategy warnStrategy)
|
||||
{
|
||||
Integer i = warnStrategyService.addWarnStrategy(warnStrategy);
|
||||
|
@ -61,6 +69,7 @@ public class WarnStrategyController extends BaseController
|
|||
* 修改预警策略
|
||||
*/
|
||||
@PostMapping("/updWarnStrategy")
|
||||
@Operation(summary = "预警策略修改",description = "预警策略修改")
|
||||
public Result updWarnStrategy(@RequestBody WarnStrategy warnStrategy)
|
||||
{
|
||||
Integer i = warnStrategyService.updWarnStrategy(warnStrategy);
|
||||
|
@ -71,6 +80,7 @@ public class WarnStrategyController extends BaseController
|
|||
* 删除预警策略
|
||||
*/
|
||||
@DeleteMapping("deleteWarnStrategy/{id}")
|
||||
@Operation(summary = "预警策略删除",description = "预警策略删除")
|
||||
public Result deleteWarnStrategy(@PathVariable("id") Long id)
|
||||
{
|
||||
Integer i = warnStrategyService.deleteWarnStrategy(id);
|
||||
|
@ -83,6 +93,7 @@ public class WarnStrategyController extends BaseController
|
|||
* 根据车辆类型ID查询策略
|
||||
*/
|
||||
@GetMapping("/selectListByCarType/{carTypeId}")
|
||||
@Operation(summary = "根据车辆类型ID查询策略",description = "根据车辆类型ID查询策略")
|
||||
public Result selectListByCarType(@PathVariable("carTypeId") Long carTypeId) {
|
||||
return Result.success(warnStrategyService.selectListByCarType(carTypeId));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue