|
|
|
@ -4,11 +4,18 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import jnpf.annotation.UserPermission;
|
|
|
|
|
import jnpf.base.ActionResult;
|
|
|
|
|
import jnpf.base.Page;
|
|
|
|
|
import jnpf.base.Pagination;
|
|
|
|
|
import jnpf.base.UserInfo;
|
|
|
|
|
import jnpf.base.util.RemoveUtil;
|
|
|
|
|
import jnpf.base.vo.DownloadVO;
|
|
|
|
|
import jnpf.base.vo.ListVO;
|
|
|
|
|
import jnpf.base.vo.PageListVO;
|
|
|
|
|
import jnpf.base.vo.PaginationVO;
|
|
|
|
|
import jnpf.config.ConfigValueUtil;
|
|
|
|
|
import jnpf.constant.MsgCode;
|
|
|
|
|
import jnpf.exception.DataException;
|
|
|
|
|
import jnpf.message.service.SynThirdDingTalkService;
|
|
|
|
|
import jnpf.message.service.SynThirdQyService;
|
|
|
|
|
import jnpf.permission.constant.PermissionConst;
|
|
|
|
@ -23,22 +30,14 @@ import jnpf.permission.model.user.mod.UsersByPositionModel;
|
|
|
|
|
import jnpf.permission.model.user.page.PageUser;
|
|
|
|
|
import jnpf.permission.model.user.page.PaginationUser;
|
|
|
|
|
import jnpf.permission.model.user.vo.*;
|
|
|
|
|
import jnpf.permission.service.*;
|
|
|
|
|
import jnpf.permission.util.PermissionUtil;
|
|
|
|
|
import jnpf.util.*;
|
|
|
|
|
import jnpf.base.ActionResult;
|
|
|
|
|
import jnpf.base.vo.PageListVO;
|
|
|
|
|
import jnpf.base.Pagination;
|
|
|
|
|
import jnpf.base.vo.PaginationVO;
|
|
|
|
|
import jnpf.base.vo.ListVO;
|
|
|
|
|
import jnpf.exception.DataException;
|
|
|
|
|
import jnpf.permission.service.*;
|
|
|
|
|
import jnpf.base.util.*;
|
|
|
|
|
import jnpf.util.enums.FileTypeEnum;
|
|
|
|
|
import jnpf.util.file.UploadUtil;
|
|
|
|
|
import jnpf.util.treeutil.SumTree;
|
|
|
|
|
import jnpf.util.treeutil.newtreeutil.TreeDotUtils;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.collections4.map.HashedMap;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
@ -407,6 +406,12 @@ public class UserController {
|
|
|
|
|
@PostMapping
|
|
|
|
|
public ActionResult<String> create(@RequestBody @Valid UserCrForm userCrForm) throws Exception {
|
|
|
|
|
UserEntity entity = JsonUtil.getJsonToBean(userCrForm, UserEntity.class);
|
|
|
|
|
List<OrganizeEntity> parentId = userService.getParentId(entity.getOrganizeId());
|
|
|
|
|
if (parentId!=null&&parentId.size()>0){
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
return ActionResult.fail("不能选择公司!或者选中了多个部门!");
|
|
|
|
|
}
|
|
|
|
|
entity.setPassword("4a7d1ed414474e4033ac29ccb8653d9b");
|
|
|
|
|
//获取头像
|
|
|
|
|
String oldHeadIcon = entity.getHeadIcon();
|
|
|
|
@ -451,6 +456,13 @@ public class UserController {
|
|
|
|
|
@PutMapping("/{id}")
|
|
|
|
|
public ActionResult<String> update(@PathVariable("id") String id, @RequestBody @Valid UserUpForm userUpForm) throws Exception {
|
|
|
|
|
UserEntity entity = JsonUtil.getJsonToBean(userUpForm, UserEntity.class);
|
|
|
|
|
|
|
|
|
|
List<OrganizeEntity> parentId = userService.getParentId(entity.getOrganizeId());
|
|
|
|
|
if (parentId!=null&&parentId.size()>0){
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
return ActionResult.fail("不能选择公司!或者选中了多个部门!");
|
|
|
|
|
}
|
|
|
|
|
//将禁用的id加进数据
|
|
|
|
|
UserEntity originUser = userService.getInfo(id);
|
|
|
|
|
if ("1".equals(String.valueOf(originUser.getIsAdministrator()))) {
|
|
|
|
|