package com.muyu.controller;

import com.muyu.common.core.domain.Result;
import com.muyu.domain.CarType;
import com.muyu.domain.resp.CarTypeResp;
import com.muyu.service.CarTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/carType")
public class CarTypeController {
    @Autowired
    private CarTypeService carTypeService;


    @GetMapping("/selectCarTypeList")
    public Result selectCarTypeList(){
     return Result.success(carTypeService.selectCarTypeList());
    }


    @GetMapping("/selectCarTypeRespList/{id}")
    public Result selectCarTypeRespList(@PathVariable("id") Long id) {
        return Result.success(carTypeService.selectCarTypeRespList(id));
    }


}
