|
|
|
@ -1,10 +1,8 @@
|
|
|
|
|
package cn.estsh.i3plus.core.apiservice.controller.busi;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysDepartmentService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysFileService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysPositionService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysUserInfoService;
|
|
|
|
|
import cn.estsh.i3plus.core.apiservice.serviceimpl.busi.SysOrganizeService;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.StringTool;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
|
|
|
|
@ -20,7 +18,6 @@ import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionEnum;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
@ -28,6 +25,8 @@ import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -51,12 +50,6 @@ public class SysUserInfoController extends CoreBaseController{
|
|
|
|
|
private ISysDepartmentService departmentService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysOrganizeService organizeService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysFileService sysFileService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISysPositionService sysPositionService;
|
|
|
|
|
|
|
|
|
|
@PostMapping(value="/insert")
|
|
|
|
@ -247,6 +240,31 @@ public class SysUserInfoController extends CoreBaseController{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/query-ref-department")
|
|
|
|
|
@ApiOperation(value = "查询角色的所有角色权限关系", notes = "查询角色的所有角色权限关系")
|
|
|
|
|
public ResultBean queryRefDepartment(SysUserInfo userInfo) {
|
|
|
|
|
try {
|
|
|
|
|
List<Long> idList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
List<SysRefUserDepartment> refs = sysUserInfoService.querySysRefUserDepartment(userInfo);
|
|
|
|
|
if(refs != null && refs.size() > 0){
|
|
|
|
|
for (SysRefUserDepartment ref : refs) {
|
|
|
|
|
idList.add(ref.getUserId());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<SysUserInfo> result = sysUserInfoService.querySysUserInfoList(userInfo, idList);
|
|
|
|
|
|
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(result);
|
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}", busExcep.getErrorDetail(), busExcep);
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}", e.getMessage(), e);
|
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/find-ref-position/{userId}")
|
|
|
|
|
@ApiOperation(value = "查询角色的所有角色权限关系", notes = "查询角色的所有角色权限关系")
|
|
|
|
|
public ResultBean findRefPosition(@PathVariable("userId") String userId) {
|
|
|
|
|