数据库
parent
8fe30499fc
commit
9c19da9ae6
|
@ -349,24 +349,7 @@ public class LoginController extends BaseController{
|
|||
if (client.getFunctions() == null || client.getFunctions().size() == 0) {
|
||||
|
||||
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 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=?");
|
||||
List<TSFunction> list1 = systemService.findHql(hqlsb1.toString(),user.getId());
|
||||
|
@ -378,8 +361,6 @@ public class LoginController extends BaseController{
|
|||
loginActionlist.put(function.getId(),function);
|
||||
}
|
||||
client.setFunctions(loginActionlist);
|
||||
|
||||
//清空变量,降低内存使用
|
||||
list2.clear();
|
||||
list1.clear();
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
#MySQL
|
||||
hibernate.dialect=org.hibernate.dialect.MySQLDialect
|
||||
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.password.jeecg=password
|
||||
jdbc.password.jeecg=Zzerp123
|
||||
jdbc.dbType=mysql
|
||||
|
||||
#Oracle
|
||||
|
|
Loading…
Reference in New Issue