This commit is contained in:
udf_admin@163.com
2020-05-05 13:49:48 +08:00
parent 07d9cfa878
commit ad184fccff
15 changed files with 117 additions and 40 deletions
@@ -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;
/**
* 首页
*