jiangqs
2023-07-07 0ab1b864458f36b294933112824b10b13770915e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.ruoyi.system.controller.staff;
 
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.system.service.staff.SysStaffService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
/**
 * @author cheny
 */
@Api(value = "平台端员工相关接口", tags = "平台端员工相关接口", description = "平台端员工相关接口")
@RestController
@RequestMapping("/staff")
public class StaffController {
    @Resource
    private SysStaffService sysStaffService;
 
    @RequestMapping(value = "/isLeader", method = RequestMethod.POST)
    @ApiOperation(value = "获取员工信息")
    public boolean isLeader() {
        Long userId = SecurityUtils.getUserId();
        return sysStaffService.getByUserId(userId).getHeadFlag().equals("1") ? true : false;
    }
}