package com.muyu.server.controller;

import com.muyu.common.core.domain.Result;
import com.muyu.server.service.SysCarLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
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;

/**
 * 车辆日志管理 接口控制层
 * @author liuxinyue
 * @package: com.muyu.breakdown.controller
 * @name: SysCarLogController
 * @date: 2024/9/22 14:39
 */

@RestController
@RequestMapping("/sysCarLog")
@AllArgsConstructor
@Tag(name = "车辆日志",description = "车辆日志管理")
@Log4j2
public class SysCarLogController {
    @Autowired
    private SysCarLogService sysCarLogService;


    @GetMapping("/selectList")
    @Operation(summary = "车辆日志列表",description = "车辆日志列表")
    public Result selectList(){
        return Result.success(sysCarLogService.selectList());
    }

    @GetMapping("/selectList/{id}")
    @Operation(summary = "根据ID查询车辆日志列表",description = "根据ID查询车辆日志列表")
    public Result selectById(@PathVariable("id") Long id){
        return Result.success(sysCarLogService.selectById(id));
    }


}
