今天考虑加入书架的个人化,首先对书架的后台数据格式进行了设计
同时,进行了深色模式的配置。
//加入书架 public boolean addshelf(Bookshelf bookshelf){ String sql="insert into Bookshelf(BookName,username) values(?,?)"; Object obj[]= {bookshelf.getBookName(),bookshelf.getUsername()}; return DBUtil.executeUpdate(sql,obj); } //从书架删除 public boolean deleteshelf(Bookshelf bookshelf) { String sql="delete from Bookshelf where id=? and BookName=? and username=? "; Object obj[]= {bookshelf.getId(),bookshelf.getBookName(),bookshelf.getUsername()}; return DBUtil.executeUpdate(sql,obj); }