列名无效的问题!

海的童话 海的童话 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
public List getPlatformList(String pf){
String sql="select t4.deviceid,t4.devicetype,t4.devicename,t4.stationid,t4.xpoint,t4.ypoint,t4.platform,t5.downlinkid as downlinkids from t_platform_topo t4 left join (select t1.deviceid,t2.downlinkid from t_platform_topo t1 , t_node_display t2 ,t_station t3 "+
"where t1.stationid=t3.stationid and t2.station=t3.stationname and instr(t2.nodename,t1.devicename)>0 and t1.platform ='"+pf+"' and t1.devicetype=3) t5 on "+
"t4.deviceid = t5.deviceid where t4.platform='"+pf+"'";
return getJdbcTemplate().query(sql, new PlatformTopoMapper());
}

class PlatformTopoMapper implements RowMapper{

public Object mapRow(ResultSet rowSet, int rowNum) throws SQLException {
final PlatformTopoBO bo = new PlatformTopoBO();
bo.setDeviceid(rowSet.getLong("deviceid"));
bo.setDevicename(rowSet.getString("devicename"));
bo.setDevicetype(rowSet.getInt("devicetype"));
bo.setPlatform(rowSet.getString("platform"));
bo.setStationid(rowSet.getInt("stationid"));
bo.setXpoint(rowSet.getInt("xpoint"));
bo.setYpoint(rowSet.getInt("ypoint"));
bo.setDownlinkid(rowSet.getString("downlinkids")); return bo;
}

}

红色部分就是发出报错的地方! 数据库查没有问题 可能因为这个t5不是一个实际意义的表 所以不能识别downlinkid 请高手指教下!
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
海的童话
Web 开发 81,108 成员 341,721 内容