package cn.iocoder.yudao.module.system.controller.app.dishimage;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.system.controller.admin.dishimage.vo.DishImagePageReqVO;
import cn.iocoder.yudao.module.system.controller.admin.dishimage.vo.DishImageRespVO;
import cn.iocoder.yudao.module.system.controller.admin.dishimage.vo.DishImageSaveReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.dishimage.DishImageDO;
import cn.iocoder.yudao.module.system.service.dishimage.DishImageService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;



@Tag(name = "管理后台 - 本周菜单")
@RestController
@RequestMapping("/t/dish-image")
@Validated
public class AppDishImageController {

    @Resource
    private DishImageService dishImageService;

    @GetMapping("/get")
    @Operation(summary = "获得本周菜单")
    public CommonResult<DishImageRespVO> getThisWeekDishImage(Long carteenId,String time) {
        DishImageDO dishImage = dishImageService.getThisWeekDishImage(carteenId,time);
        return success(BeanUtils.toBean(dishImage, DishImageRespVO.class));
    }


}