调整Head头部布局,动态接口加载书签列表
This commit is contained in:
@ -3,8 +3,14 @@ package com.ruoyi.common.core.controller;
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
@ -20,12 +26,35 @@ import com.ruoyi.common.utils.sql.SqlUtil;
|
||||
|
||||
/**
|
||||
* web层通用数据处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class BaseController
|
||||
{
|
||||
protected final Logger logger = LoggerFactory.getLogger(BaseController.class);
|
||||
/**
|
||||
* @auther: Wang
|
||||
* @date: 2020/08/17 20:19
|
||||
* 功能描述:获取当前用户的信息
|
||||
*/
|
||||
protected SysUser getAuthUser()
|
||||
{
|
||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
LoginUser user = (LoginUser) auth.getPrincipal();
|
||||
return user.getUser();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @auther: Wang
|
||||
// * @date: 2020/08/17 20:19
|
||||
// * 功能描述:获取当前用户UserID
|
||||
// */
|
||||
// protected Long getAuthUserId()
|
||||
// {
|
||||
// Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
// LoginUser user = (LoginUser) auth.getPrincipal();
|
||||
// return user.getUser().getUserId();
|
||||
// }
|
||||
|
||||
/**
|
||||
* 将前台传递过来的日期格式的字符串,自动转化为Date类型
|
||||
@ -75,7 +104,7 @@ public class BaseController
|
||||
|
||||
/**
|
||||
* 响应返回结果
|
||||
*
|
||||
*
|
||||
* @param rows 影响行数
|
||||
* @return 操作结果
|
||||
*/
|
||||
|
Reference in New Issue
Block a user