Commit aeb387ad by 杨清松

根据用户名查区域公司返回部门

parent 5a5e6ef0
...@@ -67,7 +67,7 @@ public class DinasOrganizationDaoImpl implements DinasOrganizationDao, DinasOrga ...@@ -67,7 +67,7 @@ public class DinasOrganizationDaoImpl implements DinasOrganizationDao, DinasOrga
return template.execute(session -> { return template.execute(session -> {
List<Map<String, Object>> result = new ArrayList<>(); List<Map<String, Object>> result = new ArrayList<>();
String hql = "select f.following.id, f.following.name, f.following.code, f.following.address, f.following.type from " + ORGANIZATION_FOLLOWER_ENTITY + " as f where f.member.id =:id" ; String hql = "select f.following.id, f.following.name, f.following.code, f.following.address, f.following.department.id as departmentId, f.following.type from " + ORGANIZATION_FOLLOWER_ENTITY + " as f where f.member.id =:id" ;
Query<Tuple> query = session.createQuery(hql, Tuple.class); Query<Tuple> query = session.createQuery(hql, Tuple.class);
query.setParameter("id", id); query.setParameter("id", id);
List<Tuple> list = query.list(); List<Tuple> list = query.list();
...@@ -78,13 +78,15 @@ public class DinasOrganizationDaoImpl implements DinasOrganizationDao, DinasOrga ...@@ -78,13 +78,15 @@ public class DinasOrganizationDaoImpl implements DinasOrganizationDao, DinasOrga
String name = tuple.get(1, String.class); String name = tuple.get(1, String.class);
String code = tuple.get(2, String.class); String code = tuple.get(2, String.class);
String address = tuple.get(3, String.class); String address = tuple.get(3, String.class);
String type = tuple.get(4, String.class); String type = tuple.get(5, String.class);
UUID deparentId = tuple.get(4, UUID.class);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("id", fid); map.put("id", fid);
map.put("name", name); map.put("name", name);
map.put("code", code); map.put("code", code);
map.put("address", address); map.put("address", address);
map.put("type", type); map.put("type", type);
map.put("deparentId", deparentId);
result.add(map); result.add(map);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment