├── .gitignore ├── README.md ├── TCPClient ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── controller │ │ └── Operator.class │ ├── model │ │ ├── Book.class │ │ ├── ReturnResult.class │ │ └── User.class │ ├── net │ │ └── Client.class │ ├── ui │ │ ├── AddUI$1.class │ │ ├── AddUI$2.class │ │ ├── AddUI$3.class │ │ ├── AddUI.class │ │ ├── AddUserUI$1.class │ │ ├── AddUserUI$2.class │ │ ├── AddUserUI.class │ │ ├── AdminUI$1.class │ │ ├── AdminUI$2.class │ │ ├── AdminUI$3.class │ │ ├── AdminUI.class │ │ ├── AllBookUI$1.class │ │ ├── AllBookUI$2.class │ │ ├── AllBookUI.class │ │ ├── AuthorFindUI$1.class │ │ ├── AuthorFindUI$2.class │ │ ├── AuthorFindUI.class │ │ ├── BorrowUI$1.class │ │ ├── BorrowUI$2.class │ │ ├── BorrowUI$3.class │ │ ├── BorrowUI$4.class │ │ ├── BorrowUI.class │ │ ├── ChangeUI$1.class │ │ ├── ChangeUI$2.class │ │ ├── ChangeUI$3.class │ │ ├── ChangeUI.class │ │ ├── ChangeUserUI$1.class │ │ ├── ChangeUserUI$2.class │ │ ├── ChangeUserUI.class │ │ ├── ClearUI$1.class │ │ ├── ClearUI$2.class │ │ ├── ClearUI$3.class │ │ ├── ClearUI.class │ │ ├── DeleteUI$1.class │ │ ├── DeleteUI$2.class │ │ ├── DeleteUI$3.class │ │ ├── DeleteUI.class │ │ ├── DeleteUserUI$1.class │ │ ├── DeleteUserUI$2.class │ │ ├── DeleteUserUI$3.class │ │ ├── DeleteUserUI.class │ │ ├── Error$1.class │ │ ├── Error$2.class │ │ ├── Error.class │ │ ├── FindmenuUI$1.class │ │ ├── FindmenuUI$2.class │ │ ├── FindmenuUI$3.class │ │ ├── FindmenuUI$4.class │ │ ├── FindmenuUI$5.class │ │ ├── FindmenuUI.class │ │ ├── IDfindUI$1.class │ │ ├── IDfindUI$2.class │ │ ├── IDfindUI.class │ │ ├── LoginUI$1.class │ │ ├── LoginUI$2.class │ │ ├── LoginUI$3.class │ │ ├── LoginUI.class │ │ ├── MenuUI$1.class │ │ ├── MenuUI$10.class │ │ ├── MenuUI$11.class │ │ ├── MenuUI$12.class │ │ ├── MenuUI$2.class │ │ ├── MenuUI$3.class │ │ ├── MenuUI$4.class │ │ ├── MenuUI$5.class │ │ ├── MenuUI$6.class │ │ ├── MenuUI$7.class │ │ ├── MenuUI$8.class │ │ ├── MenuUI$9.class │ │ ├── MenuUI.class │ │ ├── NameFindUI$1.class │ │ ├── NameFindUI$2.class │ │ ├── NameFindUI$3.class │ │ ├── NameFindUI.class │ │ ├── PriceFindUI$1.class │ │ ├── PriceFindUI$2.class │ │ ├── PriceFindUI.class │ │ ├── PrintUI$1.class │ │ ├── PrintUI.class │ │ ├── ReaderUI$1.class │ │ ├── ReaderUI$2.class │ │ ├── ReaderUI$3.class │ │ ├── ReaderUI$4.class │ │ ├── ReaderUI$5.class │ │ ├── ReaderUI$6.class │ │ ├── ReaderUI.class │ │ ├── ReturnBookUI$1.class │ │ ├── ReturnBookUI$2.class │ │ ├── ReturnBookUI$3.class │ │ ├── ReturnBookUI$4.class │ │ ├── ReturnBookUI.class │ │ ├── Success$1.class │ │ ├── Success$2.class │ │ ├── Success$3.class │ │ └── Success.class │ └── util │ │ ├── Parser.class │ │ └── Protocol.class └── src │ ├── controller │ └── Operator.java │ ├── model │ ├── Book.java │ ├── ReturnResult.java │ └── User.java │ ├── net │ └── Client.java │ ├── ui │ ├── AddUI.java │ ├── AddUserUI.java │ ├── AdminUI.java │ ├── AllBookUI.java │ ├── AuthorFindUI.java │ ├── BorrowUI.java │ ├── ChangeUI.java │ ├── ChangeUserUI.java │ ├── ClearUI.java │ ├── DeleteUI.java │ ├── DeleteUserUI.java │ ├── Error.java │ ├── FindmenuUI.java │ ├── IDfindUI.java │ ├── LoginUI.java │ ├── MenuUI.java │ ├── NameFindUI.java │ ├── PriceFindUI.java │ ├── PrintUI.java │ ├── ReaderUI.java │ ├── ReturnBookUI.java │ └── Success.java │ └── util │ ├── Parser.java │ └── Protocol.java ├── TCPServer ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── control │ │ └── Operator.class │ ├── jdbc │ │ └── Database.class │ ├── model │ │ └── Book.class │ ├── net │ │ ├── Handler.class │ │ └── Server.class │ └── util │ │ ├── Parser.class │ │ └── Protocol.class ├── mysql-connector-java-5.1.41-bin.jar └── src │ ├── control │ └── Operator.java │ ├── jdbc │ └── Database.java │ ├── model │ └── Book.java │ ├── net │ ├── Handler.java │ └── Server.java │ └── util │ ├── Parser.java │ └── Protocol.java └── books20170622172828.sql /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.ear 17 | *.zip 18 | *.tar.gz 19 | *.rar 20 | 21 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 22 | hs_err_pid* 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CSBookManageSystem2 2 | 客户端+服务端(CS)版图书管理系统 3 | 4 | **系统介绍:** 5 | 6 | 本图书管理系统采用CS(Cient+Server)结构,采用MVC编程模式,简单的实现了的图书管理系统的各个功能:1、用户登陆以及管理功能 2、图书管理功能 3、查询功能 4、排行榜功能 5、借阅归还功能 6、用户权限功能(读者+管理员+超级管理员)等。 大量采用Socket编程、数据库编程、以及简单的java Swing图形界面编程等。不算ui界面(即java Swing图形界面编程),代码量在1400行左右,总代码量在4000行左右。 特此声明:本系统设计得较简单,只适用于新手参考学习。 7 | 8 | **更新日志:** 9 | 10 | 这次是对CS版图书管理系统进行更新: 11 | - 1. 实现了管理员、用户等权限功能 12 | - 2. 实现了借阅归还功能 13 | - 3. 实现了排行榜功能 14 | - 4. 实现读者管理功能 15 | - 5. 实现管理员管理功能 16 | 17 | **数据库设计** 18 | 19 | 由于数据库比较简单,所以就不绘图了。 20 | 21 | ***User表:*** 22 | 23 | 字段名 | 字段类型 | 其他 24 | ----|------|---- 25 | uid | int | 自增主键 26 | username | varchar | not null 27 | password | varchar |not null 28 | borrowTime | int | default 0 29 | status | int |default 0 (0代表读者,1代表管理员) 30 | 31 | ***Book表:*** 32 | 33 | 字段名 | 字段类型 | 其他 34 | ----|------|---- 35 | bid | int | 自增主键 36 | bookname | varchar | not null 37 | author | varchar | not null 38 | price | float | not null 39 | category | varchar | not null 40 | readtime | int |default 0 41 | isout | int | 外键 (null代表未借出,否则为user表里的UID,代表借给了谁) 42 | 43 | **csdn博客:** 44 | http://blog.csdn.net/alextan_?viewmode=contents 45 | -------------------------------------------------------------------------------- /TCPClient/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /TCPClient/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | TCPClient 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /TCPClient/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.8 12 | -------------------------------------------------------------------------------- /TCPClient/bin/controller/Operator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/controller/Operator.class -------------------------------------------------------------------------------- /TCPClient/bin/model/Book.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/model/Book.class -------------------------------------------------------------------------------- /TCPClient/bin/model/ReturnResult.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/model/ReturnResult.class -------------------------------------------------------------------------------- /TCPClient/bin/model/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/model/User.class -------------------------------------------------------------------------------- /TCPClient/bin/net/Client.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/net/Client.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AddUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AddUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AddUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AddUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AddUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AddUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AddUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AddUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AddUserUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AddUserUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AddUserUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AddUserUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AddUserUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AddUserUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AdminUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AdminUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AdminUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AdminUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AdminUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AdminUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AdminUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AdminUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AllBookUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AllBookUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AllBookUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AllBookUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AllBookUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AllBookUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AuthorFindUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AuthorFindUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AuthorFindUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AuthorFindUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/AuthorFindUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/AuthorFindUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/BorrowUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/BorrowUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/BorrowUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/BorrowUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/BorrowUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/BorrowUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/BorrowUI$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/BorrowUI$4.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/BorrowUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/BorrowUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ChangeUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ChangeUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ChangeUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ChangeUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ChangeUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ChangeUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ChangeUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ChangeUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ChangeUserUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ChangeUserUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ChangeUserUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ChangeUserUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ChangeUserUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ChangeUserUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ClearUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ClearUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ClearUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ClearUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ClearUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ClearUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ClearUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ClearUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/DeleteUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/DeleteUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/DeleteUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/DeleteUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/DeleteUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/DeleteUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/DeleteUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/DeleteUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/DeleteUserUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/DeleteUserUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/DeleteUserUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/DeleteUserUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/DeleteUserUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/DeleteUserUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/DeleteUserUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/DeleteUserUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/Error$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/Error$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/Error$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/Error$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/Error.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/Error.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/FindmenuUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/FindmenuUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/FindmenuUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/FindmenuUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/FindmenuUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/FindmenuUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/FindmenuUI$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/FindmenuUI$4.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/FindmenuUI$5.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/FindmenuUI$5.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/FindmenuUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/FindmenuUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/IDfindUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/IDfindUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/IDfindUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/IDfindUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/IDfindUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/IDfindUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/LoginUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/LoginUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/LoginUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/LoginUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/LoginUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/LoginUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/LoginUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/LoginUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$10.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$10.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$11.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$11.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$12.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$12.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$4.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$5.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$5.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$6.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$6.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$7.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$7.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$8.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$8.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI$9.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI$9.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/MenuUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/MenuUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/NameFindUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/NameFindUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/NameFindUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/NameFindUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/NameFindUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/NameFindUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/NameFindUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/NameFindUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/PriceFindUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/PriceFindUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/PriceFindUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/PriceFindUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/PriceFindUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/PriceFindUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/PrintUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/PrintUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/PrintUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/PrintUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReaderUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReaderUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReaderUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReaderUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReaderUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReaderUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReaderUI$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReaderUI$4.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReaderUI$5.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReaderUI$5.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReaderUI$6.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReaderUI$6.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReaderUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReaderUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReturnBookUI$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReturnBookUI$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReturnBookUI$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReturnBookUI$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReturnBookUI$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReturnBookUI$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReturnBookUI$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReturnBookUI$4.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/ReturnBookUI.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/ReturnBookUI.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/Success$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/Success$1.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/Success$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/Success$2.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/Success$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/Success$3.class -------------------------------------------------------------------------------- /TCPClient/bin/ui/Success.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/ui/Success.class -------------------------------------------------------------------------------- /TCPClient/bin/util/Parser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/util/Parser.class -------------------------------------------------------------------------------- /TCPClient/bin/util/Protocol.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/bin/util/Protocol.class -------------------------------------------------------------------------------- /TCPClient/src/controller/Operator.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.util.ArrayList; 4 | 5 | import model.Book; 6 | import model.ReturnResult; 7 | import model.User; 8 | import net.Client; 9 | import util.Parser; 10 | import util.Protocol; 11 | 12 | public class Operator { 13 | 14 | public static int clearKey = 123456; 15 | 16 | public boolean returnBook(String username,String idStr){ 17 | Protocol protocol = new Protocol(); 18 | String msg = protocol.returnBook(username, idStr); 19 | Client.write(msg); 20 | System.out.println("send:"+ msg); 21 | String returnStr = Client.read(); 22 | if(returnStr.equals("success")){ 23 | return true; 24 | }else{ 25 | return false; 26 | } 27 | } 28 | 29 | public boolean borrowBook(String username,String idStr){ 30 | Protocol protocol = new Protocol(); 31 | String msg = protocol.borrowBook(username, idStr); 32 | Client.write(msg); 33 | System.out.println("send:"+ msg); 34 | String returnStr = Client.read(); 35 | if(returnStr.equals("success")){ 36 | return true; 37 | }else{ 38 | return false; 39 | } 40 | } 41 | 42 | public ArrayList printBook(String isout){ 43 | Protocol protocol = new Protocol(); 44 | String msg = protocol.printBook(isout); 45 | Client.write(msg); 46 | System.out.println("send:"+ msg); 47 | String returnStr = Client.read(); 48 | Parser parser = new Parser(); 49 | ArrayList resultStr = parser.printBook(returnStr); 50 | return resultStr; 51 | } 52 | 53 | public boolean changeUser(String username,String pwd){ 54 | Protocol protocol = new Protocol(); 55 | String msg = protocol.changeUser(username, pwd); 56 | Client.write(msg); 57 | System.out.println("send:"+ msg); 58 | String returnStr = Client.read(); 59 | if(returnStr.equals("success")){ 60 | return true; 61 | }else{ 62 | return false; 63 | } 64 | } 65 | 66 | public boolean deleteUser(String idStr,int status){ 67 | Protocol protocol = new Protocol(); 68 | String msg = protocol.deleteUser(idStr,status); 69 | Client.write(msg); 70 | System.out.println("send:"+ msg); 71 | String returnStr = Client.read(); 72 | if(returnStr.equals("success")){ 73 | return true; 74 | }else{ 75 | return false; 76 | } 77 | } 78 | 79 | public ArrayList printUser(int status){ 80 | Protocol protocol = new Protocol(); 81 | String msg = protocol.printUser(status); 82 | Client.write(msg); 83 | System.out.println("send:"+ msg); 84 | String returnStr = Client.read(); 85 | Parser parser = new Parser(); 86 | ArrayList resultStr = parser.printUser(returnStr); 87 | return resultStr; 88 | } 89 | 90 | public boolean addUser(String username,String password, int status){ 91 | Protocol protocol = new Protocol(); 92 | String msg = protocol.addUser(username, password, status); 93 | Client.write(msg); 94 | System.out.println("send:"+ msg); 95 | String returnStr = Client.read(); 96 | if(returnStr.equals("success")){ 97 | return true; 98 | }else{ 99 | return false; 100 | } 101 | } 102 | 103 | public boolean login(String username, String password, int status){ 104 | Protocol protocol = new Protocol(); 105 | String msg = protocol.login(username, password, status); 106 | Client.write(msg); 107 | System.out.println("send:"+ msg); 108 | String returnStr = Client.read(); 109 | if(returnStr.equals("success")){ 110 | return true; 111 | }else{ 112 | return false; 113 | } 114 | 115 | } 116 | 117 | public ReturnResult addBook(String bookname, String author, float price) 118 | { 119 | Protocol protocol = new Protocol(); 120 | String msg = protocol.getAddBookMsg(bookname, author, price); 121 | Client.write(msg); 122 | System.out.println("operator:"+ msg); 123 | String returnStr = Client.read(); 124 | System.out.println(returnStr); 125 | Parser parser = new Parser(); 126 | ReturnResult returnResult = parser.getAddBookResult(returnStr); 127 | return returnResult; 128 | } 129 | 130 | public ReturnResult deleteBook(int id, String bookname){ 131 | Protocol protocol = new Protocol(); 132 | String msg = protocol.getdeleteBookMsg(id, bookname); 133 | Client.write(msg); 134 | System.out.println("operator:"+ msg); 135 | String returnStr = Client.read(); 136 | System.out.println(returnStr); 137 | Parser parser = new Parser(); 138 | ReturnResult returnResult = parser.getDeleteBookResult(returnStr); 139 | return returnResult; 140 | } 141 | 142 | public ReturnResult changeBook(int id, String bookname, String changename){ 143 | Protocol protocol = new Protocol(); 144 | String msg = protocol.getchangeBookMsg(id, bookname, changename); 145 | Client.write(msg); 146 | System.out.println("operator:"+ msg); 147 | String returnStr = Client.read(); 148 | System.out.println(returnStr); 149 | Parser parser = new Parser(); 150 | ReturnResult returnResult = parser.getChangeBookResult(returnStr); 151 | return returnResult; 152 | } 153 | 154 | public ReturnResult selectBook(int id, String bookname, String dimname, String author, float minprice, float maxprice){ 155 | Protocol protocol = new Protocol(); 156 | String msg = protocol.getselectBookMsg(id, bookname, dimname, author, minprice, maxprice); 157 | Client.write(msg); 158 | System.out.println("operator:"+ msg); 159 | String returnStr = Client.read(); 160 | System.out.println(returnStr); 161 | Parser parser = new Parser(); 162 | ReturnResult returnResult = parser.getSelectBookResult(returnStr); 163 | return returnResult; 164 | } 165 | 166 | public ReturnResult findAll() 167 | { 168 | Protocol protocol = new Protocol(); 169 | String msg = protocol.findAllMsg(); 170 | Client.write(msg); 171 | System.out.println("operator:"+ msg); 172 | String returnStr = Client.read(); 173 | System.out.println(returnStr); 174 | Parser parser = new Parser(); 175 | ReturnResult returnResult = parser.findAllResult(returnStr); 176 | return returnResult; 177 | } 178 | 179 | public ReturnResult Clear(){ 180 | Protocol protocol = new Protocol(); 181 | String msg = protocol.clear(); 182 | Client.write(msg); 183 | System.out.println("operator:"+ msg); 184 | String returnStr = Client.read(); 185 | System.out.println(returnStr); 186 | Parser parser = new Parser(); 187 | ReturnResult returnResult = parser.clearResult(returnStr); 188 | return returnResult; 189 | } 190 | 191 | public void Exit(){ 192 | Protocol protocol = new Protocol(); 193 | String msg = protocol.exit(); 194 | Client.write(msg); 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /TCPClient/src/model/Book.java: -------------------------------------------------------------------------------- 1 | package model; 2 | 3 | public class Book { 4 | public String id; 5 | public String bookname; 6 | public String author; 7 | public String price; 8 | public String readtime; 9 | public String isout; 10 | 11 | public Book(String id, String bookname, String author, String price, String isout, String readtime){ 12 | this.id = id; 13 | this.bookname = bookname; 14 | this.author = author; 15 | this.price = price; 16 | this.readtime = readtime; 17 | this.isout = isout; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /TCPClient/src/model/ReturnResult.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/model/ReturnResult.java -------------------------------------------------------------------------------- /TCPClient/src/model/User.java: -------------------------------------------------------------------------------- 1 | package model; 2 | 3 | public class User { 4 | 5 | public String uid; 6 | public String username; 7 | public String password; 8 | public String borrowtime; 9 | 10 | public User(String uid,String username,String password,String borrowtime){ 11 | this.uid = uid; 12 | this.username = username; 13 | this.password = password; 14 | this.borrowtime = borrowtime; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /TCPClient/src/net/Client.java: -------------------------------------------------------------------------------- 1 | package net; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.io.OutputStream; 6 | import java.net.Socket; 7 | import java.net.UnknownHostException; 8 | import java.util.Scanner; 9 | 10 | public class Client { 11 | 12 | public static Socket tcpConn = null; 13 | public static Scanner in; 14 | public static OutputStream out; 15 | 16 | 17 | static{ 18 | try { 19 | tcpConn = new Socket("127.0.0.1",1234); 20 | in = new Scanner(tcpConn.getInputStream()); 21 | out = tcpConn.getOutputStream(); 22 | } catch (UnknownHostException e) { 23 | // TODO Auto-generated catch block 24 | e.printStackTrace(); 25 | } catch (IOException e) { 26 | // TODO Auto-generated catch block 27 | e.printStackTrace(); 28 | } 29 | } 30 | 31 | public static void write(String msg) 32 | { 33 | try { 34 | out.write(msg.getBytes()); 35 | } catch (IOException e) { 36 | // TODO Auto-generated catch block 37 | e.printStackTrace(); 38 | } 39 | } 40 | 41 | public static String read() 42 | { 43 | return in.nextLine(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /TCPClient/src/ui/AddUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/AddUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/AddUserUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/AddUserUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/AdminUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/AdminUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/AllBookUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/AllBookUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/AuthorFindUI.java: -------------------------------------------------------------------------------- 1 | package ui; 2 | 3 | import java.awt.BorderLayout; 4 | import java.awt.EventQueue; 5 | 6 | import javax.swing.JFrame; 7 | import javax.swing.JPanel; 8 | import javax.swing.border.EmptyBorder; 9 | 10 | import controller.Operator; 11 | import model.ReturnResult; 12 | 13 | import javax.swing.JLabel; 14 | import javax.swing.JTextField; 15 | import javax.swing.JButton; 16 | import java.awt.event.ActionListener; 17 | import java.util.ArrayList; 18 | import java.awt.event.ActionEvent; 19 | 20 | public class AuthorFindUI extends JFrame { 21 | 22 | private JPanel contentPane; 23 | private JTextField authorText; 24 | 25 | /** 26 | * Launch the application. 27 | */ 28 | 29 | /** 30 | * Create the frame. 31 | */ 32 | public AuthorFindUI(String username) { 33 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 34 | setBounds(100, 100, 450, 300); 35 | contentPane = new JPanel(); 36 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 37 | setContentPane(contentPane); 38 | contentPane.setLayout(null); 39 | 40 | JLabel label = new JLabel("\u8BF7\u8F93\u5165\u60A8\u8981\u67E5\u627E\u7684\u4F5C\u8005\uFF1A"); 41 | label.setBounds(15, 48, 212, 21); 42 | contentPane.add(label); 43 | 44 | authorText = new JTextField(); 45 | authorText.setBounds(226, 45, 124, 27); 46 | contentPane.add(authorText); 47 | authorText.setColumns(10); 48 | 49 | JButton button = new JButton("\u63D0\u4EA4"); 50 | button.addActionListener(new ActionListener() { 51 | public void actionPerformed(ActionEvent arg0) { 52 | String name = null; 53 | int id = -1; 54 | String author = null; 55 | String dimname = null; 56 | float minprice = 0; 57 | float maxprice = -1; 58 | Operator operator = new Operator(); 59 | author = authorText.getText(); 60 | if (author.equals("")) 61 | { 62 | Error error = new Error(); 63 | error.setVisible(true); 64 | AuthorFindUI.this.dispose(); 65 | } 66 | else 67 | { 68 | ReturnResult res = operator.selectBook(id, name, dimname, author, minprice, maxprice); 69 | PrintUI menu = new PrintUI(res.result,username); 70 | menu.setVisible(true); 71 | AuthorFindUI.this.dispose(); 72 | } 73 | } 74 | }); 75 | button.setBounds(278, 158, 123, 29); 76 | contentPane.add(button); 77 | 78 | JButton button_1 = new JButton("\u8FD4\u56DE"); 79 | button_1.addActionListener(new ActionListener() { 80 | public void actionPerformed(ActionEvent arg0) { 81 | FindmenuUI menu = new FindmenuUI(username); 82 | menu.setVisible(true); 83 | AuthorFindUI.this.dispose(); 84 | } 85 | }); 86 | button_1.setBounds(40, 158, 123, 29); 87 | contentPane.add(button_1); 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /TCPClient/src/ui/BorrowUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/BorrowUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/ChangeUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/ChangeUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/ChangeUserUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/ChangeUserUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/ClearUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/ClearUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/DeleteUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/DeleteUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/DeleteUserUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/DeleteUserUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/Error.java: -------------------------------------------------------------------------------- 1 | package ui; 2 | 3 | import java.awt.BorderLayout; 4 | import java.awt.EventQueue; 5 | 6 | import javax.swing.JFrame; 7 | import javax.swing.JPanel; 8 | import javax.swing.border.EmptyBorder; 9 | import javax.swing.JLabel; 10 | import javax.swing.JButton; 11 | import java.awt.event.ActionListener; 12 | import java.awt.event.ActionEvent; 13 | 14 | public class Error extends JFrame { 15 | 16 | private JPanel contentPane; 17 | 18 | /** 19 | * Launch the application. 20 | */ 21 | public static void main(String[] args) { 22 | EventQueue.invokeLater(new Runnable() { 23 | public void run() { 24 | try { 25 | Error frame = new Error(); 26 | frame.setVisible(true); 27 | } catch (Exception e) { 28 | e.printStackTrace(); 29 | } 30 | } 31 | }); 32 | } 33 | 34 | /** 35 | * Create the frame. 36 | */ 37 | public Error() { 38 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 39 | setBounds(100, 100, 450, 300); 40 | contentPane = new JPanel(); 41 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 42 | setContentPane(contentPane); 43 | contentPane.setLayout(null); 44 | 45 | JLabel label = new JLabel("\u64CD\u4F5C\u5931\u8D25\uFF01"); 46 | label.setBounds(151, 67, 110, 21); 47 | contentPane.add(label); 48 | 49 | JButton button = new JButton("\u8FD4\u56DE\u4E3B\u83DC\u5355"); 50 | button.addActionListener(new ActionListener() { 51 | public void actionPerformed(ActionEvent arg0) { 52 | MenuUI menu = new MenuUI(); 53 | menu.setVisible(true); 54 | Error.this.dispose(); 55 | } 56 | }); 57 | button.setBounds(246, 168, 123, 29); 58 | contentPane.add(button); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /TCPClient/src/ui/FindmenuUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/FindmenuUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/IDfindUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/IDfindUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/LoginUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/LoginUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/MenuUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/MenuUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/NameFindUI.java: -------------------------------------------------------------------------------- 1 | package ui; 2 | 3 | import java.awt.BorderLayout; 4 | import java.awt.EventQueue; 5 | 6 | import javax.swing.JFrame; 7 | import javax.swing.JPanel; 8 | import javax.swing.border.EmptyBorder; 9 | 10 | import controller.Operator; 11 | import model.ReturnResult; 12 | 13 | import javax.swing.JLabel; 14 | import javax.swing.JTextField; 15 | import javax.swing.JButton; 16 | import java.awt.event.ActionListener; 17 | import java.util.ArrayList; 18 | import java.awt.event.ActionEvent; 19 | 20 | public class NameFindUI extends JFrame { 21 | 22 | private JPanel contentPane; 23 | private JTextField nameText; 24 | 25 | 26 | /** 27 | * Create the frame. 28 | */ 29 | public NameFindUI(String username) { 30 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 31 | setBounds(100, 100, 450, 300); 32 | contentPane = new JPanel(); 33 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 34 | setContentPane(contentPane); 35 | contentPane.setLayout(null); 36 | 37 | JLabel label = new JLabel("\u8BF7\u8F93\u5165\u60A8\u8981\u67E5\u627E\u7684\u4E66\u540D\uFF1A"); 38 | label.setBounds(78, 53, 227, 21); 39 | contentPane.add(label); 40 | 41 | nameText = new JTextField(); 42 | nameText.setBounds(88, 90, 170, 27); 43 | contentPane.add(nameText); 44 | nameText.setColumns(10); 45 | 46 | JButton button = new JButton("\u6A21\u7CCA\u67E5\u627E"); 47 | button.addActionListener(new ActionListener() { 48 | public void actionPerformed(ActionEvent e) { 49 | String name = null; 50 | int id = -1; 51 | String author = null; 52 | String dimname = null; 53 | float minprice = 0; 54 | float maxprice = -1; 55 | Operator operator = new Operator(); 56 | dimname = nameText.getText(); 57 | if (dimname.equals("")) 58 | { 59 | Error error = new Error(); 60 | error.setVisible(true); 61 | NameFindUI.this.dispose(); 62 | } 63 | else 64 | { 65 | ReturnResult res = operator.selectBook(id, name, dimname, author, minprice, maxprice); 66 | PrintUI menu = new PrintUI(res.result,username); 67 | menu.setVisible(true); 68 | NameFindUI.this.dispose(); 69 | } 70 | } 71 | }); 72 | button.setBounds(241, 176, 123, 29); 73 | contentPane.add(button); 74 | 75 | JButton button_1 = new JButton("\u7CBE\u786E\u67E5\u627E"); 76 | button_1.addActionListener(new ActionListener() { 77 | public void actionPerformed(ActionEvent arg0) { 78 | String name = null; 79 | int id = -1; 80 | String author = null; 81 | String dimname = null; 82 | float minprice = 0; 83 | float maxprice = -1; 84 | Operator operator = new Operator(); 85 | name = nameText.getText(); 86 | if (name.equals("")) 87 | { 88 | Error error = new Error(); 89 | error.setVisible(true); 90 | NameFindUI.this.dispose(); 91 | } 92 | else 93 | { 94 | ReturnResult res = operator.selectBook(id, name, dimname, author, minprice, maxprice); 95 | PrintUI menu = new PrintUI(res.result,username); 96 | menu.setVisible(true); 97 | NameFindUI.this.dispose(); 98 | } 99 | } 100 | }); 101 | button_1.setBounds(241, 132, 123, 29); 102 | contentPane.add(button_1); 103 | 104 | JButton button_2 = new JButton("\u8FD4\u56DE"); 105 | button_2.addActionListener(new ActionListener() { 106 | public void actionPerformed(ActionEvent arg0) { 107 | FindmenuUI menu = new FindmenuUI(username); 108 | menu.setVisible(true); 109 | NameFindUI.this.dispose(); 110 | } 111 | }); 112 | button_2.setBounds(26, 176, 123, 29); 113 | contentPane.add(button_2); 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /TCPClient/src/ui/PriceFindUI.java: -------------------------------------------------------------------------------- 1 | package ui; 2 | 3 | import java.awt.BorderLayout; 4 | import java.awt.EventQueue; 5 | 6 | import javax.swing.JFrame; 7 | import javax.swing.JPanel; 8 | import javax.swing.border.EmptyBorder; 9 | 10 | import controller.Operator; 11 | import model.ReturnResult; 12 | 13 | import javax.swing.JLabel; 14 | import javax.swing.JTextField; 15 | import javax.swing.JButton; 16 | import java.awt.event.ActionListener; 17 | import java.util.ArrayList; 18 | import java.awt.event.ActionEvent; 19 | 20 | public class PriceFindUI extends JFrame { 21 | 22 | private JPanel contentPane; 23 | private JTextField minpriceText; 24 | private JTextField maxpriceText; 25 | 26 | /** 27 | * Create the frame. 28 | */ 29 | public PriceFindUI(String username) { 30 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 31 | setBounds(100, 100, 450, 300); 32 | contentPane = new JPanel(); 33 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 34 | setContentPane(contentPane); 35 | contentPane.setLayout(null); 36 | 37 | JLabel label = new JLabel("\u8BF7\u8F93\u5165\u60A8\u8981\u67E5\u627E\u7684\u4EF7\u683C\u533A\u95F4\uFF1A"); 38 | label.setBounds(50, 28, 274, 21); 39 | contentPane.add(label); 40 | 41 | minpriceText = new JTextField(); 42 | minpriceText.setBounds(36, 64, 96, 27); 43 | contentPane.add(minpriceText); 44 | minpriceText.setColumns(10); 45 | 46 | maxpriceText = new JTextField(); 47 | maxpriceText.setColumns(10); 48 | maxpriceText.setBounds(217, 64, 96, 27); 49 | contentPane.add(maxpriceText); 50 | 51 | JLabel label_1 = new JLabel("\u81F3"); 52 | label_1.setBounds(160, 67, 81, 21); 53 | contentPane.add(label_1); 54 | 55 | JButton button = new JButton("\u63D0\u4EA4"); 56 | button.addActionListener(new ActionListener() { 57 | public void actionPerformed(ActionEvent arg0) { 58 | String name = null; 59 | int id = -1; 60 | String author = null; 61 | String dimname = null; 62 | float minprice = 0; 63 | float maxprice = -1; 64 | Operator operator = new Operator(); 65 | try{ 66 | minprice = Float.parseFloat(minpriceText.getText()); 67 | maxprice = Float.parseFloat(maxpriceText.getText()); 68 | ReturnResult res = operator.selectBook(id, name, dimname, author, minprice, maxprice); 69 | PrintUI menu = new PrintUI(res.result,username); 70 | menu.setVisible(true); 71 | PriceFindUI.this.dispose(); 72 | }catch (Exception e){ 73 | Error error = new Error(); 74 | error.setVisible(true); 75 | PriceFindUI.this.dispose(); 76 | } 77 | } 78 | }); 79 | button.setBounds(245, 156, 123, 29); 80 | contentPane.add(button); 81 | 82 | JButton button_1 = new JButton("\u8FD4\u56DE"); 83 | button_1.addActionListener(new ActionListener() { 84 | public void actionPerformed(ActionEvent arg0) { 85 | FindmenuUI menu = new FindmenuUI(username); 86 | menu.setVisible(true); 87 | PriceFindUI.this.dispose(); 88 | } 89 | }); 90 | button_1.setBounds(15, 156, 123, 29); 91 | contentPane.add(button_1); 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /TCPClient/src/ui/PrintUI.java: -------------------------------------------------------------------------------- 1 | package ui; 2 | 3 | import java.awt.BorderLayout; 4 | import java.awt.EventQueue; 5 | 6 | import javax.swing.JFrame; 7 | import javax.swing.JPanel; 8 | import javax.swing.JScrollPane; 9 | import javax.swing.border.EmptyBorder; 10 | import javax.swing.JTable; 11 | import javax.swing.table.DefaultTableModel; 12 | 13 | import controller.Operator; 14 | import model.Book; 15 | 16 | import javax.swing.JButton; 17 | import java.awt.event.ActionListener; 18 | import java.util.ArrayList; 19 | import java.awt.event.ActionEvent; 20 | 21 | public class PrintUI extends JFrame { 22 | 23 | private JPanel contentPane; 24 | private JTable table; 25 | private JButton button; 26 | 27 | /** 28 | * Launch the application. 29 | */ 30 | /* 31 | public static void main(String[] args) { 32 | EventQueue.invokeLater(new Runnable() { 33 | public void run() { 34 | try { 35 | Object[][] obj = Object; 36 | PrintUI frame = new PrintUI(obj); 37 | frame.setVisible(true); 38 | } catch (Exception e) { 39 | e.printStackTrace(); 40 | } 41 | } 42 | }); 43 | } 44 | */ 45 | 46 | /** 47 | * Create the frame. 48 | */ 49 | public PrintUI(Object[][] obj, String username) { 50 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 51 | setBounds(100, 100, 450, 300); 52 | contentPane = new JPanel(); 53 | contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); 54 | setContentPane(contentPane); 55 | contentPane.setLayout(null); 56 | table = new JTable(); 57 | table.setModel(new DefaultTableModel( 58 | obj, 59 | new String[] { 60 | "\u7F16\u53F7", "\u4E66\u540D", "\u4F5C\u8005", "\u4EF7\u683C" 61 | } 62 | )); 63 | table.setBounds(54, 211, 306, -186); 64 | JScrollPane scroll = new JScrollPane(table); 65 | scroll.setLocation(0, 0); 66 | scroll.setSize(428,208); 67 | contentPane.add(scroll); 68 | 69 | button = new JButton("\u8FD4\u56DE\u4E3B\u83DC\u5355"); 70 | button.addActionListener(new ActionListener() { 71 | public void actionPerformed(ActionEvent arg0) { 72 | if(username.equals("")){ 73 | MenuUI menu = new MenuUI(); 74 | menu.setVisible(true); 75 | PrintUI.this.dispose(); 76 | }else{ 77 | Operator operate = new Operator(); 78 | int isout = 0; 79 | ArrayList books = operate.printBook(isout+""); 80 | ReaderUI menu = new ReaderUI(books,username); 81 | menu.setVisible(true); 82 | PrintUI.this.dispose(); 83 | } 84 | 85 | } 86 | }); 87 | button.setBounds(271, 215, 123, 29); 88 | contentPane.add(button); 89 | this.setVisible(true); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /TCPClient/src/ui/ReaderUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/ReaderUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/ReturnBookUI.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/ReturnBookUI.java -------------------------------------------------------------------------------- /TCPClient/src/ui/Success.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/ui/Success.java -------------------------------------------------------------------------------- /TCPClient/src/util/Parser.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/util/Parser.java -------------------------------------------------------------------------------- /TCPClient/src/util/Protocol.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPClient/src/util/Protocol.java -------------------------------------------------------------------------------- /TCPServer/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TCPServer/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | TCPServer 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /TCPServer/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.8 12 | -------------------------------------------------------------------------------- /TCPServer/bin/control/Operator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/bin/control/Operator.class -------------------------------------------------------------------------------- /TCPServer/bin/jdbc/Database.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/bin/jdbc/Database.class -------------------------------------------------------------------------------- /TCPServer/bin/model/Book.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/bin/model/Book.class -------------------------------------------------------------------------------- /TCPServer/bin/net/Handler.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/bin/net/Handler.class -------------------------------------------------------------------------------- /TCPServer/bin/net/Server.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/bin/net/Server.class -------------------------------------------------------------------------------- /TCPServer/bin/util/Parser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/bin/util/Parser.class -------------------------------------------------------------------------------- /TCPServer/bin/util/Protocol.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/bin/util/Protocol.class -------------------------------------------------------------------------------- /TCPServer/mysql-connector-java-5.1.41-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/mysql-connector-java-5.1.41-bin.jar -------------------------------------------------------------------------------- /TCPServer/src/control/Operator.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/src/control/Operator.java -------------------------------------------------------------------------------- /TCPServer/src/jdbc/Database.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/src/jdbc/Database.java -------------------------------------------------------------------------------- /TCPServer/src/model/Book.java: -------------------------------------------------------------------------------- 1 | package model; 2 | 3 | public class Book { 4 | private int id; 5 | private String bookname; 6 | private String author; 7 | private float price; 8 | 9 | public Book(int id, String bookname, String author, float price) 10 | { 11 | this.id = id; 12 | this.bookname = bookname; 13 | this.author = author; 14 | this.price = price; 15 | } 16 | 17 | public int getBookid() { 18 | return id; 19 | } 20 | 21 | public String getBookname() { 22 | return bookname; 23 | } 24 | 25 | public void setBookname(String bookname) { 26 | this.bookname = bookname; 27 | } 28 | 29 | public String getAuthor() { 30 | return author; 31 | } 32 | 33 | public void setAuthor(String author) { 34 | this.author = author; 35 | } 36 | 37 | public float getPrice() { 38 | return price; 39 | } 40 | 41 | public void setPrice(float price) { 42 | this.price = price; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /TCPServer/src/net/Handler.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/src/net/Handler.java -------------------------------------------------------------------------------- /TCPServer/src/net/Server.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/src/net/Server.java -------------------------------------------------------------------------------- /TCPServer/src/util/Parser.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexTan-b-z/CSBookManageSystem2/81c541324d0b3ca96aa1321f32d5bd16f0ef4b82/TCPServer/src/util/Parser.java -------------------------------------------------------------------------------- /TCPServer/src/util/Protocol.java: -------------------------------------------------------------------------------- 1 | package util; 2 | 3 | public class Protocol { 4 | 5 | public Protocol() { 6 | 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /books20170622172828.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 5.5.53, for Win32 (AMD64) 2 | -- 3 | -- Host: localhost Database: books 4 | -- ------------------------------------------------------ 5 | -- Server version 5.5.53 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `book` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `book`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!40101 SET character_set_client = utf8 */; 25 | CREATE TABLE `book` ( 26 | `id` int(10) NOT NULL AUTO_INCREMENT, 27 | `bookname` varchar(255) DEFAULT NULL, 28 | `author` varchar(255) DEFAULT NULL, 29 | `price` float(10,0) DEFAULT NULL, 30 | `filename` varchar(255) DEFAULT NULL, 31 | `category` varchar(255) DEFAULT NULL, 32 | `readtime` int(8) DEFAULT '0', 33 | `isout` varchar(255) DEFAULT NULL, 34 | PRIMARY KEY (`id`) 35 | ) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; 36 | /*!40101 SET character_set_client = @saved_cs_client */; 37 | 38 | -- 39 | -- Dumping data for table `book` 40 | -- 41 | 42 | LOCK TABLES `book` WRITE; 43 | /*!40000 ALTER TABLE `book` DISABLE KEYS */; 44 | INSERT INTO `book` VALUES (1,'java从入门到精通','alex',58,NULL,NULL,1,'234'),(2,'Python从入门到精通','alex',58,NULL,NULL,3,'123'),(3,'PHP从入门到精通','alex',58,NULL,NULL,2,'123'),(4,'JS从入门到精通','alex',58,NULL,NULL,2,'234'),(5,'Hadoop实战','hadoop',66,NULL,NULL,1,'333'),(6,'前端入门','alex',68,NULL,NULL,1,'333'),(7,'天龙八部','xxx',66,NULL,NULL,1,'444'),(8,'分布式系统架构设计','彭渊',59,NULL,NULL,1,'444'),(9,'python爬虫入门','alex',68,NULL,NULL,0,NULL),(10,'scrapy爬虫实战','alex',68,NULL,NULL,0,NULL),(11,'各种反爬机制分析','alex',68,NULL,NULL,0,NULL),(12,'分布式爬虫讲解','alex',68,NULL,NULL,0,NULL),(13,'英语四级','english',30,NULL,NULL,0,NULL),(14,'英语六级','english',60,NULL,NULL,0,NULL),(15,'JavaWeb编程实战','alex',66,NULL,NULL,0,NULL); 45 | /*!40000 ALTER TABLE `book` ENABLE KEYS */; 46 | UNLOCK TABLES; 47 | 48 | -- 49 | -- Table structure for table `user` 50 | -- 51 | 52 | DROP TABLE IF EXISTS `user`; 53 | /*!40101 SET @saved_cs_client = @@character_set_client */; 54 | /*!40101 SET character_set_client = utf8 */; 55 | CREATE TABLE `user` ( 56 | `id` int(6) NOT NULL AUTO_INCREMENT, 57 | `username` varchar(255) NOT NULL, 58 | `password` varchar(255) NOT NULL, 59 | `status` int(2) DEFAULT '0', 60 | `borrowTime` int(8) DEFAULT '0', 61 | PRIMARY KEY (`id`) 62 | ) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; 63 | /*!40101 SET character_set_client = @saved_cs_client */; 64 | 65 | -- 66 | -- Dumping data for table `user` 67 | -- 68 | 69 | LOCK TABLES `user` WRITE; 70 | /*!40000 ALTER TABLE `user` DISABLE KEYS */; 71 | INSERT INTO `user` VALUES (3,'吴德轩最帅','wdx',0,0),(9,'123','123',0,4),(6,'321','321',1,0),(7,'123456','123456',1,0),(8,'234','234',0,3),(10,'alex','alex',0,0),(11,'haha','haha',0,0),(12,'333','333',0,2),(13,'444','444',0,2),(14,'555','555',0,0); 72 | /*!40000 ALTER TABLE `user` ENABLE KEYS */; 73 | UNLOCK TABLES; 74 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 75 | 76 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 77 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 78 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 79 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 80 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 81 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 82 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 83 | 84 | -- Dump completed on 2017-06-22 17:28:29 85 | --------------------------------------------------------------------------------