| | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.LoginUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.reflection.MetaObject; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取登录用户名 |
| | | */ |
| | | private String getLoginUsername() { |
| | | LoginUser loginUser; |
| | | try { |
| | | loginUser = SecurityUtils.getLoginUser(); |
| | | } catch (Exception e) { |
| | | log.warn("自动注入警告 => 用户未登录"); |
| | | return null; |
| | | } |
| | | return loginUser.getUsername(); |
| | | } |
| | | /** |
| | | * 获取登录用户名 |
| | | */ |
| | | private String getLoginUsername() { |
| | | LoginUser loginUser; |
| | | try { |
| | | loginUser = LoginUtils.getLoginUser(); |
| | | } catch (Exception e) { |
| | | log.warn("自动注入警告 => 用户未登录"); |
| | | return null; |
| | | } |
| | | return loginUser.getUsername(); |
| | | } |
| | | |
| | | } |