package com.muyu.enterpise.controller;

import com.muyu.common.core.domain.Result;
import com.muyu.domain.CarFenceType;
import com.muyu.enterpise.service.CarFenceTypeService;
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.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
 *  * @Description：从围栏信息表中查询数据
 */
@RequestMapping("/carFenceType")
@RestController
@AllArgsConstructor
@Tag(name = "从围栏信息表中查询数据",description = "从围栏信息表中查询数据")
@Log4j2
public class CarFenceTypeController {

    private final CarFenceTypeService carFenceTypeService;

    /**
     * 查询围栏业务信息
     */
    @PostMapping("/selectType")
    @Operation(summary = "查询数据",description = "查询数据")
    public Result<List<CarFenceType>> selectConnect(){
        List<CarFenceType> connects = carFenceTypeService.list();
        return Result.success(
                connects, "操作成功"
        );
    }
}
