sql2017111705

来源:互联网 发布:群众网络安全保密 编辑:程序博客网 时间:2024/06/05 01:58
public static JSONObject getImageSrc(JSONObject params, ActionContext context) throws SQLException, NamingException {
JSONObject json = new JSONObject();
String sID = params.getString("sID");
Connection conn = context.getConnection("system");
String sql = "select sPhoto from sa_opperson where sID = '"+sID+"'";
Table table = DataUtils.queryData(conn, sql, null, null, null, null);
Iterator<Row> iterator = table.getRows().iterator();
if(iterator.hasNext()){
json.put("src", iterator.next().getString("sPhoto"));
}else{
json.put("src", false);
}

return json;
}
原创粉丝点击