|  | @ -129,47 +129,58 @@ public class UserService extends BaseJpaService<UserDO, UserDao> {
 | 
	
		
			
				|  |  |         Map<String,Object> userinfo = new HashedMap();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         UserDO user = userDao.findOne(id);
 | 
	
		
			
				|  |  |         RoleDO role = roleDao.findByCode(user.getRoleCode());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         userinfo.put("id",user.getId());
 | 
	
		
			
				|  |  |         userinfo.put("name",user.getName());
 | 
	
		
			
				|  |  |         userinfo.put("role",role.getName());
 | 
	
		
			
				|  |  |         userinfo.put("roleCode",role.getCode());
 | 
	
		
			
				|  |  |         userinfo.put("system",role.getSystem());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if("admin".equals(role.getCode())){
 | 
	
		
			
				|  |  |         if(user!=null){
 | 
	
		
			
				|  |  |             userinfo.put("id",user.getId());
 | 
	
		
			
				|  |  |             userinfo.put("name",user.getName());
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }else if("saasAdmin".equals(role.getCode())){
 | 
	
		
			
				|  |  |         //获取角色
 | 
	
		
			
				|  |  |         RoleDO role = roleDao.findOne(user.getRoleCode());
 | 
	
		
			
				|  |  |         if(role!=null){
 | 
	
		
			
				|  |  |             userinfo.put("role",role.getId());
 | 
	
		
			
				|  |  |             userinfo.put("roleCode",role.getCode());
 | 
	
		
			
				|  |  |             userinfo.put("system",role.getSystem());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             if("admin".equals(role.getCode())){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             }else if("saasAdmin".equals(role.getCode())){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 if(org.apache.commons.lang3.StringUtils.isNotBlank(user.getId())){
 | 
	
		
			
				|  |  |                     SaasDO saas = saasDao.findOne(user.getSaasId());
 | 
	
		
			
				|  |  |                     Map<String,Object> ss = new HashedMap();
 | 
	
		
			
				|  |  |                     ss.put("id",saas.getId());
 | 
	
		
			
				|  |  |                     ss.put("name",saas.getName());
 | 
	
		
			
				|  |  |                     userinfo.put("saas",ss);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             }else if("hosAdmin".equals(role.getCode())){
 | 
	
		
			
				|  |  |                 String sql = "SELECT " +
 | 
	
		
			
				|  |  |                         " g.code AS orgCode, " +
 | 
	
		
			
				|  |  |                         " g.province_code AS provinceCode, " +
 | 
	
		
			
				|  |  |                         " g.province_name AS privinceName, " +
 | 
	
		
			
				|  |  |                         " g.city_code AS cityCode, " +
 | 
	
		
			
				|  |  |                         " g.city_name AS cityName, " +
 | 
	
		
			
				|  |  |                         " g.town_code AS townCode, " +
 | 
	
		
			
				|  |  |                         " g.town_name AS townName, " +
 | 
	
		
			
				|  |  |                         " g.street_code AS streetCode, " +
 | 
	
		
			
				|  |  |                         " g.street_name AS streetName, " +
 | 
	
		
			
				|  |  |                         " g.name, " +
 | 
	
		
			
				|  |  |                         " address " +
 | 
	
		
			
				|  |  |                         " FROM " +
 | 
	
		
			
				|  |  |                         " base_org g " +
 | 
	
		
			
				|  |  |                         " JOIN base_org_user u ON g.`code` = u.org_code " +
 | 
	
		
			
				|  |  |                         " WHERE  " +
 | 
	
		
			
				|  |  |                         " u.user_id = '"+id+"'";
 | 
	
		
			
				|  |  |                 List<Map<String,Object>> org = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  |                 if(org!=null&&org.size()>0){
 | 
	
		
			
				|  |  |                     userinfo.put("org",org.get(0));
 | 
	
		
			
				|  |  |                 }else{
 | 
	
		
			
				|  |  |                     userinfo.put("org",null);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             if(org.apache.commons.lang3.StringUtils.isNotBlank(user.getId())){
 | 
	
		
			
				|  |  |                 SaasDO saas = saasDao.findOne(user.getSaasId());
 | 
	
		
			
				|  |  |                 Map<String,Object> ss = new HashedMap();
 | 
	
		
			
				|  |  |                 ss.put("id",saas.getId());
 | 
	
		
			
				|  |  |                 ss.put("name",saas.getName());
 | 
	
		
			
				|  |  |                 userinfo.put("saas",ss);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }else if("hosAdmin".equals(role.getCode())){
 | 
	
		
			
				|  |  |             String sql = "SELECT " +
 | 
	
		
			
				|  |  |                     " g.code AS orgCode, " +
 | 
	
		
			
				|  |  |                     " g.province_code AS provinceCode, " +
 | 
	
		
			
				|  |  |                     " g.province_name AS privinceName, " +
 | 
	
		
			
				|  |  |                     " g.city_code AS cityCode, " +
 | 
	
		
			
				|  |  |                     " g.city_name AS cityName, " +
 | 
	
		
			
				|  |  |                     " g.town_code AS townCode, " +
 | 
	
		
			
				|  |  |                     " g.town_name AS townName, " +
 | 
	
		
			
				|  |  |                     " g.street_code AS streetCode, " +
 | 
	
		
			
				|  |  |                     " g.street_name AS streetName, " +
 | 
	
		
			
				|  |  |                     " g.name, " +
 | 
	
		
			
				|  |  |                     " address " +
 | 
	
		
			
				|  |  |                     " FROM " +
 | 
	
		
			
				|  |  |                     " base_org g " +
 | 
	
		
			
				|  |  |                     " JOIN base_org_user u ON g.`code` = u.org_code " +
 | 
	
		
			
				|  |  |                     " WHERE  " +
 | 
	
		
			
				|  |  |                     " u.user_id = '"+id+"'";
 | 
	
		
			
				|  |  |             List<Map<String,Object>> org = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  |             userinfo.put("org",org.get(0));
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return userinfo;
 |