package com.casic.missiles.modular.system.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.casic.missiles.core.application.context.AbstractPermissionContext;
import com.casic.missiles.core.base.controller.ExportController;
import com.casic.missiles.core.common.annotion.BussinessLog;
import com.casic.missiles.core.datascope.DataScope;
import com.casic.missiles.core.page.PageFactory;
import com.casic.missiles.model.response.ResponseData;
import com.casic.missiles.model.response.SuccessResponseData;
import com.casic.missiles.modular.system.dict.BusConfigDict;
import com.casic.missiles.modular.system.dto.BusConfigDTO;
import com.casic.missiles.modular.system.dto.DeviceTypeEnum;
import com.casic.missiles.modular.system.service.IBusConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

/**
 * 控制器
 *
 * @author dev
 * @Date 2019-05-16 15:55:07
 */
@Controller
@RequestMapping("/busConfig")
public class BusConfigController extends ExportController {


    @Qualifier("busConfigServiceImpl")
    @Autowired
    private IBusConfigService busConfigService;

    @Resource
    private AbstractPermissionContext service;

    /**
     * 详情
     */
    @RequestMapping(value = "/detail/{busConfigId}")
    @ResponseBody
    public Object detail(@PathVariable("busConfigId") String busConfigId) {
        SuccessResponseData resultData = new SuccessResponseData();
        resultData.setCode(200);
        resultData.setMessage("查询详情成功");
        resultData.setData(busConfigService.getById(busConfigId));
        return resultData;
    }

}
