├── .settings ├── org.eclipse.wst.jsdt.ui.superType.name ├── org.eclipse.wst.jsdt.ui.superType.container ├── org.eclipse.core.resources.prefs ├── org.eclipse.wst.common.project.facet.core.xml ├── org.eclipse.jdt.core.prefs ├── org.eclipse.wst.common.component └── .jsdtscope ├── image ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── 9.png ├── 10.png ├── 摘要.png ├── 数据库.png ├── 注册.png ├── 绪论.png ├── 体育器材统计.png ├── 修改用户信息.png ├── 学生登录.png ├── 我的订单.png ├── 数据库表.png ├── 系统实现.png ├── 系统测试.png ├── 系统设计.png ├── 需求分析.png ├── 项目内容.png ├── 项目骨架.png ├── 预约器材.png ├── 预约审核.png ├── 数据库概念模型.png └── 项目内容 (2).png ├── .idea ├── .gitignore └── misc.xml ├── src ├── jdbc.properties ├── edu │ └── equipment │ │ ├── dao │ │ ├── AdminDao.java │ │ ├── BoardDao.java │ │ ├── CategoryDao.java │ │ ├── EquipmentDao.java │ │ ├── TeacherDao.java │ │ ├── AppDao.java │ │ └── StudentDao.java │ │ ├── test │ │ ├── TestSpring.java │ │ ├── TestMybatis.java │ │ └── Test.java │ │ ├── utils │ │ ├── FileNameUtil.java │ │ └── PageInfo.java │ │ ├── model │ │ ├── Category.java │ │ ├── Admin.java │ │ ├── Board.java │ │ ├── Student.java │ │ ├── Teacher.java │ │ ├── Appointment.java │ │ └── Equipment.java │ │ ├── service │ │ ├── CategoryService.java │ │ ├── EquipmentService.java │ │ ├── AdminService.java │ │ ├── TeacherService.java │ │ ├── AppService.java │ │ ├── BoardService.java │ │ └── StudentService.java │ │ └── mapper │ │ ├── CategoryMapper.xml │ │ ├── CardMapper.xml │ │ ├── BoardMapper.xml │ │ ├── AdminMapper.xml │ │ ├── ProductMapper.xml │ │ ├── StudentMapper.xml │ │ ├── TeacherMapper.xml │ │ ├── AppMapper.xml │ │ ├── EquipmentMapper.xml │ │ ├── RefundMapper.xml │ │ └── OrdersMapper.xml └── mybatis-config.xml ├── .classpath ├── .project └── README.md /.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /image/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/1.png -------------------------------------------------------------------------------- /image/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/2.png -------------------------------------------------------------------------------- /image/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/3.png -------------------------------------------------------------------------------- /image/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/4.png -------------------------------------------------------------------------------- /image/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/5.png -------------------------------------------------------------------------------- /image/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/6.png -------------------------------------------------------------------------------- /image/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/7.png -------------------------------------------------------------------------------- /image/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/8.png -------------------------------------------------------------------------------- /image/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/9.png -------------------------------------------------------------------------------- /image/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/10.png -------------------------------------------------------------------------------- /image/摘要.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/摘要.png -------------------------------------------------------------------------------- /image/数据库.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/数据库.png -------------------------------------------------------------------------------- /image/注册.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/注册.png -------------------------------------------------------------------------------- /image/绪论.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/绪论.png -------------------------------------------------------------------------------- /image/体育器材统计.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/体育器材统计.png -------------------------------------------------------------------------------- /image/修改用户信息.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/修改用户信息.png -------------------------------------------------------------------------------- /image/学生登录.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/学生登录.png -------------------------------------------------------------------------------- /image/我的订单.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/我的订单.png -------------------------------------------------------------------------------- /image/数据库表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/数据库表.png -------------------------------------------------------------------------------- /image/系统实现.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/系统实现.png -------------------------------------------------------------------------------- /image/系统测试.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/系统测试.png -------------------------------------------------------------------------------- /image/系统设计.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/系统设计.png -------------------------------------------------------------------------------- /image/需求分析.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/需求分析.png -------------------------------------------------------------------------------- /image/项目内容.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/项目内容.png -------------------------------------------------------------------------------- /image/项目骨架.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/项目骨架.png -------------------------------------------------------------------------------- /image/预约器材.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/预约器材.png -------------------------------------------------------------------------------- /image/预约审核.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/预约审核.png -------------------------------------------------------------------------------- /image/数据库概念模型.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/数据库概念模型.png -------------------------------------------------------------------------------- /image/项目内容 (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No312Sports-equipment-reservation-system/HEAD/image/项目内容 (2).png -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/jdbc.properties: -------------------------------------------------------------------------------- 1 | database.url=jdbc:mysql://localhost:3306/equipment?useUnicode=true&characterEncoding=utf-8 2 | database.username=root 3 | database.password=123456 4 | database.driverClassName=com.mysql.jdbc.Driver 5 | # connection pool 6 | cp.maxActive=96 7 | cp.maxIdle=16 8 | cp.minIdle=0 9 | cp.maxWait=60000 10 | 11 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.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.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/edu/equipment/dao/AdminDao.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import edu.equipment.model.Admin; 8 | 9 | 10 | 11 | 12 | public interface AdminDao { 13 | 14 | Admin findById(int id );//根据主键id查询记录 15 | Admin findByPhoneAndPwd(@Param("eno") String eno,@Param("pwd")String pwd );//查询用户名和密码 16 | boolean update(@Param("record") Admin record);//根据id更改 17 | List findAll(Admin record); 18 | void delUser(Integer id); 19 | void insert(Admin user); 20 | List selectByEno(String eno); 21 | 22 | 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/edu/equipment/dao/BoardDao.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.dao; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import edu.equipment.model.Board; 9 | 10 | 11 | 12 | 13 | public interface BoardDao { 14 | 15 | List findAll(Board b);//查询所有 16 | Board findById(int id );// 17 | boolean add(Board record);//插入 18 | boolean update(@Param("record") Board record);//根据id更改 19 | boolean delete(int id);//根据id删除 20 | List findByProductMap(Map paramterMap);//根据条件进行查询 21 | Board queryById(int id );// 22 | 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/edu/equipment/dao/CategoryDao.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import edu.equipment.model.Admin; 8 | import edu.equipment.model.Category; 9 | import edu.equipment.model.Student; 10 | import edu.equipment.model.Teacher; 11 | 12 | 13 | 14 | 15 | public interface CategoryDao { 16 | 17 | Category findById(int id );//根据主键id查询记录 18 | boolean update(@Param("record") Category record);//根据id更改 19 | List findAll(Category record); 20 | void delUser(Integer id); 21 | void insert(Category c); 22 | 23 | 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/edu/equipment/dao/EquipmentDao.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import edu.equipment.model.Admin; 8 | import edu.equipment.model.Equipment; 9 | import edu.equipment.model.Student; 10 | import edu.equipment.model.Teacher; 11 | 12 | 13 | 14 | 15 | public interface EquipmentDao { 16 | 17 | Equipment findById(int id );//根据主键id查询记录 18 | boolean update(@Param("record") Equipment record);//根据id更改 19 | List findAll(Equipment record); 20 | void delUser(Integer id); 21 | void insert(Equipment e); 22 | 23 | 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/edu/equipment/dao/TeacherDao.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import edu.equipment.model.Admin; 8 | import edu.equipment.model.Teacher; 9 | 10 | 11 | 12 | 13 | public interface TeacherDao { 14 | 15 | Teacher findById(int id );//根据主键id查询记录 16 | Teacher findByPhoneAndPwd(@Param("tno") String tno,@Param("pwd")String pwd );//查询用户名和密码 17 | boolean update(@Param("record") Teacher record);//根据id更改 18 | List findAll(Teacher record); 19 | void delUser(Integer id); 20 | void insert(Teacher user); 21 | List selectByEno(String eno); 22 | 23 | 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/edu/equipment/dao/AppDao.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import edu.equipment.model.Admin; 8 | import edu.equipment.model.Appointment; 9 | import edu.equipment.model.Student; 10 | import edu.equipment.model.Teacher; 11 | 12 | 13 | 14 | 15 | public interface AppDao { 16 | 17 | Appointment findById(int id );//根据主键id查询记录 18 | boolean update(@Param("record") Appointment record);//根据id更改 19 | List findAll(Appointment record); 20 | void delUser(Integer id); 21 | void insert(Appointment a); 22 | List findMyAll(Appointment app); 23 | 24 | 25 | 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/edu/equipment/test/TestSpring.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.test; 2 | 3 | import org.apache.ibatis.session.SqlSession; 4 | import org.apache.ibatis.session.SqlSessionFactory; 5 | import org.springframework.context.support.FileSystemXmlApplicationContext; 6 | 7 | public class TestSpring { 8 | public static void main(String[] args) throws Exception { 9 | FileSystemXmlApplicationContext ctx=new FileSystemXmlApplicationContext("WebContent/WEB-INF/springConfig.xml"); 10 | SqlSessionFactory factory=(SqlSessionFactory) ctx.getBean("sqlSessionFactory",SqlSessionFactory.class); 11 | SqlSession session=factory.openSession(); 12 | 13 | session.close(); 14 | System.out.println("ok"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/edu/equipment/dao/StudentDao.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import edu.equipment.model.Admin; 8 | import edu.equipment.model.Student; 9 | import edu.equipment.model.Teacher; 10 | 11 | 12 | 13 | 14 | public interface StudentDao { 15 | 16 | Student findById(int id );//根据主键id查询记录 17 | Student findByPhoneAndPwd(@Param("stuno") String stuno,@Param("pwd")String pwd );//查询用户名和密码 18 | boolean update(@Param("record") Student record);//根据id更改 19 | List findAll(Student record); 20 | void delUser(Integer id); 21 | void insert(Student user); 22 | List selectByEno(String eno); 23 | 24 | 25 | 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/edu/equipment/test/TestMybatis.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.test; 2 | 3 | import java.io.InputStream; 4 | 5 | 6 | import org.apache.ibatis.io.Resources; 7 | import org.apache.ibatis.session.SqlSession; 8 | import org.apache.ibatis.session.SqlSessionFactory; 9 | import org.apache.ibatis.session.SqlSessionFactoryBuilder; 10 | 11 | 12 | 13 | 14 | 15 | public class TestMybatis { 16 | 17 | public static void main(String[] args) throws Exception { 18 | String resource="mybatis-config.xml"; 19 | InputStream is=Resources.getResourceAsStream(resource); 20 | SqlSessionFactory factory=new SqlSessionFactoryBuilder().build(is); 21 | SqlSession session=factory.openSession(); 22 | /**/ 23 | session.commit(); 24 | session.close(); 25 | System.out.println("ok"); 26 | 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/edu/equipment/utils/FileNameUtil.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.utils; 2 | 3 | import java.util.UUID; 4 | 5 | public class FileNameUtil { 6 | //根据UUID生成文件名 7 | public static String getUUIDFileName() { 8 | UUID uuid = UUID.randomUUID(); 9 | return uuid.toString().replace("-", ""); 10 | } 11 | //从请求头中提取文件名和类型 12 | public static String getRealFileName(String context) { 13 | // Content-Disposition: form-data; name="myfile"; filename="a_left.jpg" 14 | int index = context.lastIndexOf("="); 15 | String filename = context.substring(index + 2, context.length() - 1); 16 | return filename; 17 | } 18 | //根据给定的文件名和后缀截取文件名 19 | public static String getFileType(String fileName){ 20 | //9527s.jpg 21 | int index = fileName.lastIndexOf("."); 22 | return fileName.substring(index); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/edu/equipment/model/Category.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.model; 2 | //管理员表 3 | public class Category { 4 | private Integer id; 5 | private String name; 6 | private String note; 7 | 8 | 9 | private Integer page; 10 | private Integer limit; 11 | public Integer getId() { 12 | return id; 13 | } 14 | public void setId(Integer id) { 15 | this.id = id; 16 | } 17 | public String getName() { 18 | return name; 19 | } 20 | public void setName(String name) { 21 | this.name = name; 22 | } 23 | public String getNote() { 24 | return note; 25 | } 26 | public void setNote(String note) { 27 | this.note = note; 28 | } 29 | public Integer getPage() { 30 | return page; 31 | } 32 | public void setPage(Integer page) { 33 | this.page = page; 34 | } 35 | public Integer getLimit() { 36 | return limit; 37 | } 38 | public void setLimit(Integer limit) { 39 | this.limit = limit; 40 | } 41 | 42 | 43 | 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | tyqc_web 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.validation.validationbuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jem.workbench.JavaEMFNature 26 | org.eclipse.wst.common.modulecore.ModuleCoreNature 27 | org.eclipse.wst.common.project.facet.core.nature 28 | org.eclipse.jdt.core.javanature 29 | org.eclipse.wst.jsdt.core.jsNature 30 | 31 | 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 基于SSM的体育器材预约系统(程序+论文) 2 | = 3 | ### 完整代码获取地址:从戎源码网 ([https://armycodes.com/](https://armycodes.com/)) 4 | ### 作者微信:19941326836 QQ:952045282 5 | ### 承接计算机毕业设计、Java毕业设计、Python毕业设计、深度学习、机器学习 6 | ### 选题+开题报告+任务书+程序定制+安装调试+论文+答辩ppt 一条龙服务 7 | ### 所有选题地址https://github.com/nature924/allProject 8 | 9 | 一、项目介绍 10 | --- 11 | 基于SSM框架实现的体育器材预约系统包含两种角色:管理员、用户,系统分为前台和后台两大模块,主要功能如下。 12 | 13 | 学生端主要功能有注册、登录、个人信息管理、查看我的预约信息、归还器材等功能 14 | ### 15 | 【老师】端需要实现的主要功能有登录、归还器材、个人信息管理、我的预约信息。 16 | ### 17 | 【管理员】端主要功能有登录、用户管理、体育器材类别管理、器材管理、预约管理、数据统计、以及公告管理、个人信息管理等功能。 18 | 19 | 20 | 21 | 22 | 23 | 24 | 二、项目技术 25 | --- 26 | - 编程语言:Java 27 | - 数据库:MySQL 28 | - 项目管理工具:Maven 29 | - 前端技术:JSP、HTML、Jquery、Layui、ECharts 30 | - 后端技术:Spring、SpringMVC、MyBatis 31 | 32 | 三、运行环境 33 | --- 34 | - 操作系统:Windows、macOS都可以 35 | - JDK版本:JDK1.8以上都可以 36 | - 开发工具:IDEA、Ecplise、Myecplise都可以 37 | - 数据库: MySQL5.7以上都可以 38 | - Tomcat:任意版本都可以 39 | - Maven:任意版本都可以 40 | 41 | 四、运行截图 42 | --- 43 | ### 论文截图: 44 | ![image/1.png](image/6.png) 45 | ![image/1.png](image/7.png) 46 | 47 | ### 程序截图: 48 | ![image/1.png](image/1.png) 49 | ![image/1.png](image/2.png) 50 | ![image/1.png](image/3.png) 51 | ![image/1.png](image/4.png) 52 | ![image/1.png](image/5.png) 53 | ![image/1.png](image/8.png) 54 | ![image/1.png](image/9.png) 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/edu/equipment/test/Test.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.test; 2 | 3 | import java.io.InputStream; 4 | 5 | import org.apache.ibatis.io.Resources; 6 | import org.apache.ibatis.session.SqlSession; 7 | import org.apache.ibatis.session.SqlSessionFactory; 8 | import org.apache.ibatis.session.SqlSessionFactoryBuilder; 9 | 10 | 11 | import edu.equipment.dao.AdminDao; 12 | import edu.equipment.model.Admin; 13 | 14 | 15 | public class Test { 16 | 17 | public static void main(String[] args) throws Exception { 18 | String resource="mybatis-config.xml"; 19 | InputStream is=Resources.getResourceAsStream(resource); 20 | SqlSessionFactory factory=new SqlSessionFactoryBuilder().build(is); 21 | SqlSession session=factory.openSession(); 22 | AdminDao dao=session.getMapper(AdminDao.class); 23 | /*UserDao dao=session.getMapper(UserDao.class); 24 | User user=dao.findById(1);*/ 25 | Admin admin=dao.findById(1); 26 | System.out.println(admin.getPwd()); 27 | /*List list=memberdao.selectAll(); 28 | for(User u:list) { 29 | System.out.println(u.getUname()); 30 | System.out.println("ok"); 31 | }*/ 32 | /*User record=new User(); 33 | record.setUsername(""); 34 | 35 | int insert=userMapper.insert(record);*/ 36 | 37 | session.commit(); 38 | session.close(); 39 | 40 | 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/edu/equipment/service/CategoryService.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import edu.equipment.dao.AdminDao; 9 | import edu.equipment.dao.CategoryDao; 10 | import edu.equipment.dao.StudentDao; 11 | import edu.equipment.dao.TeacherDao; 12 | import edu.equipment.model.Admin; 13 | import edu.equipment.model.Category; 14 | import edu.equipment.model.Student; 15 | import edu.equipment.model.Teacher; 16 | 17 | @Service 18 | public class CategoryService implements CategoryDao { 19 | @Autowired 20 | CategoryDao dao; 21 | 22 | @Override 23 | public Category findById(int id) { 24 | // TODO Auto-generated method stub 25 | return dao.findById(id); 26 | } 27 | 28 | 29 | 30 | @Override 31 | public boolean update(Category record) { 32 | // TODO Auto-generated method stub 33 | return dao.update(record); 34 | } 35 | 36 | 37 | public List findAll(Category record) { 38 | // TODO 自动生成的方法存根 39 | return dao.findAll(record); 40 | } 41 | 42 | 43 | 44 | public void delUser(Integer id) { 45 | // TODO 自动生成的方法存根 46 | dao.delUser(id); 47 | } 48 | 49 | 50 | public void insert(Category c) { 51 | // TODO 自动生成的方法存根 52 | dao.insert(c); 53 | } 54 | 55 | 56 | 57 | 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/edu/equipment/service/EquipmentService.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import edu.equipment.dao.AdminDao; 9 | import edu.equipment.dao.EquipmentDao; 10 | import edu.equipment.dao.StudentDao; 11 | import edu.equipment.dao.TeacherDao; 12 | import edu.equipment.model.Admin; 13 | import edu.equipment.model.Equipment; 14 | import edu.equipment.model.Student; 15 | import edu.equipment.model.Teacher; 16 | 17 | @Service 18 | public class EquipmentService implements EquipmentDao { 19 | @Autowired 20 | EquipmentDao dao; 21 | 22 | @Override 23 | public Equipment findById(int id) { 24 | // TODO Auto-generated method stub 25 | return dao.findById(id); 26 | } 27 | 28 | 29 | @Override 30 | public boolean update(Equipment record) { 31 | // TODO Auto-generated method stub 32 | return dao.update(record); 33 | } 34 | 35 | 36 | public List findAll(Equipment record) { 37 | // TODO 自动生成的方法存根 38 | return dao.findAll(record); 39 | } 40 | 41 | 42 | 43 | public void delUser(Integer id) { 44 | // TODO 自动生成的方法存根 45 | dao.delUser(id); 46 | } 47 | 48 | 49 | public void insert(Equipment user) { 50 | // TODO 自动生成的方法存根 51 | dao.insert(user); 52 | } 53 | 54 | 55 | 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/edu/equipment/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import edu.equipment.dao.AdminDao; 9 | import edu.equipment.model.Admin; 10 | 11 | @Service 12 | public class AdminService implements AdminDao { 13 | @Autowired 14 | AdminDao dao; 15 | 16 | @Override 17 | public Admin findById(int id) { 18 | // TODO Auto-generated method stub 19 | return dao.findById(id); 20 | } 21 | 22 | 23 | @Override 24 | public Admin findByPhoneAndPwd(String eno, String pwd) { 25 | // TODO Auto-generated method stub 26 | return dao.findByPhoneAndPwd(eno, pwd); 27 | } 28 | 29 | @Override 30 | public boolean update(Admin record) { 31 | // TODO Auto-generated method stub 32 | return dao.update(record); 33 | } 34 | 35 | 36 | public List findAll(Admin record) { 37 | // TODO 自动生成的方法存根 38 | return dao.findAll(record); 39 | } 40 | 41 | 42 | 43 | public void delUser(Integer id) { 44 | // TODO 自动生成的方法存根 45 | dao.delUser(id); 46 | } 47 | 48 | 49 | public void insert(Admin user) { 50 | // TODO 自动生成的方法存根 51 | dao.insert(user); 52 | } 53 | 54 | 55 | public List selectByEno(String eno) { 56 | // TODO 自动生成的方法存根 57 | return dao.selectByEno(eno); 58 | } 59 | 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/edu/equipment/model/Admin.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.model; 2 | //管理员表 3 | public class Admin { 4 | private Integer id; 5 | private String pwd; 6 | private String eno; 7 | private String realname; 8 | private String photo; 9 | private String state; 10 | 11 | 12 | private Integer page; 13 | private Integer limit; 14 | public Integer getId() { 15 | return id; 16 | } 17 | public void setId(Integer id) { 18 | this.id = id; 19 | } 20 | public String getPwd() { 21 | return pwd; 22 | } 23 | public void setPwd(String pwd) { 24 | this.pwd = pwd; 25 | } 26 | public String getEno() { 27 | return eno; 28 | } 29 | public void setEno(String eno) { 30 | this.eno = eno; 31 | } 32 | public String getRealname() { 33 | return realname; 34 | } 35 | public void setRealname(String realname) { 36 | this.realname = realname; 37 | } 38 | public String getPhoto() { 39 | return photo; 40 | } 41 | public void setPhoto(String photo) { 42 | this.photo = photo; 43 | } 44 | public Integer getPage() { 45 | return page; 46 | } 47 | public void setPage(Integer page) { 48 | this.page = page; 49 | } 50 | public Integer getLimit() { 51 | return limit; 52 | } 53 | public void setLimit(Integer limit) { 54 | this.limit = limit; 55 | } 56 | public String getState() { 57 | return state; 58 | } 59 | public void setState(String state) { 60 | this.state = state; 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/edu/equipment/service/TeacherService.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import edu.equipment.dao.AdminDao; 9 | import edu.equipment.dao.TeacherDao; 10 | import edu.equipment.model.Admin; 11 | import edu.equipment.model.Teacher; 12 | 13 | @Service 14 | public class TeacherService implements TeacherDao { 15 | @Autowired 16 | TeacherDao dao; 17 | 18 | @Override 19 | public Teacher findById(int id) { 20 | // TODO Auto-generated method stub 21 | return dao.findById(id); 22 | } 23 | 24 | 25 | @Override 26 | public Teacher findByPhoneAndPwd(String tno, String pwd) { 27 | // TODO Auto-generated method stub 28 | return dao.findByPhoneAndPwd(tno, pwd); 29 | } 30 | 31 | @Override 32 | public boolean update(Teacher record) { 33 | // TODO Auto-generated method stub 34 | return dao.update(record); 35 | } 36 | 37 | 38 | public List findAll(Teacher record) { 39 | // TODO 自动生成的方法存根 40 | return dao.findAll(record); 41 | } 42 | 43 | 44 | 45 | public void delUser(Integer id) { 46 | // TODO 自动生成的方法存根 47 | dao.delUser(id); 48 | } 49 | 50 | 51 | public void insert(Teacher user) { 52 | // TODO 自动生成的方法存根 53 | dao.insert(user); 54 | } 55 | 56 | 57 | public List selectByEno(String eno) { 58 | // TODO 自动生成的方法存根 59 | return dao.selectByEno(eno); 60 | } 61 | 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/edu/equipment/service/AppService.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import edu.equipment.dao.AdminDao; 9 | import edu.equipment.dao.AppDao; 10 | import edu.equipment.dao.StudentDao; 11 | import edu.equipment.dao.TeacherDao; 12 | import edu.equipment.model.Admin; 13 | import edu.equipment.model.Appointment; 14 | import edu.equipment.model.Student; 15 | import edu.equipment.model.Teacher; 16 | 17 | @Service 18 | public class AppService implements AppDao { 19 | @Autowired 20 | AppDao dao; 21 | 22 | @Override 23 | public Appointment findById(int id) { 24 | // TODO Auto-generated method stub 25 | return dao.findById(id); 26 | } 27 | 28 | 29 | @Override 30 | public boolean update(Appointment record) { 31 | // TODO Auto-generated method stub 32 | return dao.update(record); 33 | } 34 | 35 | 36 | public List findAll(Appointment record) { 37 | // TODO 自动生成的方法存根 38 | return dao.findAll(record); 39 | } 40 | 41 | 42 | 43 | public void delUser(Integer id) { 44 | // TODO 自动生成的方法存根 45 | dao.delUser(id); 46 | } 47 | 48 | 49 | public void insert(Appointment a) { 50 | // TODO 自动生成的方法存根 51 | dao.insert(a); 52 | } 53 | 54 | 55 | public List findMyAll(Appointment app) { 56 | // TODO 自动生成的方法存根 57 | return dao.findMyAll(app); 58 | } 59 | 60 | 61 | 62 | 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/edu/equipment/service/BoardService.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import edu.equipment.dao.BoardDao; 10 | import edu.equipment.model.Board; 11 | 12 | @Service 13 | public class BoardService implements BoardDao { 14 | @Autowired 15 | BoardDao dao; 16 | 17 | @Override 18 | public List findAll(Board b) { 19 | // TODO Auto-generated method stub 20 | return dao.findAll(b); 21 | } 22 | 23 | @Override 24 | public Board findById(int id) { 25 | // TODO Auto-generated method stub 26 | return dao.findById(id); 27 | } 28 | 29 | @Override 30 | public boolean add(Board record) { 31 | // TODO Auto-generated method stub 32 | return dao.add(record); 33 | } 34 | 35 | @Override 36 | public boolean update(Board record) { 37 | // TODO Auto-generated method stub 38 | return dao.update(record); 39 | } 40 | 41 | @Override 42 | public boolean delete(int id) { 43 | // TODO Auto-generated method stub 44 | return dao.delete(id); 45 | } 46 | 47 | @Override 48 | public List findByProductMap(Map paramterMap) { 49 | // TODO Auto-generated method stub 50 | return dao.findByProductMap(paramterMap); 51 | } 52 | 53 | @Override 54 | public Board queryById(int id) { 55 | // TODO Auto-generated method stub 56 | return dao.queryById(id); 57 | } 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/edu/equipment/service/StudentService.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import edu.equipment.dao.AdminDao; 9 | import edu.equipment.dao.StudentDao; 10 | import edu.equipment.dao.TeacherDao; 11 | import edu.equipment.model.Admin; 12 | import edu.equipment.model.Student; 13 | import edu.equipment.model.Teacher; 14 | 15 | @Service 16 | public class StudentService implements StudentDao { 17 | @Autowired 18 | StudentDao dao; 19 | 20 | @Override 21 | public Student findById(int id) { 22 | // TODO Auto-generated method stub 23 | return dao.findById(id); 24 | } 25 | 26 | 27 | @Override 28 | public Student findByPhoneAndPwd(String tno, String pwd) { 29 | // TODO Auto-generated method stub 30 | return dao.findByPhoneAndPwd(tno, pwd); 31 | } 32 | 33 | @Override 34 | public boolean update(Student record) { 35 | // TODO Auto-generated method stub 36 | return dao.update(record); 37 | } 38 | 39 | 40 | public List findAll(Student record) { 41 | // TODO 自动生成的方法存根 42 | return dao.findAll(record); 43 | } 44 | 45 | 46 | 47 | public void delUser(Integer id) { 48 | // TODO 自动生成的方法存根 49 | dao.delUser(id); 50 | } 51 | 52 | 53 | public void insert(Student user) { 54 | // TODO 自动生成的方法存根 55 | dao.insert(user); 56 | } 57 | 58 | 59 | public List selectByEno(String eno) { 60 | // TODO 自动生成的方法存根 61 | return dao.selectByEno(eno); 62 | } 63 | 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/CategoryMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 24 | 25 | 26 | 27 | insert into category (name,note) 28 | values (#{name,jdbcType=VARCHAR},#{note,jdbcType=VARCHAR}) 29 | 30 | 31 | update category set 32 | name = #{record.name,jdbcType=VARCHAR}, 33 | note = #{record.note,jdbcType=VARCHAR} 34 | where id=#{record.id} 35 | 36 | 37 | 38 | delete from category 39 | where id = #{id} 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/edu/equipment/model/Board.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.model; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.format.annotation.DateTimeFormat; 6 | 7 | import com.fasterxml.jackson.annotation.JsonFilter; 8 | import com.fasterxml.jackson.annotation.JsonFormat; 9 | 10 | 11 | public class Board { 12 | private Integer id; 13 | 14 | private String title; 15 | private String content; 16 | private Integer uid; 17 | private String fbsj; 18 | private String nickname; 19 | 20 | 21 | private Integer page; 22 | private Integer limit; 23 | public Integer getId() { 24 | return id; 25 | } 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | public String getTitle() { 30 | return title; 31 | } 32 | public void setTitle(String title) { 33 | this.title = title; 34 | } 35 | public String getContent() { 36 | return content; 37 | } 38 | public void setContent(String content) { 39 | this.content = content; 40 | } 41 | public Integer getUid() { 42 | return uid; 43 | } 44 | public void setUid(Integer uid) { 45 | this.uid = uid; 46 | } 47 | public String getFbsj() { 48 | return fbsj; 49 | } 50 | public void setFbsj(String fbsj) { 51 | this.fbsj = fbsj; 52 | } 53 | public Integer getPage() { 54 | return page; 55 | } 56 | public void setPage(Integer page) { 57 | this.page = page; 58 | } 59 | public Integer getLimit() { 60 | return limit; 61 | } 62 | public void setLimit(Integer limit) { 63 | this.limit = limit; 64 | } 65 | public String getNickname() { 66 | return nickname; 67 | } 68 | public void setNickname(String nickname) { 69 | this.nickname = nickname; 70 | } 71 | 72 | 73 | 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/CardMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 | insert into card (cno,money) 26 | values (#{cno,jdbcType=VARCHAR},#{money,jdbcType=DOUBLE}) 27 | 28 | 29 | 30 | update card set 31 | cno = #{record.cno,jdbcType=VARCHAR}, 32 | money = #{record.money,jdbcType=DOUBLE} 33 | where id=#{record.id} 34 | 35 | 36 | 37 | delete from card 38 | where id = #{id} 39 | 40 | 41 | 42 | 45 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/BoardMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 26 | 27 | 30 | 31 | 32 | insert into board (title,content,uid,fbsj) 33 | values (#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{uid,jdbcType=INTEGER},#{fbsj,jdbcType=VARCHAR}) 34 | 35 | 36 | 37 | update board set 38 | title = #{record.title,jdbcType=VARCHAR}, 39 | content = #{record.content,jdbcType=VARCHAR}, 40 | uid = #{record.uid,jdbcType=INTEGER}, 41 | fbsj = #{record.fbsj,jdbcType=VARCHAR} 42 | where id=#{record.id} 43 | 44 | 45 | 46 | delete from board 47 | where id = #{id} 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/AdminMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 29 | 32 | 33 | 34 | insert into admin (eno,pwd,realname,photo) 35 | values (#{eno,jdbcType=VARCHAR},#{pwd,jdbcType=VARCHAR},#{realname,jdbcType=VARCHAR}, 36 | #{photo,jdbcType=VARCHAR}) 37 | 38 | 39 | update admin set 40 | pwd = #{record.pwd,jdbcType=VARCHAR}, 41 | eno = #{record.eno,jdbcType=VARCHAR}, 42 | realname = #{record.realname,jdbcType=VARCHAR}, 43 | photo = #{record.photo,jdbcType=VARCHAR} 44 | where id=#{record.id} 45 | 46 | 47 | 48 | delete from admin 49 | where id = #{id} 50 | 51 | 52 | 55 | 56 | -------------------------------------------------------------------------------- /src/edu/equipment/model/Student.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.model; 2 | //管理员表 3 | public class Student { 4 | private Integer id; 5 | private String stuno; 6 | private String pwd; 7 | private String realname; 8 | private String nickname; 9 | private String sex; 10 | private String phone; 11 | private String photo; 12 | private String major; 13 | private String bj; 14 | private String grade; 15 | private String registe_time; 16 | 17 | 18 | private Integer page; 19 | private Integer limit; 20 | public Integer getId() { 21 | return id; 22 | } 23 | public void setId(Integer id) { 24 | this.id = id; 25 | } 26 | public String getStuno() { 27 | return stuno; 28 | } 29 | public void setStuno(String stuno) { 30 | this.stuno = stuno; 31 | } 32 | public String getPwd() { 33 | return pwd; 34 | } 35 | public void setPwd(String pwd) { 36 | this.pwd = pwd; 37 | } 38 | public String getRealname() { 39 | return realname; 40 | } 41 | public void setRealname(String realname) { 42 | this.realname = realname; 43 | } 44 | public String getNickname() { 45 | return nickname; 46 | } 47 | public void setNickname(String nickname) { 48 | this.nickname = nickname; 49 | } 50 | public String getSex() { 51 | return sex; 52 | } 53 | public void setSex(String sex) { 54 | this.sex = sex; 55 | } 56 | public String getPhone() { 57 | return phone; 58 | } 59 | public void setPhone(String phone) { 60 | this.phone = phone; 61 | } 62 | public String getPhoto() { 63 | return photo; 64 | } 65 | public void setPhoto(String photo) { 66 | this.photo = photo; 67 | } 68 | public String getMajor() { 69 | return major; 70 | } 71 | public void setMajor(String major) { 72 | this.major = major; 73 | } 74 | public String getBj() { 75 | return bj; 76 | } 77 | public void setBj(String bj) { 78 | this.bj = bj; 79 | } 80 | public String getGrade() { 81 | return grade; 82 | } 83 | public void setGrade(String grade) { 84 | this.grade = grade; 85 | } 86 | public String getRegiste_time() { 87 | return registe_time; 88 | } 89 | public void setRegiste_time(String registe_time) { 90 | this.registe_time = registe_time; 91 | } 92 | public Integer getPage() { 93 | return page; 94 | } 95 | public void setPage(Integer page) { 96 | this.page = page; 97 | } 98 | public Integer getLimit() { 99 | return limit; 100 | } 101 | public void setLimit(Integer limit) { 102 | this.limit = limit; 103 | } 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/edu/equipment/model/Teacher.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.model; 2 | //管理员表 3 | public class Teacher { 4 | private Integer id; 5 | private String tno; 6 | private String pwd; 7 | private String photo; 8 | private String name; 9 | private String sex; 10 | private Integer age; 11 | private String education; 12 | private String insitute; 13 | private String job; 14 | private String note; 15 | private String phone; 16 | private String create_date; 17 | 18 | 19 | private Integer page; 20 | private Integer limit; 21 | public Integer getId() { 22 | return id; 23 | } 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | public String getTno() { 28 | return tno; 29 | } 30 | public void setTno(String tno) { 31 | this.tno = tno; 32 | } 33 | public String getPwd() { 34 | return pwd; 35 | } 36 | public void setPwd(String pwd) { 37 | this.pwd = pwd; 38 | } 39 | public String getPhoto() { 40 | return photo; 41 | } 42 | public void setPhoto(String photo) { 43 | this.photo = photo; 44 | } 45 | public String getName() { 46 | return name; 47 | } 48 | public void setName(String name) { 49 | this.name = name; 50 | } 51 | public String getSex() { 52 | return sex; 53 | } 54 | public void setSex(String sex) { 55 | this.sex = sex; 56 | } 57 | public Integer getAge() { 58 | return age; 59 | } 60 | public void setAge(Integer age) { 61 | this.age = age; 62 | } 63 | public String getEducation() { 64 | return education; 65 | } 66 | public void setEducation(String education) { 67 | this.education = education; 68 | } 69 | public String getInsitute() { 70 | return insitute; 71 | } 72 | public void setInsitute(String insitute) { 73 | this.insitute = insitute; 74 | } 75 | public String getJob() { 76 | return job; 77 | } 78 | public void setJob(String job) { 79 | this.job = job; 80 | } 81 | public String getNote() { 82 | return note; 83 | } 84 | public void setNote(String note) { 85 | this.note = note; 86 | } 87 | public String getPhone() { 88 | return phone; 89 | } 90 | public void setPhone(String phone) { 91 | this.phone = phone; 92 | } 93 | public String getCreate_date() { 94 | return create_date; 95 | } 96 | public void setCreate_date(String create_date) { 97 | this.create_date = create_date; 98 | } 99 | public Integer getPage() { 100 | return page; 101 | } 102 | public void setPage(Integer page) { 103 | this.page = page; 104 | } 105 | public Integer getLimit() { 106 | return limit; 107 | } 108 | public void setLimit(Integer limit) { 109 | this.limit = limit; 110 | } 111 | 112 | 113 | 114 | 115 | 116 | 117 | } 118 | -------------------------------------------------------------------------------- /src/edu/equipment/utils/PageInfo.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.utils; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * 分页信息 7 | * 8 | * 9 | */ 10 | public class PageInfo { 11 | // 你页面需要展示的集合 12 | private List list; 13 | // 显示的总记录数 14 | private Integer totalNum; 15 | // 总页数 16 | private Integer totalPage; 17 | 18 | // 当前页 19 | private Integer currentPage; 20 | // 每页显示的数目 (为了防止硬编码可以写在配置文件中) 21 | private Integer pageSize; 22 | 23 | // 下面两个就是显示的页码 比如start为1 pageNo为5,那么显示的页码数就是1,2,3,4,5 24 | private Integer start; 25 | private Integer pageNo; 26 | 27 | public PageInfo(Integer totalNum, Integer currentPage, Integer pageSize, Integer pageNo) { 28 | this.totalNum = totalNum; 29 | this.currentPage = currentPage; 30 | this.pageSize = pageSize; 31 | /*this.pageNo = pageNo;*/ 32 | 33 | // 计算总页数 34 | if (totalNum % this.pageSize == 0) 35 | this.totalPage = totalNum / this.pageSize; 36 | else 37 | this.totalPage = (totalNum / this.pageSize) + 1; 38 | 39 | this.start = currentPage; 40 | // 比如设置了5条,如果总页数都只有四条,那么肯定都是全是显示哦 41 | if (pageNo+currentPage-1>=this.totalPage) 42 | this.pageNo = pageNo; 43 | else this.pageNo = this.totalPage-currentPage+1; 44 | } 45 | 46 | public List getList() { 47 | return list; 48 | } 49 | 50 | public void setList(List list) { 51 | this.list = list; 52 | } 53 | 54 | public Integer getTotalNum() { 55 | return totalNum; 56 | } 57 | 58 | public void setTotalNum(Integer totalNum) { 59 | this.totalNum = totalNum; 60 | } 61 | 62 | public Integer getTotalPage() { 63 | return totalPage; 64 | } 65 | 66 | public void setTotalPage(Integer totalPage) { 67 | this.totalPage = totalPage; 68 | } 69 | 70 | public Integer getCurrentPage() { 71 | return currentPage; 72 | } 73 | 74 | public void setCurrentPage(Integer currentPage) { 75 | this.currentPage = currentPage; 76 | } 77 | 78 | public Integer getPageSize() { 79 | return pageSize; 80 | } 81 | 82 | public void setPageSize(Integer pageSize) { 83 | this.pageSize = pageSize; 84 | } 85 | 86 | public Integer getStart() { 87 | return start; 88 | } 89 | 90 | public void setStart(Integer start) { 91 | this.start = start; 92 | } 93 | 94 | public Integer getPageNo() { 95 | return pageNo; 96 | } 97 | 98 | public void setPageNo(Integer pageNo) { 99 | this.pageNo = pageNo; 100 | } 101 | 102 | } -------------------------------------------------------------------------------- /src/edu/equipment/model/Appointment.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.model; 2 | //管理员表 3 | public class Appointment { 4 | private Integer id; 5 | private String order_no; 6 | private Integer e_id; 7 | private Integer quantity; 8 | private String stuno_or_tno; 9 | private String create_date; 10 | private String start_time; 11 | private String end_time; 12 | private String status; 13 | private String code; 14 | private String state;//学生或老师 1学生2老师 15 | private Integer uid; 16 | 17 | 18 | private String ename; 19 | private String stname; 20 | 21 | 22 | private Integer page; 23 | private Integer limit; 24 | public Integer getId() { 25 | return id; 26 | } 27 | public void setId(Integer id) { 28 | this.id = id; 29 | } 30 | public String getOrder_no() { 31 | return order_no; 32 | } 33 | public void setOrder_no(String order_no) { 34 | this.order_no = order_no; 35 | } 36 | public Integer getE_id() { 37 | return e_id; 38 | } 39 | public void setE_id(Integer e_id) { 40 | this.e_id = e_id; 41 | } 42 | public Integer getQuantity() { 43 | return quantity; 44 | } 45 | public void setQuantity(Integer quantity) { 46 | this.quantity = quantity; 47 | } 48 | public String getStuno_or_tno() { 49 | return stuno_or_tno; 50 | } 51 | public void setStuno_or_tno(String stuno_or_tno) { 52 | this.stuno_or_tno = stuno_or_tno; 53 | } 54 | public String getCreate_date() { 55 | return create_date; 56 | } 57 | public void setCreate_date(String create_date) { 58 | this.create_date = create_date; 59 | } 60 | public String getStart_time() { 61 | return start_time; 62 | } 63 | public void setStart_time(String start_time) { 64 | this.start_time = start_time; 65 | } 66 | public String getEnd_time() { 67 | return end_time; 68 | } 69 | public void setEnd_time(String end_time) { 70 | this.end_time = end_time; 71 | } 72 | public String getStatus() { 73 | return status; 74 | } 75 | public void setStatus(String status) { 76 | this.status = status; 77 | } 78 | public String getCode() { 79 | return code; 80 | } 81 | public void setCode(String code) { 82 | this.code = code; 83 | } 84 | public String getState() { 85 | return state; 86 | } 87 | public void setState(String state) { 88 | this.state = state; 89 | } 90 | public String getEname() { 91 | return ename; 92 | } 93 | public void setEname(String ename) { 94 | this.ename = ename; 95 | } 96 | public String getStname() { 97 | return stname; 98 | } 99 | public void setStname(String stname) { 100 | this.stname = stname; 101 | } 102 | public Integer getPage() { 103 | return page; 104 | } 105 | public void setPage(Integer page) { 106 | this.page = page; 107 | } 108 | public Integer getLimit() { 109 | return limit; 110 | } 111 | public void setLimit(Integer limit) { 112 | this.limit = limit; 113 | } 114 | public Integer getUid() { 115 | return uid; 116 | } 117 | public void setUid(Integer uid) { 118 | this.uid = uid; 119 | } 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | } 134 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/ProductMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 32 | 33 | 34 | 37 | 38 | 39 | insert into product (name,detail,photo,price,hours,note,boss,phone,type,spot,create_time) 40 | values (#{name,jdbcType=VARCHAR},#{detail,jdbcType=VARCHAR},#{photo,jdbcType=VARCHAR}, 41 | #{price,jdbcType=DOUBLE},#{hours,jdbcType=DOUBLE},#{note,jdbcType=VARCHAR},#{boss,jdbcType=VARCHAR} 42 | ,#{phone,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{spot,jdbcType=VARCHAR},#{create_time,jdbcType=VARCHAR}) 43 | 44 | 45 | 46 | update product set 47 | name = #{record.name,jdbcType=VARCHAR}, 48 | detail = #{record.detail,jdbcType=VARCHAR}, 49 | photo = #{record.photo,jdbcType=VARCHAR}, 50 | price = #{record.price,jdbcType=DOUBLE}, 51 | hours = #{record.hours,jdbcType=DOUBLE}, 52 | note = #{record.note,jdbcType=VARCHAR}, 53 | boss = #{record.boss,jdbcType=VARCHAR}, 54 | phone = #{record.phone,jdbcType=VARCHAR}, 55 | type = #{record.type,jdbcType=VARCHAR}, 56 | spot = #{record.spot,jdbcType=VARCHAR}, 57 | create_time = #{record.create_time,jdbcType=VARCHAR} 58 | where id=#{record.id} 59 | 60 | 61 | 62 | delete from product 63 | where id = #{id} 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/edu/equipment/model/Equipment.java: -------------------------------------------------------------------------------- 1 | package edu.equipment.model; 2 | //管理员表 3 | public class Equipment { 4 | private Integer id; 5 | private String qcbh; 6 | private String title; 7 | private Integer category_id; 8 | private String detail; 9 | private String photo; 10 | private Integer stock; 11 | private Double price; 12 | private String create_date; 13 | private String status; 14 | private Integer admin_d; 15 | private String address; 16 | private String note; 17 | 18 | private String admin; 19 | private String category; 20 | 21 | private Integer page; 22 | private Integer limit; 23 | public Integer getId() { 24 | return id; 25 | } 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | public String getQcbh() { 30 | return qcbh; 31 | } 32 | public void setQcbh(String qcbh) { 33 | this.qcbh = qcbh; 34 | } 35 | public String getTitle() { 36 | return title; 37 | } 38 | public void setTitle(String title) { 39 | this.title = title; 40 | } 41 | public Integer getCategory_id() { 42 | return category_id; 43 | } 44 | public void setCategory_id(Integer category_id) { 45 | this.category_id = category_id; 46 | } 47 | public String getDetail() { 48 | return detail; 49 | } 50 | public void setDetail(String detail) { 51 | this.detail = detail; 52 | } 53 | public String getPhoto() { 54 | return photo; 55 | } 56 | public void setPhoto(String photo) { 57 | this.photo = photo; 58 | } 59 | public Integer getStock() { 60 | return stock; 61 | } 62 | public void setStock(Integer stock) { 63 | this.stock = stock; 64 | } 65 | public Double getPrice() { 66 | return price; 67 | } 68 | public void setPrice(Double price) { 69 | this.price = price; 70 | } 71 | public String getCreate_date() { 72 | return create_date; 73 | } 74 | public void setCreate_date(String create_date) { 75 | this.create_date = create_date; 76 | } 77 | public String getStatus() { 78 | return status; 79 | } 80 | public void setStatus(String status) { 81 | this.status = status; 82 | } 83 | public Integer getAdmin_d() { 84 | return admin_d; 85 | } 86 | public void setAdmin_d(Integer admin_d) { 87 | this.admin_d = admin_d; 88 | } 89 | public String getAddress() { 90 | return address; 91 | } 92 | public void setAddress(String address) { 93 | this.address = address; 94 | } 95 | public String getNote() { 96 | return note; 97 | } 98 | public void setNote(String note) { 99 | this.note = note; 100 | } 101 | public Integer getPage() { 102 | return page; 103 | } 104 | public void setPage(Integer page) { 105 | this.page = page; 106 | } 107 | public Integer getLimit() { 108 | return limit; 109 | } 110 | public void setLimit(Integer limit) { 111 | this.limit = limit; 112 | } 113 | public String getAdmin() { 114 | return admin; 115 | } 116 | public void setAdmin(String admin) { 117 | this.admin = admin; 118 | } 119 | public String getCategory() { 120 | return category; 121 | } 122 | public void setCategory(String category) { 123 | this.category = category; 124 | } 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | } 139 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/StudentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 36 | 39 | 40 | 41 | insert into student (stuno,realname,sex,nickname,pwd,phone,photo,major,bj,grade,registe_time) 42 | values (#{stuno,jdbcType=VARCHAR},#{realname,jdbcType=VARCHAR},#{sex,jdbcType=VARCHAR}, 43 | #{nickname,jdbcType=VARCHAR},#{pwd,jdbcType=VARCHAR},#{phone,jdbcType=VARCHAR},#{photo,jdbcType=VARCHAR} 44 | ,#{major,jdbcType=VARCHAR},#{bj,jdbcType=VARCHAR},#{grade,jdbcType=VARCHAR},#{registe_time,jdbcType=VARCHAR}) 45 | 46 | 47 | update student set 48 | stuno = #{record.stuno,jdbcType=VARCHAR}, 49 | realname = #{record.realname,jdbcType=VARCHAR}, 50 | sex = #{record.sex,jdbcType=VARCHAR}, 51 | nickname = #{record.nickname,jdbcType=VARCHAR}, 52 | pwd = #{record.pwd,jdbcType=VARCHAR}, 53 | phone = #{record.phone,jdbcType=VARCHAR}, 54 | photo = #{record.photo,jdbcType=VARCHAR}, 55 | major = #{record.major,jdbcType=VARCHAR}, 56 | bj = #{record.bj,jdbcType=VARCHAR}, 57 | grade = #{record.grade,jdbcType=VARCHAR}, 58 | registe_time = #{record.registe_time,jdbcType=VARCHAR} 59 | where id=#{record.id} 60 | 61 | 62 | 63 | delete from student 64 | where id = #{id} 65 | 66 | 67 | 70 | 71 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/TeacherMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 37 | 40 | 41 | 42 | insert into teacher (tno,pwd,photo,name,sex,age,education,insitute,job,note,phone,create_date) 43 | values (#{tno,jdbcType=VARCHAR},#{pwd,jdbcType=VARCHAR},#{photo,jdbcType=VARCHAR}, 44 | #{name,jdbcType=VARCHAR},#{sex,jdbcType=VARCHAR},#{age,jdbcType=INTEGER},#{education,jdbcType=VARCHAR} 45 | ,#{insitute,jdbcType=VARCHAR},#{job,jdbcType=VARCHAR},#{note,jdbcType=VARCHAR},#{phone,jdbcType=VARCHAR},#{create_date,jdbcType=VARCHAR}) 46 | 47 | 48 | update teacher set 49 | tno = #{record.tno,jdbcType=VARCHAR}, 50 | pwd = #{record.pwd,jdbcType=VARCHAR}, 51 | name = #{record.name,jdbcType=VARCHAR}, 52 | sex = #{record.sex,jdbcType=VARCHAR}, 53 | age = #{record.age,jdbcType=INTEGER}, 54 | education = #{record.education,jdbcType=VARCHAR}, 55 | insitute = #{record.insitute,jdbcType=VARCHAR}, 56 | job = #{record.job,jdbcType=VARCHAR}, 57 | note = #{record.note,jdbcType=VARCHAR}, 58 | phone = #{record.phone,jdbcType=VARCHAR}, 59 | photo = #{record.photo,jdbcType=VARCHAR}, 60 | create_date = #{record.create_date,jdbcType=VARCHAR} 61 | where id=#{record.id} 62 | 63 | 64 | 65 | delete from teacher 66 | where id = #{id} 67 | 68 | 69 | 72 | 73 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/AppMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 34 | 35 | 36 | 37 | insert into appointment (order_no,e_id,quantity,stuno_or_tno,create_date,start_time,end_time,status,code,state,uid) 38 | values (#{order_no,jdbcType=VARCHAR},#{e_id,jdbcType=INTEGER},#{quantity,jdbcType=INTEGER}, 39 | #{stuno_or_tno,jdbcType=VARCHAR},#{create_date,jdbcType=VARCHAR},#{start_time,jdbcType=VARCHAR},#{end_time,jdbcType=VARCHAR} 40 | ,#{status,jdbcType=VARCHAR},#{code,jdbcType=VARCHAR},#{state,jdbcType=VARCHAR},#{uid,jdbcType=INTEGER}) 41 | 42 | 43 | update appointment set 44 | order_no = #{record.order_no,jdbcType=VARCHAR}, 45 | e_id = #{record.e_id,jdbcType=INTEGER}, 46 | quantity = #{record.quantity,jdbcType=INTEGER}, 47 | stuno_or_tno = #{record.stuno_or_tno,jdbcType=VARCHAR}, 48 | create_date = #{record.create_date,jdbcType=VARCHAR}, 49 | start_time = #{record.start_time,jdbcType=VARCHAR}, 50 | end_time = #{record.end_time,jdbcType=VARCHAR}, 51 | status = #{record.status,jdbcType=VARCHAR}, 52 | code = #{record.code,jdbcType=VARCHAR}, 53 | state = #{record.state,jdbcType=VARCHAR}, 54 | uid = #{record.uid,jdbcType=INTEGER} 55 | where id=#{record.id} 56 | 57 | 58 | delete from appointment 59 | where id = #{id} 60 | 61 | 62 | 63 | 69 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/EquipmentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 40 | 41 | 42 | insert into equipment (qcbh,title,category_id,detail,photo,stock,price,create_date,status,admin_d,address,note) 43 | values (#{qcbh,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{category_id,jdbcType=INTEGER}, 44 | #{detail,jdbcType=VARCHAR},#{photo,jdbcType=VARCHAR},#{stock,jdbcType=INTEGER},#{price,jdbcType=DOUBLE} 45 | ,#{create_date,jdbcType=VARCHAR},#{status,jdbcType=VARCHAR},#{admin_d,jdbcType=VARCHAR},#{address,jdbcType=VARCHAR},#{note,jdbcType=VARCHAR}) 46 | 47 | 48 | update equipment set 49 | qcbh = #{record.qcbh,jdbcType=VARCHAR}, 50 | category_id = #{record.category_id,jdbcType=INTEGER}, 51 | title = #{record.title,jdbcType=VARCHAR}, 52 | detail = #{record.detail,jdbcType=VARCHAR}, 53 | photo = #{record.photo,jdbcType=VARCHAR}, 54 | stock = #{record.stock,jdbcType=INTEGER}, 55 | price = #{record.price,jdbcType=DOUBLE}, 56 | create_date = #{record.create_date,jdbcType=VARCHAR}, 57 | status = #{record.status,jdbcType=VARCHAR}, 58 | admin_d = #{record.admin_d,jdbcType=VARCHAR}, 59 | address = #{record.address,jdbcType=VARCHAR}, 60 | note = #{record.note,jdbcType=VARCHAR} 61 | where id=#{record.id} 62 | 63 | 64 | 65 | delete from equipment 66 | where id = #{id} 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/RefundMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 29 | 33 | 34 | 35 | insert into refund (order_no,uid,product_id,lp_price,reason,status,create_time) 36 | values (#{order_no,jdbcType=VARCHAR},#{uid,jdbcType=INTEGER},#{product_id,jdbcType=INTEGER}, 37 | #{lp_price,jdbcType=DOUBLE},#{reason,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{create_time,jdbcType=VARCHAR}) 38 | 39 | 40 | 41 | update refund set 42 | order_no = #{record.order_no,jdbcType=VARCHAR}, 43 | uid = #{record.uid,jdbcType=INTEGER}, 44 | product_id = #{record.product_id,jdbcType=INTEGER}, 45 | lp_price = #{record.lp_price,jdbcType=DOUBLE}, 46 | reason = #{record.reason,jdbcType=VARCHAR}, 47 | status = #{record.status,jdbcType=INTEGER}, 48 | create_time = #{record.create_time,jdbcType=VARCHAR} 49 | where id=#{record.id} 50 | 51 | 52 | 53 | delete from refund 54 | where id = #{id} 55 | 56 | 57 | 61 | 64 | 67 | -------------------------------------------------------------------------------- /src/edu/equipment/mapper/OrdersMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 31 | 35 | 36 | 37 | insert into orders (order_no,uid,product_id,quantity,total_price,status,state,create_time) 38 | values (#{order_no,jdbcType=VARCHAR},#{uid,jdbcType=INTEGER},#{product_id,jdbcType=INTEGER}, 39 | #{quantity,jdbcType=INTEGER},#{total_price,jdbcType=DOUBLE},#{status,jdbcType=INTEGER},#{state,jdbcType=INTEGER} 40 | ,#{create_time,jdbcType=VARCHAR}) 41 | 42 | 43 | 44 | update orders set 45 | order_no = #{record.order_no,jdbcType=VARCHAR}, 46 | uid = #{record.uid,jdbcType=INTEGER}, 47 | product_id = #{record.product_id,jdbcType=INTEGER}, 48 | quantity = #{record.quantity,jdbcType=INTEGER}, 49 | total_price = #{record.total_price,jdbcType=DOUBLE}, 50 | status = #{record.status,jdbcType=INTEGER}, 51 | state = #{record.state,jdbcType=INTEGER}, 52 | create_time = #{record.create_time,jdbcType=VARCHAR} 53 | where id=#{record.id} 54 | 55 | 56 | 57 | delete from orders 58 | where id = #{id} 59 | 60 | 64 | 65 | 66 | 69 | 72 | 76 | 77 | --------------------------------------------------------------------------------