更新sql

This commit is contained in:
shuzheng 2017-02-11 14:52:12 +08:00
parent 035bcab1c9
commit a554ccdda9
2 changed files with 2 additions and 48 deletions

View File

@ -10,7 +10,7 @@ Target Server Type : MYSQL
Target Server Version : 50621
File Encoding : 65001
Date: 2017-02-10 20:53:21
Date: 2017-02-11 12:32:23
*/
SET FOREIGN_KEY_CHECKS=0;
@ -519,7 +519,7 @@ CREATE TABLE `upms_user` (
-- ----------------------------
-- Records of upms_user
-- ----------------------------
INSERT INTO `upms_user` VALUES ('1', 'admin', '3038D9CB63B3152A79B8153FB06C02F7', '66f1b370c660445a8657bf8bf1794486', '管理员', null, null, null, null, '0', '1');
INSERT INTO `upms_user` VALUES ('1', 'admin', '3038D9CB63B3152A79B8153FB06C02F7', '66f1b370c660445a8657bf8bf1794486', '管理员', '/resources/zheng-admin/images/avatar.jpg', null, null, null, '0', '1');
-- ----------------------------
-- Table structure for upms_user_organization

View File

@ -1,46 +0,0 @@
package com.zheng.upms.interceptor;
import com.zheng.upms.dao.model.UpmsUser;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 登录信息拦截器
* Created by shuzheng on 2017/2/11.
*/
public class UpmsLoginInterceptor extends HandlerInterceptorAdapter {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
// 过滤ajax
if (null != request.getHeader("X-Requested-With") && request.getHeader("X-Requested-With").equalsIgnoreCase("XMLHttpRequest")) {
return true;
}
// 登录信息
Subject subject = SecurityUtils.getSubject();
UpmsUser upmsUser = (UpmsUser) subject.getPrincipal();
request.setAttribute("upmsUser", upmsUser);
return true;
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
super.postHandle(request, response, handler, modelAndView);
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
super.afterCompletion(request, response, handler, ex);
}
@Override
public void afterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
super.afterConcurrentHandlingStarted(request, response, handler);
}
}