3.检索重复上传的资源
//这里上传在上面上传资源时候,将保存原始资源名字public List<UserFile> findRetrieveListByOwnerId(int ownerId,int isDelete){List<UserFile> fileList = new ArrayList<UserFile>();Connection conn = db.getConnection();PreparedStatement ps = null;ResultSet rs = null;UserFile userFile = null;String sql="select * from file where oldfilename in ( " +" select a.oldfilename from (select oldfilename,count(id) counts from file GROUP BY oldfilenameHAVING counts>1) a" +" ) andownerid=? and isDelete=?";ps = conn.prepareStatement(sql);ps.setInt(1, ownerId);ps.setInt(2, isDelete);rs = ps.executeQuery();while(rs.next()){userFile = new UserFile();userFile.setId(rs.getInt(1));userFile.setFilename(rs.getString(2));userFile.setPath(rs.getString(3));userFile.setCreateTime(rs.getTimestamp(4));userFile.setIsShared(rs.getInt(5));userFile.setOwnerId(rs.getInt(6));userFile.setFileSize(rs.getString(7));userFile.setCounts(rs.getInt(8));userFile.setSharedReason(rs.getString("SharedReason"));userFile.setSharedTime(rs.getString("SharedTime"));fileList.add(userFile);}return fileList;}
4.平台会员充值
//前端jsp代码<body><div id="wrApper"><%@include file="common/nav.jsp" %><div id="page-wrapper"><div class=""><div class="col-md-12"><h1 class="margin-bottom-15">以下是微信付款码,扫码即可支付</h1><div class="form-group"><div class="col-md-12"><div class="control-wrapper"><div class="text-center" id="div1"><input type="submit" value=https://www.isolves.com/it/cxkf/yy/JAVA/2020-12-31/"扫码付款"class="btn btn-success">