package com.bonus.canteen.core.kitchen.controller;

import com.bonus.canteen.core.kitchen.dto.IndexHomePageDTO;
import com.bonus.canteen.core.kitchen.dto.KitchenDeviceListDTO;
import com.bonus.canteen.core.kitchen.service.IKitchenHomePageService;
import com.bonus.canteen.core.kitchen.vo.IndexHomePageInformationVO;
import com.bonus.canteen.core.kitchen.vo.KitchenDeviceListVO;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

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

/**
 * 厨房设备基础信息Controller
 *
 * @author xsheng
 * @date 2025-06-16
 */
@Api(tags = "厨房设备基础信息接口")
@RestController
@RequestMapping("/kitchen_home_page")
public class KitchenHomePageController extends BaseController {

    @Resource
    private IKitchenHomePageService kitchenHomePageService;

    @ApiOperation(value = "获取首页信息")
    @GetMapping("/information")
    public AjaxResult list(IndexHomePageDTO indexHomePageDTO) {
        try {
            IndexHomePageInformationVO indexHomePageInformationVO = kitchenHomePageService.getIndexHomePageInformation(indexHomePageDTO);
            return success(indexHomePageInformationVO);
        } catch (Exception e) {
            return error(e.getMessage());
        }

    }

}
