mirror of
https://gitee.com/wangkang/udf.git
synced 2026-11-01 20:23:41 +00:00
更新
This commit is contained in:
+4
-1
@@ -2,6 +2,7 @@ package org.itkk.udf.api.page.auth;
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.itkk.udf.api.common.CommonConstant;
|
||||
import org.itkk.udf.api.common.CommonUtil;
|
||||
import org.itkk.udf.api.common.dto.UserDto;
|
||||
import org.itkk.udf.api.common.service.IUserService;
|
||||
@@ -30,8 +31,10 @@ public class CommonHandlerInterceptor implements HandlerInterceptor {
|
||||
UserDto userDto = iUserService.infoByToken(CommonUtil.getTokenByCookie(request));
|
||||
//判断是否登陆
|
||||
if (userDto != null) {
|
||||
//放入token
|
||||
modelAndView.addObject(CommonConstant.PARAMETER_NAME_TOKEN, CommonUtil.getTokenByCookie(request));
|
||||
//放入用户信息
|
||||
modelAndView.addObject("userDto", userDto);
|
||||
modelAndView.addObject(CommonConstant.PARAMETER_NAME_TOKEN_INFO, userDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.itkk.udf.api.page.web;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.itkk.udf.starter.file.db.service.DbFileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -8,6 +10,13 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Controller
|
||||
public class HomeController {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Autowired
|
||||
private DbFileService dbFileService;
|
||||
|
||||
/**
|
||||
* 首页
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user