|
@@ -167,6 +167,11 @@ public class TenantInfoController extends BaseController {
|
|
|
throw new BizException("请登录");
|
|
|
}
|
|
|
|
|
|
+ TenantStaff staff = tenantStaffService.getByUserId(user.getId());
|
|
|
+ if (Objects.nonNull(staff)) {
|
|
|
+ // 设置用户机构ID
|
|
|
+ user.setTenantId(staff.getTenantId());
|
|
|
+ }
|
|
|
//如果传手机号
|
|
|
if (StringUtils.isNotBlank(sysUser.getPhone())) {
|
|
|
|
|
@@ -252,7 +257,7 @@ public class TenantInfoController extends BaseController {
|
|
|
.set(TenantStaff::getUserId, userId)
|
|
|
.update();
|
|
|
|
|
|
- // 更新机构信息表中的用户昵称
|
|
|
+ // 更新机构信息表中的用户
|
|
|
if (Optional.ofNullable(user.getTenantId()).orElse(-1L) > 0) {
|
|
|
|
|
|
tenantInfoService.lambdaUpdate()
|
|
@@ -277,6 +282,7 @@ public class TenantInfoController extends BaseController {
|
|
|
.set(TenantStaff::getUpdateTime, LocalDateTime.now())
|
|
|
.update();
|
|
|
|
|
|
+
|
|
|
// 更新机构信息表中的用户昵称
|
|
|
if (StringUtils.isNotBlank(sysUser.getUsername()) && Optional.ofNullable(user.getTenantId()).orElse(-1L) > 0) {
|
|
|
|