AgvLineBodyController.java 1.01 KB
package com.huaheng.api.acs.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.huaheng.api.acs.domain.AgvLineBody;
import com.huaheng.api.acs.mapper.AgvLineBodyMapper;
import com.huaheng.framework.web.domain.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/agv")
public class AgvLineBodyController {
    @Resource
    private AgvLineBodyMapper agvLineBodyMapper;
    @PostMapping("/lineBodyList")
    public AjaxResult lineBodyList(){
        List<AgvLineBody> agvLineBodies = agvLineBodyMapper.selectList(new LambdaQueryWrapper<>());
        List<String> collect = agvLineBodies.stream().map(t -> t.getAgvLineName()).collect(Collectors.toList());
        return AjaxResult.success("成功",collect);
    }
}