Sfoglia il codice sorgente

1.学生修改手机号添加退出登录

yuanliang 1 anno fa
parent
commit
4832aadde2

+ 6 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java

@@ -653,7 +653,9 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
 
 
         // 手机号码修改
+        boolean updatePhone = false;
         if (!student.getPhone().equals(studentInfo.getPhone())) {
+            updatePhone = true;
             com.yonge.cooleshow.biz.dal.entity.SysUser sysUser = getOrCreateAccount(studentInfo);
             this.lambdaUpdate().set(Student::getSubjectId, studentInfo.getSubjectId())
                     .set(Student::getTenantId, studentInfo.getTenantId())
@@ -689,6 +691,10 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
         } catch (Exception e) {
             log.warn("学生注册IM失败:" + e.getMessage());
         }
+        // 手机号修改,退出登录
+        if (updatePhone) {
+            sysUserFeignService.exitByPhone(ClientEnum.STUDENT.getCode(), student.getPhone());
+        }
 
         return true;
     }