|
@@ -39,6 +39,16 @@ public class CbsQrCodeScanServiceImpl {
|
|
|
CbsQrCodeScanWrapper.UserInfo userInfo = new CbsQrCodeScanWrapper.UserInfo();
|
|
|
userInfo.setUsername(customTokenServices.loadAuthentication(req.getToken()).getName().split(":")[1]);
|
|
|
userInfo.setClientTypes("TEACHER");
|
|
|
+
|
|
|
+ SysUser sysUser = sysUserService.queryByPhone(userInfo.getUsername());
|
|
|
+ if (sysUser == null) {
|
|
|
+ throw new BizException(HttpStatus.UNAUTHORIZED.value(), "用户不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sysUser.getTenantId() == -1L) {
|
|
|
+ // 平台老师不允许扫码登录乐教通,返回机构ID
|
|
|
+ userInfo.setClientTypes("-1");
|
|
|
+ }
|
|
|
return userInfo;
|
|
|
}
|
|
|
|