package com.bonus.zlpt.home.controller;

import com.bonus.zlpt.common.core.domain.equip.DevInfo;
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
import com.bonus.zlpt.common.core.web.controller.BaseController;
import com.bonus.zlpt.common.core.web.page.TableDataInfo;
import com.bonus.zlpt.home.service.MaDevInfoService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

@RestController
@RequestMapping("/devInfo")
public class MaDevInfoController extends BaseController {


    @Resource
    private MaDevInfoService maDevInfoService;


    /**
     * 搜索栏
     * @return
     */
    @PostMapping("/getEquipmentList")
    public TableDataInfo getEquipmentList(@Validated @RequestBody DevInfo maDevInfo) {
        List<DevInfoVo> list = maDevInfoService.getEquipmentList(maDevInfo);
        return getDataTable(list);
    }

}
