package com.miaxis.app.controller.lighting;

import com.miaxis.common.constant.Constants;
import com.miaxis.common.core.controller.BaseController;
import com.miaxis.common.core.page.ResponsePageInfo;
import com.miaxis.lighting.domain.LightingItem;
import com.miaxis.lighting.service.ILightingItemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 【灯光单项】Controller
 *
 * @author miaxis
 * @date 2022-03-21
 */
@RestController
@RequestMapping(Constants.OPEN_PREFIX+"/lighting/item")
@Api(tags={"【H5-灯光模拟】"})
public class LightingItemController extends BaseController{
    @Autowired
    private ILightingItemService lightingItemService;

    /**
     * 查询灯光单项列表
     */
    @GetMapping("/list")
    @ApiOperation("查询灯光单项列表")
    public ResponsePageInfo<LightingItem> list(){
        List<LightingItem> list = lightingItemService.selectLightingItemList(new LightingItem());
        return toResponsePageInfo(list);
    }
}
