package com.bonus.zlpt.company.controller;

import com.bonus.zlpt.common.core.web.controller.BaseController;
import com.bonus.zlpt.common.core.web.page.PageDomain;
import com.bonus.zlpt.common.core.web.page.TableDataInfo;
import com.bonus.zlpt.company.api.domain.BusinessMenu;
import com.bonus.zlpt.company.service.BusinessMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 业务类型
 */
@RestController
@RequestMapping("/business/menu")
@Api(value = "业务类型",tags = {"业务类型"})
public class BusinessMenuController extends BaseController {

    @Autowired
    private BusinessMenuService businessMenuService;


    /**
     * 查询所有业务类型
     * @return
     */
    @PostMapping("/selectList")
    @ApiOperation("查询所有业务类型")
    public TableDataInfo selectList(@RequestBody PageDomain pageDomain){

        startPage(pageDomain.getPageNum(), pageDomain.getPageSize());
        List<BusinessMenu> businessMenus = businessMenuService.selectList();
        return getDataTable(businessMenus);
    }







}
