|
@@ -31,12 +31,15 @@ public class UserServiceImpl implements UserService, DataListenerTask {
|
|
if(UserType.Admin.equals(user.getUserType())){
|
|
if(UserType.Admin.equals(user.getUserType())){
|
|
list = jdbcService.find("select * from enterprise",Enterprise.class);
|
|
list = jdbcService.find("select * from enterprise",Enterprise.class);
|
|
}else{
|
|
}else{
|
|
- list = jdbcService.find("select * from enterprise where id in(" +
|
|
|
|
|
|
+ /*list = jdbcService.find("select * from enterprise where id in(" +
|
|
"select enterprise_id id from enterprise_manager " +
|
|
"select enterprise_id id from enterprise_manager " +
|
|
"where user_id = ? " +
|
|
"where user_id = ? " +
|
|
"union all " +
|
|
"union all " +
|
|
"select enterprise_id from enterprise_user " +
|
|
"select enterprise_id from enterprise_user " +
|
|
- "where user_id = ? ) ",Enterprise.class,user.getId(),user.getId());
|
|
|
|
|
|
+ "where user_id = ? ) ",Enterprise.class,user.getId(),user.getId());*/
|
|
|
|
+ list = jdbcService.find("select * from enterprise where id in(" +
|
|
|
|
+ "select enterprise_id id from enterprise_manager " +
|
|
|
|
+ "where user_id = ? ) ",Enterprise.class,user.getId());
|
|
}
|
|
}
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|