package com.ruoyi.system.controller.conslole;
|
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
import com.ruoyi.system.api.domain.dto.MerEditUserDto;
|
import com.ruoyi.system.api.domain.poji.sys.SysStaff;
|
import com.ruoyi.system.service.staff.SysStaffService;
|
import com.ruoyi.system.service.staff.SysWxCpService;
|
import io.swagger.annotations.Api;
|
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 javax.annotation.Resource;
|
|
/**
|
* @author cheny
|
*/
|
@Api(value = "平台端员工相关接口", tags = "平台端员工相关接口", description = "平台端员工相关接口")
|
@RestController
|
@RequestMapping("/staff")
|
public class StaffController {
|
@Resource
|
private SysStaffService sysStaffService;
|
|
@Resource
|
private SysWxCpService sysWxCpService;
|
|
/**
|
* @description 判断员工是否领导
|
* @author jqs
|
* @date 2023/7/19 19:45
|
* @param
|
* @return Boolean
|
*/
|
@PostMapping("/isLeader")
|
public Boolean isLeader() {
|
Long userId = SecurityUtils.getUserId();
|
SysStaff sysStaff = sysStaffService.getByUserId(userId);
|
if(null!=sysStaff){
|
return sysStaffService.getByUserId(userId).getHeadFlag().equals("1") ? true : false;
|
}
|
return false;
|
}
|
|
/**
|
* @description 编辑商户员工
|
* @author jqs
|
* @date 2023/7/19 19:44
|
* @param merEditUserDto
|
* @return R
|
*/
|
@PostMapping("/editSysStaffInfo")
|
public R editUserInfo(@RequestBody MerEditUserDto merEditUserDto){
|
sysStaffService.editSysStaffInfo(merEditUserDto);
|
return R.ok();
|
}
|
|
}
|