|
|
@@ -1,6 +1,9 @@
|
|
|
package com.nb.app.doctor.auth;
|
|
|
|
|
|
+import cn.dev33.satoken.exception.NotLoginException;
|
|
|
+import cn.dev33.satoken.stp.StpLogic;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
@@ -65,8 +68,12 @@ public class AppDoctorUserAccountOperator implements IAccountOperator<DoctorUser
|
|
|
public AccountInfoVO<DoctorUserVo> getAccountInfo() {
|
|
|
LoginUser<String> loginUser = SecurityUtil.getLoginUser();
|
|
|
AppDoctorUserEntity appDoctorUser = doctorUserService.getById(loginUser.getId());
|
|
|
+ StpLogic stpLogic = SecurityUtil.getStpLogic();
|
|
|
+ if(ObjectUtil.isNull(appDoctorUser)){
|
|
|
+ stpLogic.logout();
|
|
|
+ stpLogic.checkLogin();
|
|
|
+ }
|
|
|
DoctorUserVo vo = BeanUtil.copyProperties(appDoctorUser, DoctorUserVo.class);
|
|
|
-
|
|
|
AccountInfoVO<DoctorUserVo> result = new AccountInfoVO();
|
|
|
result.setExtendFields(JSONUtil.parseObj(Optional.ofNullable(vo).orElse(new DoctorUserVo()))
|
|
|
);
|