package com.crunii.micro.service.sysmgr.controller;

import com.crunii.micro.common.dto.Result;
import com.crunii.micro.service.sysmgr.dto.sysmgr.FrequentVisitMenuRspDTO;
import com.crunii.micro.service.sysmgr.dto.sysmgr.MenuVisitReqDTO;
import com.crunii.micro.service.sysmgr.service.FrequentVisitMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
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;

import java.util.List;

/**
 * @author gongsongtao
 * @date 2023/9/18 15:32
 */
@Api(tags = "常用菜单")
@RestController
@Validated
@RequiredArgsConstructor
@RequestMapping("/auth/frequentVisitMenuController")
public class FrequentVisitMenuController {

    private final FrequentVisitMenuService frequentVisitMenuService;

    @ApiOperation("查询常用菜单")
    @PostMapping("/findFrequentVisitMenu")
    public Result<List<FrequentVisitMenuRspDTO>> findFrequentVisitMenu(@RequestBody MenuVisitReqDTO menuVisitReqDTO){
        return frequentVisitMenuService.findFrequentVisitMenu(menuVisitReqDTO);
    }

}
