- public void export() throws IOException{
- HttpServletResponse response = Struts2Utils.getResponse();
- Date date = new Date();
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
- String fileName = sdf.format(date) + "远程用户";
- fileName = new String(fileName.getBytes("gb2312"), "iso8859-1");
- response.addHeader("Content-Disposition", "attachment; filename="+ fileName + ".txt");
- response.setContentType("text/plain");
- PrintWriter out=response.getWriter();
- List<AykjSysUser> users=sysUserService.getAuditedUsers();
- for(AykjSysUser user:users){
- String passwd=interlibUserDao.getInterlibPassword(user.getReadercardno());
- out.write(user.getReadercardno()+","+passwd+","+user.getRealname()+"\r\n");
- }
- out.close();
- }