| | |
| | | import com.core.domain.KeyValueVo; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.entity.param.UserChildrenParam; |
| | | import com.zy.crm.manager.service.CstmrService; |
| | | import com.zy.crm.manager.utils.UserChildrenParamUtils; |
| | | import com.zy.crm.system.entity.Role; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.RoleService; |
| | |
| | | // todo: 修改关联数据的deptId字段 |
| | | cstmrService.updateDeptIdByUserId(user.getId(), user.getDeptId()); |
| | | } |
| | | user.setNickname(user.getUsername()); |
| | | if (!userService.updateById(user)) { |
| | | throw new CoolException("修改用户失败"); |
| | | } |
| | |
| | | return R.ok().add(valueVos); |
| | | } |
| | | |
| | | @RequestMapping("/user/id/popup/auth") |
| | | public R popupUserId(String token) { |
| | | Long item = 0L; |
| | | if (Cools.isEmpty(token)){ |
| | | return R.ok(); |
| | | } |
| | | try{ |
| | | User user = getUser(token); |
| | | if (Cools.isEmpty(user) || Cools.isEmpty(user.getId())){ |
| | | return R.ok(item); |
| | | } |
| | | UserChildrenParam userChildrenParamList = UserChildrenParamUtils.getUserChildrenParamList(user); |
| | | return R.ok().add(userChildrenParamList); |
| | | }catch (Exception ignored){ } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |