package com.ym.mec.web.controller;

import com.ym.mec.biz.service.SysPositionService;
import com.ym.mec.common.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RequestMapping("position")
@Api(tags = "职位管理")
@RestController
public class SysPositionController extends BaseController {

    @Autowired
    private SysPositionService positionService;

    @ApiOperation(value = "获取职位列表")
    @GetMapping("/findAll")
    @PreAuthorize("@pcs.hasPermissions('position/findAll')")
    public Object findAll(Map<String,Object> paramMap) throws Exception {
        return succeed(positionService.findAll(paramMap));
    }
}
