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

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonus.canteen.core.menu.dto.MenuDishesImportFailPageDTO;
import com.bonus.canteen.core.menu.service.MenuDishesImportFailService;
import com.bonus.canteen.core.menu.vo.MenuDishesImportFailPageVO;
import com.bonus.common.core.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
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;

@RestController
@RequestMapping({"/api/v1/menudishesimportfail"})
@Api(
   value = "menudishesimportfail",
   tags = {"pfy_菜品导入失败记录"}
)
public class MenuDishesImportFailController {
   private static final Logger log = LoggerFactory.getLogger(MenuDishesImportFailController.class);
   @Autowired
   @Lazy
   private MenuDishesImportFailService menuDishesImportFailService;

   @PostMapping({"/page"})
   @ApiOperation("分页获取菜品导入异常记录")
   public AjaxResult getMenuDishesImportFailPage(@RequestBody MenuDishesImportFailPageDTO dto) {
      Page<MenuDishesImportFailPageVO> resultPage = this.menuDishesImportFailService.getMenuDishesImportFailPage(dto);
      return AjaxResult.success(resultPage);
   }
}
