package com.muyu.server.controller;

import com.muyu.common.core.domain.Result;
import com.muyu.domain.CarFenceClazz;
import com.muyu.server.service.CarFenceClazzService;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 围栏业务类型控制层
 * @Author：yang
 * @Package：com.muyu.server.controller
 * @Project：cloud-electronic
 * @name：CarFenceClazzController
 * @Date：2024/9/20 14:31
 */
@RequestMapping("/carFenceClazz")
@RestController
@Tag(name = "查询数据",description = "从围栏信息表中查询数据")
@Log4j2
public class CarFenceClazzController {

    @Autowired
    private CarFenceClazzService carFenceClazzService;

    /**
     * 查询围栏类型信息
     */
    @PostMapping("/selectClazz")
    @Operation(summary = "查询数据",description = "查询数据")
    public Result<List<CarFenceClazz>> selectConnect(){

        List<CarFenceClazz> connects = carFenceClazzService.list();
        log.info("查询数据成功");
        return Result.success(
                connects, "操作成功"
        );
    }
}
