package com.tofly.gpsboot.custom.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.common.core.entity.ResultRespone;
import com.tofly.gpsboot.custom.service.CustomCarTypeService;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@AllArgsConstructor
@RequestMapping("/cartype")
public class CustomCarTypeController {

    private final CustomCarTypeService customCarTypeService;

    @ApiOperation(tags="车辆类型管理接口",value = "根据设备编号模糊分页查询")
    @GetMapping("/namepage")
    public ResultRespone pageByCarTypeName(Page page ,String name){
        return ResultRespone.success(customCarTypeService.pageByName(page, name));
    }
}
