package com.ningdatech.carapi.driver.controller;


import com.ningdatech.basic.model.PageVo;
import com.ningdatech.carapi.driver.manage.DriverBlackListManage;
import com.ningdatech.carapi.driver.model.po.ReqDriverBlackListSearchPO;
import com.ningdatech.carapi.driver.model.vo.ResDriverBlackListVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author LiuXinXin
 * @since 2022-10-09
 */
@RequestMapping("/api/v1/driver/black-list")
@RestController
@Api(tags = "驾驶员管理-黑名单列表")
@Validated
@RequiredArgsConstructor
public class DriverBlackListController {

    private final DriverBlackListManage driverBlackListManage;

    @PostMapping("/search")
    @ApiOperation("黑名单列表查询")
    public PageVo<ResDriverBlackListVO> driverBlackListSearch(@Valid @RequestBody ReqDriverBlackListSearchPO po) {
        return driverBlackListManage.driverBlackListSearch(po);
    }

}
