Newer
Older
huludao / src / main / java / com / newfiber / api / pc / controller / PipeNetworkController.java
package com.newfiber.api.pc.controller;

import com.newfiber.api.core.commons.ResultCode;
import com.newfiber.api.core.commons.ResultObj;
import com.newfiber.api.pc.model.entity.PipeNetwork;
import com.newfiber.api.pc.service.PipeNetworkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;

/**
 * @description: TODO
 * @author: 张鸿志
 * @date: 2021/1/5 14:07
 * @version: v1.0
 */
@RestController
@Api(value = "PipeNetworkController",tags = "管道数据控制层")
@RequestMapping("/pipe")
public class PipeNetworkController {

    @Autowired
    private PipeNetworkService pipeNetworkService;

    @PostMapping("/list")
    @ApiOperation("获取全部的管道数据")
    public ResultObj<List<PipeNetwork>> queryList(){
        return new ResultObj<>(ResultCode.OK,pipeNetworkService.selectList(null));
    }

}