数据库
parent
8fe30499fc
commit
9c19da9ae6
|
@ -49,7 +49,7 @@ import org.springframework.web.servlet.view.RedirectView;
|
||||||
/**
|
/**
|
||||||
* 登陆初始化控制器
|
* 登陆初始化控制器
|
||||||
* @author admin
|
* @author admin
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//@Scope("prototype")
|
//@Scope("prototype")
|
||||||
@Controller
|
@Controller
|
||||||
|
@ -61,7 +61,7 @@ public class LoginController extends BaseController{
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MutiLangServiceI mutiLangService;
|
private MutiLangServiceI mutiLangService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setSystemService(SystemService systemService) {
|
public void setSystemService(SystemService systemService) {
|
||||||
this.systemService = systemService;
|
this.systemService = systemService;
|
||||||
|
@ -81,7 +81,7 @@ public class LoginController extends BaseController{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查用户名称
|
* 检查用户名称
|
||||||
*
|
*
|
||||||
* @param user
|
* @param user
|
||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
|
@ -140,11 +140,11 @@ public class LoginController extends BaseController{
|
||||||
}
|
}
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 变更在线用户组织
|
* 变更在线用户组织
|
||||||
*
|
*
|
||||||
* @param user
|
* @param user
|
||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
|
@ -196,8 +196,8 @@ public class LoginController extends BaseController{
|
||||||
checkuser(user,req);
|
checkuser(user,req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 添加登陆日志
|
// 添加登陆日志
|
||||||
systemService.addLog(message, Globals.Log_Type_LOGIN, Globals.Log_Leavel_INFO);
|
systemService.addLog(message, Globals.Log_Type_LOGIN, Globals.Log_Leavel_INFO);
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ public class LoginController extends BaseController{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户登录
|
* 用户登录
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -222,13 +222,13 @@ public class LoginController extends BaseController{
|
||||||
if (roles.length() > 0) {
|
if (roles.length() > 0) {
|
||||||
roles = roles.substring(0, roles.length() - 1);
|
roles = roles.substring(0, roles.length() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
modelMap.put("roleName", roles.length()>3?roles.substring(0,3)+"...":roles);
|
modelMap.put("roleName", roles.length()>3?roles.substring(0,3)+"...":roles);
|
||||||
modelMap.put("userName", user.getUserName().length()>5?user.getUserName().substring(0, 5)+"...":user.getUserName());
|
modelMap.put("userName", user.getUserName().length()>5?user.getUserName().substring(0, 5)+"...":user.getUserName());
|
||||||
|
|
||||||
modelMap.put("currentOrgName", ClientManager.getInstance().getClient().getUser().getCurrentDepart().getDepartname());
|
modelMap.put("currentOrgName", ClientManager.getInstance().getClient().getUser().getCurrentDepart().getDepartname());
|
||||||
|
|
||||||
|
|
||||||
SysThemesEnum sysTheme = SysThemesUtil.getSysTheme(request);
|
SysThemesEnum sysTheme = SysThemesUtil.getSysTheme(request);
|
||||||
if("ace".equals(sysTheme.getStyle())||"diy".equals(sysTheme.getStyle())||"acele".equals(sysTheme.getStyle())||"hplus".equals(sysTheme.getStyle())){
|
if("ace".equals(sysTheme.getStyle())||"diy".equals(sysTheme.getStyle())||"acele".equals(sysTheme.getStyle())||"hplus".equals(sysTheme.getStyle())){
|
||||||
request.setAttribute("menuMap", getFunctionMap(user));
|
request.setAttribute("menuMap", getFunctionMap(user));
|
||||||
|
@ -252,7 +252,7 @@ public class LoginController extends BaseController{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退出系统
|
* 退出系统
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -275,7 +275,7 @@ public class LoginController extends BaseController{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单跳转
|
* 菜单跳转
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(params = "left")
|
@RequestMapping(params = "left")
|
||||||
|
@ -296,7 +296,7 @@ public class LoginController extends BaseController{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取权限的map
|
* 获取权限的map
|
||||||
*
|
*
|
||||||
* @param user
|
* @param user
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -338,7 +338,7 @@ public class LoginController extends BaseController{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户菜单列表
|
* 获取用户菜单列表
|
||||||
*
|
*
|
||||||
* @param user
|
* @param user
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -349,24 +349,7 @@ public class LoginController extends BaseController{
|
||||||
if (client.getFunctions() == null || client.getFunctions().size() == 0) {
|
if (client.getFunctions() == null || client.getFunctions().size() == 0) {
|
||||||
|
|
||||||
Map<String, TSFunction> loginActionlist = new HashMap<String, TSFunction>();
|
Map<String, TSFunction> loginActionlist = new HashMap<String, TSFunction>();
|
||||||
|
|
||||||
/*String hql="from TSFunction t where t.id in (select d.TSFunction.id from TSRoleFunction d where d.TSRole.id in(select t.TSRole.id from TSRoleUser t where t.TSUser.id ='"+
|
|
||||||
user.getId()+"' ))";
|
|
||||||
String hql2="from TSFunction t where t.id in ( select b.tsRole.id from TSRoleOrg b where b.tsDepart.id in(select a.tsDepart.id from TSUserOrg a where a.tsUser.id='"+
|
|
||||||
user.getId()+"'))";
|
|
||||||
List<TSFunction> list = systemService.findHql(hql);
|
|
||||||
log.info("role functions: "+list.size());
|
|
||||||
for(TSFunction function:list){
|
|
||||||
loginActionlist.put(function.getId(),function);
|
|
||||||
}
|
|
||||||
List<TSFunction> list2 = systemService.findHql(hql2);
|
|
||||||
log.info("org functions: "+list2.size());
|
|
||||||
for(TSFunction function:list2){
|
|
||||||
loginActionlist.put(function.getId(),function);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
StringBuilder hqlsb1=new StringBuilder("select distinct f from TSFunction f,TSRoleFunction rf,TSRoleUser ru ").append("where ru.TSRole.id=rf.TSRole.id and rf.TSFunction.id=f.id and ru.TSUser.id=? ");
|
StringBuilder hqlsb1=new StringBuilder("select distinct f from TSFunction f,TSRoleFunction rf,TSRoleUser ru ").append("where ru.TSRole.id=rf.TSRole.id and rf.TSFunction.id=f.id and ru.TSUser.id=? ");
|
||||||
|
|
||||||
StringBuilder hqlsb2=new StringBuilder("select distinct c from TSFunction c,TSRoleFunction rf,TSRoleOrg b,TSUserOrg a ")
|
StringBuilder hqlsb2=new StringBuilder("select distinct c from TSFunction c,TSRoleFunction rf,TSRoleOrg b,TSUserOrg a ")
|
||||||
.append("where a.tsDepart.id=b.tsDepart.id and b.tsRole.id=rf.TSRole.id and rf.TSFunction.id=c.id and a.tsUser.id=?");
|
.append("where a.tsDepart.id=b.tsDepart.id and b.tsRole.id=rf.TSRole.id and rf.TSFunction.id=c.id and a.tsUser.id=?");
|
||||||
List<TSFunction> list1 = systemService.findHql(hqlsb1.toString(),user.getId());
|
List<TSFunction> list1 = systemService.findHql(hqlsb1.toString(),user.getId());
|
||||||
|
@ -378,8 +361,6 @@ public class LoginController extends BaseController{
|
||||||
loginActionlist.put(function.getId(),function);
|
loginActionlist.put(function.getId(),function);
|
||||||
}
|
}
|
||||||
client.setFunctions(loginActionlist);
|
client.setFunctions(loginActionlist);
|
||||||
|
|
||||||
//清空变量,降低内存使用
|
|
||||||
list2.clear();
|
list2.clear();
|
||||||
list1.clear();
|
list1.clear();
|
||||||
|
|
||||||
|
@ -408,7 +389,7 @@ public class LoginController extends BaseController{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页跳转
|
* 首页跳转
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(params = "home")
|
@RequestMapping(params = "home")
|
||||||
|
@ -424,10 +405,10 @@ public class LoginController extends BaseController{
|
||||||
|
|
||||||
return new ModelAndView("main/home");
|
return new ModelAndView("main/home");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ACE首页跳转
|
* ACE首页跳转
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(params = "acehome")
|
@RequestMapping(params = "acehome")
|
||||||
|
@ -463,7 +444,7 @@ public class LoginController extends BaseController{
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 无权限页面提示跳转
|
* 无权限页面提示跳转
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(params = "noAuth")
|
@RequestMapping(params = "noAuth")
|
||||||
|
@ -511,7 +492,7 @@ public class LoginController extends BaseController{
|
||||||
request.setAttribute("menuMap", getFunctionMap(user));
|
request.setAttribute("menuMap", getFunctionMap(user));
|
||||||
return new ModelAndView("main/shortcut_top");
|
return new ModelAndView("main/shortcut_top");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Title: top
|
* @Title: top
|
||||||
* @author:gaofeng
|
* @author:gaofeng
|
||||||
|
@ -580,7 +561,7 @@ public class LoginController extends BaseController{
|
||||||
floor += " <li><img class='imag1' src='plug-in/login/images/cysl.png' /> "
|
floor += " <li><img class='imag1' src='plug-in/login/images/cysl.png' /> "
|
||||||
+ " <img class='imag2' src='plug-in/login/images/cysl_up.png' style='display: none;' />" + " </li> ";
|
+ " <img class='imag2' src='plug-in/login/images/cysl_up.png' style='display: none;' />" + " </li> ";
|
||||||
}else if(lang_context.contains("消息推送")){
|
}else if(lang_context.contains("消息推送")){
|
||||||
|
|
||||||
String s = "<div style='width:67px;position: absolute;top:39px;text-align:center;color:#909090;font-size:13px;'>消息推送</div>";
|
String s = "<div style='width:67px;position: absolute;top:39px;text-align:center;color:#909090;font-size:13px;'>消息推送</div>";
|
||||||
floor += " <li style='position: relative;'>"+s+"<img class='imag1' src='plug-in/login/images/msg.png' /> "
|
floor += " <li style='position: relative;'>"+s+"<img class='imag1' src='plug-in/login/images/msg.png' /> "
|
||||||
+ " <img class='imag2' src='plug-in/login/images/msg_up.png' style='display: none;' /></li> ";
|
+ " <img class='imag2' src='plug-in/login/images/msg_up.png' style='display: none;' /></li> ";
|
||||||
|
@ -714,4 +695,4 @@ public class LoginController extends BaseController{
|
||||||
public String login3(){
|
public String login3(){
|
||||||
return "login/login3";
|
return "login/login3";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
#MySQL
|
#MySQL
|
||||||
hibernate.dialect=org.hibernate.dialect.MySQLDialect
|
hibernate.dialect=org.hibernate.dialect.MySQLDialect
|
||||||
validationQuery.sqlserver=SELECT 1
|
validationQuery.sqlserver=SELECT 1
|
||||||
jdbc.url.jeecg=jdbc:mysql://127.0.0.1:3306/jee-wms?useUnicode=true&characterEncoding=UTF-8
|
jdbc.url.jeecg=jdbc:mysql://127.0.0.1:3306/wms?useUnicode=true&characterEncoding=UTF-8
|
||||||
|
|
||||||
jdbc.username.jeecg=root
|
jdbc.username.jeecg=root
|
||||||
jdbc.password.jeecg=password
|
jdbc.password.jeecg=Zzerp123
|
||||||
jdbc.dbType=mysql
|
jdbc.dbType=mysql
|
||||||
|
|
||||||
#Oracle
|
#Oracle
|
||||||
|
|
Loading…
Reference in New Issue