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