Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
段志宇 | 5ba22197c0 | 2 days ago |
段志宇 | b45f1a0093 | 2 days ago |
段志宇 | 648f85e42e | 2 days ago |
段志宇 | 8168ae6be6 | 2 days ago |
段志宇 | 7e46c7fc3d | 5 days ago |
段志宇 | 8bb8c56ff3 | 5 days ago |
段志宇 | 094675d07e | 3 weeks ago |
After Width: | Height: | Size: 614 KiB |
@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="gym-management-system" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="gym-management-system" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="gym_management_system@localhost" uuid="89302d23-1b6e-46fb-966c-a9575f8a35a2">
|
||||
<driver-ref>mysql.8</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<imported>true</imported>
|
||||
<remarks>$PROJECT_DIR$/src/main/resources/application.yml</remarks>
|
||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mysql://localhost:3306/gym_management_system</jdbc-url>
|
||||
<jdbc-additional-properties>
|
||||
<property name="com.intellij.clouds.kubernetes.db.host.port" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.container.port" />
|
||||
</jdbc-additional-properties>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
@ -1,10 +0,0 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="李洪岚">
|
||||
<words>
|
||||
<w>rdate</w>
|
||||
<w>rtime</w>
|
||||
<w>ruser</w>
|
||||
<w>tdate</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/gym_management_system.sql" dialect="MySQL" />
|
||||
</component>
|
||||
</project>
|
@ -1,124 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,190 @@
|
||||
|
||||
DROP DATABASE IF EXISTS gym_management_system ;
|
||||
CREATE DATABASE gym_management_system CHARACTER SET utf8;
|
||||
use gym_management_system ;
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for admin
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `admin`;
|
||||
CREATE TABLE `admin` (
|
||||
`admin_account` int NOT NULL COMMENT '管理员账号',
|
||||
`admin_password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '管理员密码',
|
||||
PRIMARY KEY (`admin_account`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of admin
|
||||
-- ----------------------------
|
||||
INSERT INTO `admin` VALUES (1001, '123456');
|
||||
INSERT INTO `admin` VALUES (1002, '123456');
|
||||
INSERT INTO `admin` VALUES (1003, '123456');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for classtable
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `class_table`;
|
||||
CREATE TABLE `class_table` (
|
||||
`c_id` int NOT NULL AUTO_INCREMENT COMMENT '预约表id',
|
||||
`class_id` int NULL DEFAULT NULL COMMENT '预约id',
|
||||
`class_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
|
||||
`class_begin` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '时间',
|
||||
`coach` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地点',
|
||||
PRIMARY KEY (`c_id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of classtable
|
||||
-- ----------------------------
|
||||
INSERT INTO `class_table` VALUES (1,10001, '跑步机1', '8:00-9:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (2,10002, '跑步机1', '9:00-10:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (3,10003, '跑步机1', '10:00-11:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (4,10004, '跑步机1', '11:00-12:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (5,10005, '跑步机1', '14:00-15:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (6,10006, '跑步机1', '15:00-16:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (7,10007, '跑步机1', '16:00-17:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (8,10008, '跑步机1', '17:00-18:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (9,10009, '跑步机1', '20:00-21:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (10,10010, '跑步机1', '21:00-22:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (11,10011, '杠铃1', '8:00-9:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (12,10012, '杠铃1', '9:00-10:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (13,10013, '杠铃1', '10:00-11:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (14,10014, '杠铃1', '11:00-12:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (15,10015, '杠铃1', '14:00-15:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (16,10016, '杠铃1', '15:00-16:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (17,10017, '杠铃1', '16:00-17:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (18,10018, '杠铃1', '17:00-18:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (19,10019, '杠铃1', '20:00-21:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (20,10020, '杠铃1', '21:00-22:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (21,10011, '哑铃1', '8:00-9:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (22,10012, '哑铃1', '9:00-10:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (23,10013, '哑铃1', '10:00-11:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (24,10014, '哑铃1', '11:00-12:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (25,10015, '哑铃1', '14:00-15:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (26,10016, '哑铃1', '15:00-16:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (27,10017, '哑铃1', '16:00-17:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (28,10018, '哑铃1', '17:00-18:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (29,10019, '哑铃1', '20:00-21:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (30,10020, '哑铃1', '21:00-22:00', '一号房间');
|
||||
INSERT INTO `class_table` VALUES (31,10001, '跑步机2', '8:00-9:00', '二号房间');
|
||||
INSERT INTO `class_table` VALUES (32,10003, '跑步机2', '10:00-11:00', '二号房间');
|
||||
INSERT INTO `class_table` VALUES (33,10004, '跑步机2', '11:00-12:00', '二号房间');
|
||||
INSERT INTO `class_table` VALUES (34,10005, '跑步机2', '14:00-15:00', '二号房间');
|
||||
INSERT INTO `class_table` VALUES (35,10006, '跑步机2', '15:00-16:00', '二号房间');
|
||||
INSERT INTO `class_table` VALUES (36,10007, '跑步机2', '16:00-17:00', '二号房间');
|
||||
INSERT INTO `class_table` VALUES (37,10008, '跑步机2', '17:00-18:00', '二号房间');
|
||||
INSERT INTO `class_table` VALUES (38,10009, '跑步机2', '20:00-21:00', '二号房间');
|
||||
INSERT INTO `class_table` VALUES (39,10010, '跑步机2', '21:00-22:00', '二号房间');
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `record_table`;
|
||||
CREATE TABLE `record_table` (
|
||||
`date` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '预约时间',
|
||||
`ruser` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户账号',
|
||||
`record_id` int NULL DEFAULT NULL COMMENT '预约id',
|
||||
`record_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
|
||||
`record_begin` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '时间',
|
||||
`location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地点',
|
||||
PRIMARY KEY (`date`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
INSERT INTO `record_table` VALUES ('2024-11-18 15:01:20',202009867,10001, '跑步机', '8:00-9:00', '一号房间');
|
||||
INSERT INTO `record_table` VALUES ('2024-11-18 15:11:20',202009867,10002, '跑步机', '9:00-10:00', '一号房间');
|
||||
INSERT INTO `record_table` VALUES ('2024-11-18 15:21:20',202009867,10005, '跑步机', '9:00-10:00', '一号房间');
|
||||
INSERT INTO `record_table` VALUES ('2024-11-18 15:31:20',202009867,10003, '跑步机', '9:00-10:00', '一号房间');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for member
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `member`;
|
||||
CREATE TABLE `member` (
|
||||
`member_account` int NOT NULL COMMENT '用户账号',
|
||||
`member_password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码',
|
||||
`member_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户姓名',
|
||||
`member_gender` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户性别',
|
||||
`member_age` int NULL DEFAULT NULL COMMENT '用户年龄',
|
||||
`member_height` int NULL DEFAULT NULL COMMENT '用户身高',
|
||||
`member_weight` int NULL DEFAULT NULL COMMENT '用户体重',
|
||||
`member_phone` bigint NULL DEFAULT NULL COMMENT '用户电话',
|
||||
PRIMARY KEY (`member_account`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of member
|
||||
-- ----------------------------
|
||||
INSERT INTO `member` VALUES (202009867, '123456', '张三', '女', 24, 182, 60, 13515548482);
|
||||
INSERT INTO `member` VALUES (202100788, '123456', '李四', '男', 31, 178, 60, 13131554873);
|
||||
INSERT INTO `member` VALUES (202132539, '123456', '王五', '男', 31, 178, 60, 13154875489);
|
||||
INSERT INTO `member` VALUES (202186416, '123456', '马六', '女', 23, 160, 45, 13124576857);
|
||||
INSERT INTO `member` VALUES (202106725, '123456', 'Tom', '男', 24, 178, 88, 13758784959);
|
||||
INSERT INTO `member` VALUES (202183406, '123456', 'Tylor', '女', 19, 170, 60, 13786457488);
|
||||
INSERT INTO `member` VALUES (202176587, '123456', 'Jack', '男', 33, 177, 90, 13767546666);
|
||||
INSERT INTO `member` VALUES (202156754, '123456', 'Mike', '男', 36, 166, 67, 13786532448);
|
||||
INSERT INTO `member` VALUES (202153468, '123456', 'Emma', '女', 25, 173, 44, 13786457124);
|
||||
INSERT INTO `member` VALUES (202121345, '123456', 'Ava', '女', 28, 160, 40, 13754457488);
|
||||
INSERT INTO `member` VALUES (202189776, '123456', 'Chloe', '女', 27, 170, 50, 13986337489);
|
||||
INSERT INTO `member` VALUES (202123664, '123456', 'Lily', '女', 25, 165, 51, 15986457423);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for equipment
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `equipment`;
|
||||
CREATE TABLE `equipment` (
|
||||
`equipment_id` int NOT NULL AUTO_INCREMENT COMMENT '器材id',
|
||||
`equipment_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
|
||||
`equipment_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材位置',
|
||||
`equipment_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材状态',
|
||||
`equipment_message` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材备注信息',
|
||||
PRIMARY KEY (`equipment_id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of equipment
|
||||
-- ----------------------------
|
||||
INSERT INTO `equipment` VALUES (1, '哑铃1', '1号房间', '正常', '');
|
||||
INSERT INTO `equipment` VALUES (2, '杠铃1', '2号房间', '损坏', '待维修');
|
||||
INSERT INTO `equipment` VALUES (3, '跑步机1', '2号房间', '维修中', '联系厂家维修');
|
||||
INSERT INTO `equipment` VALUES (4, '跑步机2', '2号房间', '正常', '');
|
||||
INSERT INTO `equipment` VALUES (5, '跑步机3', '2号房间', '正常', '');
|
||||
INSERT INTO `equipment` VALUES (6, '杠铃1', '1号房间', '正常', '');
|
||||
INSERT INTO `equipment` VALUES (7, '杠铃2', '1号房间', '正常', '');
|
||||
|
||||
-- ----------------------------
|
||||
-- Records for target_record
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `target_record`;
|
||||
CREATE TABLE `target_record` (
|
||||
`tuser` int NULL DEFAULT NULL COMMENT '用户账号',
|
||||
`tp_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称',
|
||||
`tep_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
|
||||
`tr_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材位置',
|
||||
`ttime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '锻炼时长',
|
||||
`tdate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci Not NULL COMMENT '锻炼时间',
|
||||
PRIMARY KEY (`tdate`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
INSERT INTO `target_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月2日 10:20');
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
DROP TABLE IF EXISTS `real_record`;
|
||||
CREATE TABLE `real_record` (
|
||||
`ruser` int NULL DEFAULT NULL COMMENT '用户账号',
|
||||
`rp_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称',
|
||||
`rep_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材名称',
|
||||
`rr_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '器材位置',
|
||||
`rtime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '锻炼时长',
|
||||
`rdate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci Not NULL COMMENT '锻炼时间',
|
||||
PRIMARY KEY (`rdate`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
|
||||
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月2日 10:20');
|
||||
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月3日 10:21');
|
||||
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月4日 11:20');
|
||||
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月8日 10:20');
|
||||
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月9日 14:20');
|
||||
INSERT INTO `real_record` VALUES (202009867,'跑步','跑步机','1号房','30min','2021年1月1日 10:90');
|
||||
|
||||
|
||||
|
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.milotnt</groupId>
|
||||
<artifactId>gym-management-system</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>gym-management-system</name>
|
||||
<description>gym-management-system</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<mysql.version>8.0.25</mysql.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
package com.milotnt;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class GymManagementSystemApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GymManagementSystemApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.milotnt.controller;
|
||||
|
||||
import com.milotnt.pojo.ClassTable;
|
||||
import com.milotnt.service.ClassTableService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @date
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/class")
|
||||
public class ClassController {
|
||||
|
||||
@Autowired
|
||||
private ClassTableService classTableService;
|
||||
//查询预约信息
|
||||
@RequestMapping("/selClass")
|
||||
public String selectClass(Model model) {
|
||||
List<ClassTable> classList = classTableService.findAll();
|
||||
model.addAttribute("classList", classList);
|
||||
return "selectClass";
|
||||
}
|
||||
|
||||
//跳转新增预约信息页面
|
||||
@RequestMapping("/toAddClass")
|
||||
public String toAddClass() {
|
||||
return "addClass";
|
||||
}
|
||||
|
||||
//新增预约信息
|
||||
@RequestMapping("/addClass")
|
||||
public String addClass(ClassTable classTable) {
|
||||
classTableService.insertClass(classTable);
|
||||
return "redirect:selClass";
|
||||
}
|
||||
|
||||
|
||||
//删除预约信息
|
||||
@RequestMapping("/delClass")
|
||||
public String deleteClass(Integer classId) {
|
||||
classTableService.deleteClassByClassId(classId);
|
||||
return "redirect:selClass";
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.milotnt.controller;
|
||||
|
||||
import com.milotnt.pojo.Equipment;
|
||||
import com.milotnt.service.EquipmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/equipment")
|
||||
public class EquipmentController {
|
||||
|
||||
@Autowired
|
||||
private EquipmentService equipmentService;
|
||||
|
||||
//查询器材
|
||||
@RequestMapping("/selEquipment")
|
||||
public String selectEquipment(Model model, HttpSession session) {
|
||||
List<Equipment> equipmentList = equipmentService.findAll();
|
||||
session.setAttribute("equipmentList", equipmentList);
|
||||
model.addAttribute("equipmentList", equipmentList);
|
||||
return "selectEquipment";
|
||||
}
|
||||
|
||||
//删除器材
|
||||
@RequestMapping("/delEquipment")
|
||||
public String deleteEquipment(Integer equipmentId) {
|
||||
equipmentService.deleteByEquipmentId(equipmentId);
|
||||
return "redirect:selEquipment";
|
||||
}
|
||||
|
||||
//跳转修改器材页面
|
||||
@RequestMapping("/toUpdateEquipment")
|
||||
public String toUpdateEquipment(Integer equipmentId, Model model) {
|
||||
List<Equipment> equipmentList = equipmentService.selectByEquipmentId(equipmentId);
|
||||
model.addAttribute("equipmentList", equipmentList);
|
||||
return "updateEquipment";
|
||||
}
|
||||
|
||||
//修改器材
|
||||
@RequestMapping("/updateEquipment")
|
||||
public String updateEquipment(Equipment equipment) {
|
||||
equipmentService.updateEquipmentByEquipmentId(equipment);
|
||||
return "redirect:selEquipment";
|
||||
}
|
||||
|
||||
//跳转新增器材页面
|
||||
@RequestMapping("/toAddEquipment")
|
||||
public String toAddEquipment() {
|
||||
return "addEquipment";
|
||||
}
|
||||
|
||||
//新增器材
|
||||
@RequestMapping("/addEquipment")
|
||||
public String addEquipment(Equipment equipment) {
|
||||
equipmentService.insertEquipment(equipment);
|
||||
return "redirect:selEquipment";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
package com.milotnt.controller;
|
||||
|
||||
import com.milotnt.pojo.Admin;
|
||||
import com.milotnt.pojo.Member;
|
||||
import com.milotnt.service.AdminService;
|
||||
import com.milotnt.service.EquipmentService;
|
||||
import com.milotnt.service.MemberService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
|
||||
@Controller
|
||||
public class LoginController {
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
@Autowired
|
||||
private AdminService adminService;
|
||||
|
||||
@Autowired
|
||||
private EquipmentService equipmentService;
|
||||
|
||||
//主页、跳转管理员登录页面
|
||||
@RequestMapping("/")
|
||||
public String toAdminLogin() {
|
||||
return "adminLogin";
|
||||
}
|
||||
|
||||
//跳转用户登录页面
|
||||
@RequestMapping("/toUserLogin")
|
||||
public String toUserLogin() {
|
||||
return "userLogin";
|
||||
}
|
||||
|
||||
//跳转注册页面
|
||||
@RequestMapping("/toUserRegist")
|
||||
public String toUserRegist() {
|
||||
return "userRegist";
|
||||
}
|
||||
|
||||
//管理员登录
|
||||
@RequestMapping("/adminLogin")
|
||||
public String adminLogin(Admin admin, Model model, HttpSession session) {
|
||||
Admin admin1 = adminService.adminLogin(admin);
|
||||
if (admin1 != null) {
|
||||
//会员人数
|
||||
Integer memberTotal = memberService.selectTotalCount();
|
||||
model.addAttribute("memberTotal", memberTotal);
|
||||
session.setAttribute("memberTotal", memberTotal);
|
||||
|
||||
//健身房总人数
|
||||
Integer humanTotal = memberTotal;
|
||||
model.addAttribute("humanTotal", humanTotal);
|
||||
session.setAttribute("humanTotal", humanTotal);
|
||||
|
||||
//器材数
|
||||
Integer equipmentTotal = equipmentService.selectTotalCount();
|
||||
model.addAttribute("equipmentTotal", equipmentTotal);
|
||||
session.setAttribute("equipmentTotal", equipmentTotal);
|
||||
|
||||
return "adminMain";
|
||||
}
|
||||
model.addAttribute("msg", "您输入的账号或密码有误,请重新输入!");
|
||||
return "adminLogin";
|
||||
}
|
||||
|
||||
//用户登录
|
||||
@RequestMapping("/userLogin")
|
||||
public String userLogin(Member member, Model model, HttpSession session) {
|
||||
Member member1 = memberService.userLogin(member);
|
||||
Member member2 = memberService.selectByPhoneAndPassword(member);
|
||||
if (member1 != null) {
|
||||
model.addAttribute("member", member1);
|
||||
session.setAttribute("user", member1);
|
||||
return "userMain";
|
||||
}
|
||||
if(member2 != null) {
|
||||
model.addAttribute("member", member2);
|
||||
session.setAttribute("user", member2);
|
||||
return "userMain";
|
||||
}
|
||||
model.addAttribute("msg", "您输入的账号或密码有误,请重新输入!");
|
||||
return "userLogin";
|
||||
}
|
||||
|
||||
//跳转管理员主页
|
||||
@RequestMapping("/toAdminMain")
|
||||
public String toAdminMain(Model model, HttpSession session) {
|
||||
Integer memberTotal = (Integer) session.getAttribute("memberTotal");
|
||||
Integer employeeTotal = (Integer) session.getAttribute("employeeTotal");
|
||||
Integer humanTotal = (Integer) session.getAttribute("humanTotal");
|
||||
Integer equipmentTotal = (Integer) session.getAttribute("equipmentTotal");
|
||||
model.addAttribute("memberTotal", memberTotal);
|
||||
model.addAttribute("employeeTotal", employeeTotal);
|
||||
model.addAttribute("humanTotal", humanTotal);
|
||||
model.addAttribute("equipmentTotal", equipmentTotal);
|
||||
return "adminMain";
|
||||
}
|
||||
|
||||
//跳转用户主页
|
||||
@RequestMapping("/toUserMain")
|
||||
public String toUserMain(Model model, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
model.addAttribute("member", member);
|
||||
return "userMain";
|
||||
}
|
||||
|
||||
//注册成功
|
||||
@RequestMapping("/addUser")
|
||||
public String addUser(Member member) {
|
||||
//用户账号&卡号随机生成
|
||||
Random random = new Random();
|
||||
String account1 = "21";
|
||||
for (int i = 0; i < 5; i++) {
|
||||
account1 += random.nextInt(10);
|
||||
}
|
||||
Integer account = Integer.parseInt(account1);
|
||||
member.setMemberAccount(account);
|
||||
memberService.insertMember(member);
|
||||
return "redirect:toUserLogin";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.milotnt.controller;
|
||||
|
||||
import com.milotnt.pojo.Member;
|
||||
import com.milotnt.service.MemberService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/member")
|
||||
public class MemberController {
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
//查询会员
|
||||
@RequestMapping("/selMember")
|
||||
public String selectMember(Model model) {
|
||||
List<Member> memberList = memberService.findAll();
|
||||
model.addAttribute("memberList", memberList);
|
||||
return "selectMember";
|
||||
}
|
||||
|
||||
//跳转新增会员页面
|
||||
@RequestMapping("/toAddMember")
|
||||
public String toAddMember() {
|
||||
return "addMember";
|
||||
}
|
||||
|
||||
//新增用户
|
||||
@RequestMapping("/addMember")
|
||||
public String addMember(Member member) {
|
||||
//用户账号&卡号随机生成
|
||||
Random random = new Random();
|
||||
String account1 = "21";
|
||||
for (int i = 0; i < 5; i++) {
|
||||
account1 += random.nextInt(10);
|
||||
}
|
||||
Integer account = Integer.parseInt(account1);
|
||||
member.setMemberAccount(account);
|
||||
|
||||
memberService.insertMember(member);
|
||||
|
||||
return "redirect:selMember";
|
||||
|
||||
}
|
||||
|
||||
//新增用户
|
||||
|
||||
|
||||
//删除会员
|
||||
@RequestMapping("/delMember")
|
||||
public String deleteMember(Integer memberAccount) {
|
||||
memberService.deleteByMemberAccount(memberAccount);
|
||||
return "redirect:selMember";
|
||||
}
|
||||
|
||||
//跳转会员修改页面
|
||||
@RequestMapping("/toUpdateMember")
|
||||
public String toUpdateMember(Integer memberAccount, Model model) {
|
||||
List<Member> memberList = memberService.selectByMemberAccount(memberAccount);
|
||||
model.addAttribute("memberList", memberList);
|
||||
return "updateMember";
|
||||
}
|
||||
|
||||
//修改会员信息
|
||||
@RequestMapping("/updateMember")
|
||||
public String updateMember(Member member) {
|
||||
memberService.updateMemberByMemberAccount(member);
|
||||
return "redirect:selMember";
|
||||
}
|
||||
|
||||
|
||||
//跳转会员卡查询页面
|
||||
@RequestMapping("/toSelByCard")
|
||||
public String toSelectByCardId() {
|
||||
return "selectByMemberAccount";
|
||||
}
|
||||
|
||||
//根据会员卡号查询
|
||||
@RequestMapping("/selByCard")
|
||||
public String selectByCardId(Model model, Integer memberAccount) {
|
||||
List<Member> memberList = memberService.selectByMemberAccount(memberAccount);
|
||||
if (memberList != null) {
|
||||
model.addAttribute("memberList", memberList);
|
||||
} else {
|
||||
String message = "会员卡号不存在!";
|
||||
model.addAttribute("noMessage", message);
|
||||
}
|
||||
return "selectByMemberAccount";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,185 @@
|
||||
package com.milotnt.controller;
|
||||
|
||||
import com.milotnt.pojo.*;
|
||||
import com.milotnt.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @date 24/11/18
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/user")
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
private ClassTableService classTableService;
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@Autowired
|
||||
private RecordTableService recordTableService;
|
||||
|
||||
@Autowired
|
||||
private TargetRecordService targetRecordService;
|
||||
|
||||
@Autowired
|
||||
private RealRecordService realRecordService;
|
||||
|
||||
|
||||
//跳转个人信息页面
|
||||
@RequestMapping("/toUserInfo")
|
||||
public String toUserInformation(Model model, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
model.addAttribute("member", member);
|
||||
return "userInformation";
|
||||
}
|
||||
|
||||
//跳转修改个人信息页面
|
||||
@RequestMapping("/toUpdateInfo")
|
||||
public String toUpdateUserInformation(HttpSession session, Model model) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
model.addAttribute("member", member);
|
||||
return "updateUserInformation";
|
||||
}
|
||||
|
||||
//修改个人信息
|
||||
@RequestMapping("/updateInfo")
|
||||
public String updateUserInformation(HttpSession session, Member member) {
|
||||
Member member1 = (Member) session.getAttribute("user");
|
||||
member.setMemberAccount(member1.getMemberAccount());
|
||||
memberService.updateMemberByMemberAccount(member);
|
||||
return "userInformation";
|
||||
}
|
||||
|
||||
|
||||
//跳转预约信息
|
||||
@RequestMapping("/toUserBook")
|
||||
public String selectClass(Model model) {
|
||||
List<ClassTable> classList = classTableService.findAll();
|
||||
model.addAttribute("classList", classList);
|
||||
return "userBook";
|
||||
}
|
||||
|
||||
//跳转我的预约记录
|
||||
@RequestMapping("/toUserBookRecord")
|
||||
public String toUserBookRecord(Model model, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
Integer ruser = member.getMemberAccount();
|
||||
List<RecordTable> recordList = recordTableService.findAll(ruser);
|
||||
model.addAttribute("recordList", recordList);
|
||||
return "userBookRecord";
|
||||
}
|
||||
|
||||
//删除预约记录
|
||||
@RequestMapping("delUserRecord")
|
||||
public String delUserRecord(Integer recordId, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
Integer ruser = member.getMemberAccount();
|
||||
recordTableService.deleteRecord(recordId,ruser);
|
||||
return "redirect:toUserBookRecord";
|
||||
}
|
||||
|
||||
//获取时间函数
|
||||
public static String getCurrentDateTime(){
|
||||
// 获取当前日期和时间
|
||||
LocalDateTime currentDateTime = LocalDateTime.now();
|
||||
// 格式化为 "yyyy-MM-dd HH:mm:ss" 字符串格式
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
return currentDateTime.format(formatter);
|
||||
}
|
||||
//新增预期目标
|
||||
@RequestMapping("/addTargetRecord")
|
||||
public String addTargetRecord(String tpName, String tepName, String trLocation, String tTime,Model model, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
Integer tuser = member.getMemberAccount();
|
||||
String tdate = getCurrentDateTime();
|
||||
TargetRecord targetRecord = new TargetRecord(tuser,tpName,tepName,trLocation,tTime,tdate);
|
||||
targetRecordService.insertTargetRecord(targetRecord);
|
||||
List<TargetRecord> TargetRecord = targetRecordService.findLatestTargetRecord(tuser);
|
||||
model.addAttribute("TargetRecord", TargetRecord);
|
||||
model.addAttribute("member", member);
|
||||
return "timer";
|
||||
}
|
||||
|
||||
//新增真实锻炼记录
|
||||
@RequestMapping("/addRealRecord")
|
||||
public String addRealRecord(String rpName, String repName, String rrLocation, String rTime,Model model, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
Integer ruser = member.getMemberAccount();
|
||||
String rdate = getCurrentDateTime();
|
||||
RealRecord realRecord = new RealRecord(ruser,rpName,repName,rrLocation,rTime,rdate);
|
||||
realRecordService.insertRealRecord(realRecord);
|
||||
model.addAttribute("realRecord", realRecord);
|
||||
return "redirect:toEndRecord";
|
||||
}
|
||||
|
||||
//跳转锻炼结束
|
||||
@RequestMapping("/toEndRecord")
|
||||
public String toEndRecord(Model model, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
Integer ruser = member.getMemberAccount();
|
||||
List<TargetRecord> targetRecord = targetRecordService.findLatestTargetRecord(ruser);
|
||||
model.addAttribute("targetRecord", targetRecord);
|
||||
List<RealRecord> realRecord = realRecordService.findLatestRealRecord(ruser);
|
||||
model.addAttribute("realRecord", realRecord);
|
||||
return "endRecord";
|
||||
}
|
||||
|
||||
//跳转我的锻炼记录
|
||||
@RequestMapping("/toUserRealRecord")
|
||||
public String toUserRealRecord(Model model, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
Integer ruser = member.getMemberAccount();
|
||||
List<RealRecord> RealRecord = realRecordService.findAll(ruser);
|
||||
model.addAttribute("RealRecord", RealRecord);
|
||||
return "userClass";
|
||||
}
|
||||
|
||||
//跳转我的预约记录并添加预约记录
|
||||
@RequestMapping("/userBook")
|
||||
public String userBook(Integer recordId,String recordName,String recordBegin,String Location,Model model, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
Integer ruser = member.getMemberAccount();
|
||||
String date = getCurrentDateTime();
|
||||
RecordTable recordTable = new RecordTable(date,ruser,recordId,recordName,recordBegin,Location);
|
||||
recordTableService.insertRecord(recordTable);
|
||||
return "redirect:toUserBookRecord";
|
||||
}
|
||||
|
||||
|
||||
//删除锻炼记录
|
||||
@RequestMapping("delRealRecord")
|
||||
public String deleteRealRecord(String rDate) {
|
||||
realRecordService.deleteRealRecord(rDate);
|
||||
return "redirect:toUserRealRecord";
|
||||
}
|
||||
|
||||
//跳转预约信息页面
|
||||
@RequestMapping("/toApplyClass")
|
||||
public String toUserApplyClass(Model model, HttpSession session) {
|
||||
Member member = (Member) session.getAttribute("user");
|
||||
List<ClassTable> classList = classTableService.findAll();
|
||||
model.addAttribute("member", member);
|
||||
model.addAttribute("classList", classList);
|
||||
return "userApplyClass";
|
||||
}
|
||||
|
||||
//新增预约信息
|
||||
@RequestMapping("/addClass")
|
||||
public String addClass(ClassTable classTable) {
|
||||
classTableService.insertClass(classTable);
|
||||
return "redirect:selClass";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.milotnt.mapper;
|
||||
|
||||
import com.milotnt.pojo.Admin;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface AdminMapper {
|
||||
|
||||
Admin selectByAccountAndPassword(Admin admin);
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.milotnt.mapper;
|
||||
|
||||
import com.milotnt.pojo.ClassTable;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
public interface ClassTableMapper {
|
||||
|
||||
//查询所有课程
|
||||
List<ClassTable> findAll();
|
||||
|
||||
//根据id删除课程
|
||||
Boolean deleteClassByClassId(Integer classId);
|
||||
|
||||
//添加课程
|
||||
Boolean insertClass(ClassTable classTable);
|
||||
|
||||
//根据id查询课表
|
||||
ClassTable selectByClassId(Integer classId);
|
||||
|
||||
//根据id删除已预约的课程
|
||||
Boolean deleteOrderByClassId(Integer classId);
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.milotnt.mapper;
|
||||
|
||||
import com.milotnt.pojo.Equipment;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface EquipmentMapper {
|
||||
|
||||
//查询所有器械
|
||||
List<Equipment> findAll();
|
||||
|
||||
//根据id删除器械
|
||||
Boolean deleteByEquipmentId(Integer equipmentId);
|
||||
|
||||
//添加器材
|
||||
Boolean insertEquipment(Equipment equipment);
|
||||
|
||||
//根据id修改器械信息
|
||||
Boolean updateEquipmentByEquipmentId(Equipment equipment);
|
||||
|
||||
//根据id查询器械
|
||||
List<Equipment> selectByEquipmentId(Integer equipmentId);
|
||||
|
||||
//查询器械总数
|
||||
Integer selectTotalCount();
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.milotnt.mapper;
|
||||
|
||||
import com.milotnt.pojo.Member;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MemberMapper {
|
||||
|
||||
//查询会员信息
|
||||
List<Member> findAll();
|
||||
|
||||
//新增会员信息
|
||||
Boolean insertMember(Member member);
|
||||
|
||||
//根据会员账号修改会员信息
|
||||
Boolean updateMemberByMemberAccount(Member member);
|
||||
|
||||
//查询会员账号密码
|
||||
Member selectByAccountAndPassword(Member member);
|
||||
|
||||
//根据会员账号删除会员信息
|
||||
Boolean deleteByMemberAccount(Integer memberAccount);
|
||||
|
||||
//查询会员数
|
||||
Integer selectTotalCount();
|
||||
|
||||
//根据会员账号查询会员
|
||||
List<Member> selectByMemberAccount(Integer memberAccount);
|
||||
|
||||
List<Member> selectByMemberPhone(Integer memberPhone);
|
||||
|
||||
Member selectByPhoneAndPassword(Member member);
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.milotnt.pojo;
|
||||
|
||||
|
||||
public class Admin {
|
||||
|
||||
private Integer adminAccount;
|
||||
private String adminPassword;
|
||||
|
||||
public Integer getAdminAccount() {
|
||||
return adminAccount;
|
||||
}
|
||||
|
||||
public void setAdminAccount(Integer adminAccount) {
|
||||
this.adminAccount = adminAccount;
|
||||
}
|
||||
|
||||
public String getAdminPassword() {
|
||||
return adminPassword;
|
||||
}
|
||||
|
||||
public void setAdminPassword(String adminPassword) {
|
||||
this.adminPassword = adminPassword;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Admin{" +
|
||||
"adminAccount=" + adminAccount +
|
||||
", adminPassword='" + adminPassword + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.milotnt.pojo;
|
||||
|
||||
import org.springframework.data.relational.core.sql.In;
|
||||
|
||||
|
||||
public class ClassTable {
|
||||
private Integer cid;
|
||||
private Integer classId;
|
||||
private String className;
|
||||
private String classBegin;
|
||||
private String coach;
|
||||
|
||||
public Integer getCid() {return cid;}
|
||||
|
||||
public void setCid(Integer cid) {this.cid = cid;}
|
||||
|
||||
public Integer getClassId() {
|
||||
return classId;
|
||||
}
|
||||
|
||||
public void setClassId(Integer classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public String getClassBegin() {
|
||||
return classBegin;
|
||||
}
|
||||
|
||||
public void setClassBegin(String classBegin) {
|
||||
this.classBegin = classBegin;
|
||||
}
|
||||
|
||||
public String getCoach() {
|
||||
return coach;
|
||||
}
|
||||
|
||||
public void setCoach(String coach) {
|
||||
this.coach = coach;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ClassTable{" +
|
||||
"cid=" + cid +
|
||||
"classId=" + classId +
|
||||
", className='" + className + '\'' +
|
||||
", classBegin='" + classBegin + '\'' +
|
||||
", coach='" + coach + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.milotnt.pojo;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @date
|
||||
*/
|
||||
public class Equipment {
|
||||
|
||||
private Integer equipmentId;
|
||||
private String equipmentName;
|
||||
private String equipmentLocation;
|
||||
private String equipmentStatus;
|
||||
private String equipmentMessage;
|
||||
|
||||
public Equipment() {
|
||||
}
|
||||
|
||||
public Equipment(Integer equipmentId, String equipmentName, String equipmentLocation, String equipmentStatus, String equipmentMessage) {
|
||||
this.equipmentId = equipmentId;
|
||||
this.equipmentName = equipmentName;
|
||||
this.equipmentLocation = equipmentLocation;
|
||||
this.equipmentStatus = equipmentStatus;
|
||||
this.equipmentMessage = equipmentMessage;
|
||||
}
|
||||
|
||||
public Integer getEquipmentId() {
|
||||
return equipmentId;
|
||||
}
|
||||
|
||||
public void setEquipmentId(Integer equipmentId) {
|
||||
this.equipmentId = equipmentId;
|
||||
}
|
||||
|
||||
public String getEquipmentName() {
|
||||
return equipmentName;
|
||||
}
|
||||
|
||||
public void setEquipmentName(String equipmentName) {
|
||||
this.equipmentName = equipmentName;
|
||||
}
|
||||
|
||||
public String getEquipmentLocation() {
|
||||
return equipmentLocation;
|
||||
}
|
||||
|
||||
public void setEquipmentLocation(String equipmentLocation) {
|
||||
this.equipmentLocation = equipmentLocation;
|
||||
}
|
||||
|
||||
public String getEquipmentStatus() {
|
||||
return equipmentStatus;
|
||||
}
|
||||
|
||||
public void setEquipmentStatus(String equipmentStatus) {
|
||||
this.equipmentStatus = equipmentStatus;
|
||||
}
|
||||
|
||||
public String getEquipmentMessage() {
|
||||
return equipmentMessage;
|
||||
}
|
||||
|
||||
public void setEquipmentMessage(String equipmentMessage) {
|
||||
this.equipmentMessage = equipmentMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Equipment{" +
|
||||
"equipmentId=" + equipmentId +
|
||||
", equipmentName='" + equipmentName + '\'' +
|
||||
", equipmentLocation='" + equipmentLocation + '\'' +
|
||||
", equipmentStatus='" + equipmentStatus + '\'' +
|
||||
", equipmentMessage='" + equipmentMessage + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
package com.milotnt.pojo;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @date
|
||||
*/
|
||||
public class Member {
|
||||
|
||||
private Integer memberAccount;
|
||||
private String memberPassword;
|
||||
private String memberName;
|
||||
private String memberGender;
|
||||
private Integer memberAge;
|
||||
private Integer memberHeight;
|
||||
private Integer memberWeight;
|
||||
private Long memberPhone;
|
||||
// private String cardTime;
|
||||
// private Integer cardClass;
|
||||
// private Integer cardNextClass;
|
||||
|
||||
public Integer getMemberAccount() {
|
||||
return memberAccount;
|
||||
}
|
||||
|
||||
public void setMemberAccount(Integer memberAccount) {
|
||||
this.memberAccount = memberAccount;
|
||||
}
|
||||
|
||||
public String getMemberPassword() {
|
||||
return memberPassword;
|
||||
}
|
||||
|
||||
public void setMemberPassword(String memberPassword) {
|
||||
this.memberPassword = memberPassword;
|
||||
}
|
||||
|
||||
public String getMemberName() {
|
||||
return memberName;
|
||||
}
|
||||
|
||||
public void setMemberName(String memberName) {
|
||||
this.memberName = memberName;
|
||||
}
|
||||
|
||||
public String getMemberGender() {
|
||||
return memberGender;
|
||||
}
|
||||
|
||||
public void setMemberGender(String memberGender) {
|
||||
this.memberGender = memberGender;
|
||||
}
|
||||
|
||||
public Integer getMemberAge() {
|
||||
return memberAge;
|
||||
}
|
||||
|
||||
public void setMemberAge(Integer memberAge) {
|
||||
this.memberAge = memberAge;
|
||||
}
|
||||
|
||||
public Integer getMemberHeight() {
|
||||
return memberHeight;
|
||||
}
|
||||
|
||||
public void setMemberHeight(Integer memberHeight) {
|
||||
this.memberHeight = memberHeight;
|
||||
}
|
||||
|
||||
public Integer getMemberWeight() {
|
||||
return memberWeight;
|
||||
}
|
||||
|
||||
public void setMemberWeight(Integer memberWeight) {
|
||||
this.memberWeight = memberWeight;
|
||||
}
|
||||
|
||||
public Long getMemberPhone() {
|
||||
return memberPhone;
|
||||
}
|
||||
|
||||
public void setMemberPhone(Long memberPhone) {
|
||||
this.memberPhone = memberPhone;
|
||||
}
|
||||
//
|
||||
// public String getCardTime() {
|
||||
// return cardTime;
|
||||
// }
|
||||
//
|
||||
// public void setCardTime(String cardTime) {
|
||||
// this.cardTime = cardTime;
|
||||
// }
|
||||
//
|
||||
// public Integer getCardClass() {
|
||||
// return cardClass;
|
||||
// }
|
||||
//
|
||||
// public void setCardClass(Integer cardClass) {
|
||||
// this.cardClass = cardClass;
|
||||
// }
|
||||
//
|
||||
// public Integer getCardNextClass() {
|
||||
// return cardNextClass;
|
||||
// }
|
||||
//
|
||||
// public void setCardNextClass(Integer cardNextClass) {
|
||||
// this.cardNextClass = cardNextClass;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Member{" +
|
||||
", memberAccount=" + memberAccount +
|
||||
", memberPassword='" + memberPassword + '\'' +
|
||||
", memberName='" + memberName + '\'' +
|
||||
", memberGender='" + memberGender + '\'' +
|
||||
", memberAge=" + memberAge +
|
||||
", memberHeight=" + memberHeight +
|
||||
", memberWeight=" + memberWeight +
|
||||
", memberPhone=" + memberPhone +
|
||||
// ", cardTime='" + cardTime + '\'' +
|
||||
// ", cardClass=" + cardClass +
|
||||
// ", cardNextClass=" + cardNextClass +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.milotnt.pojo;
|
||||
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
public class RealRecord {
|
||||
private Integer ruser;
|
||||
private String rpName;
|
||||
private String repName;
|
||||
private String rrLocation;
|
||||
private String rTime;
|
||||
private String rDate;
|
||||
|
||||
public RealRecord() {}
|
||||
public RealRecord(Integer ruser,String rpName,String repName, String rrLocation, String rTime, String rDate) {
|
||||
this.ruser = ruser;
|
||||
this.rpName = rpName;
|
||||
this.repName = repName;
|
||||
this.rrLocation = rrLocation;
|
||||
this.rTime = rTime;
|
||||
this.rDate = rDate;
|
||||
}
|
||||
|
||||
public Integer getRuser() { return ruser; }
|
||||
|
||||
public void setRuser(Integer ruser) { this.ruser = ruser; }
|
||||
|
||||
public String getRpName() {return rpName;}
|
||||
|
||||
public void setTpName(String rpName) {
|
||||
this.rpName = rpName;
|
||||
}
|
||||
|
||||
public String getRepName() {return repName;}
|
||||
|
||||
public void setRepName(String repName){
|
||||
this.repName = repName;
|
||||
}
|
||||
|
||||
public String getRrLocation(){return rrLocation;}
|
||||
|
||||
public void setRrLocation(String rrLocation){
|
||||
this.rrLocation = rrLocation;
|
||||
}
|
||||
|
||||
public String getRTime(){return rTime;}
|
||||
|
||||
public void setRTime(String rTime){
|
||||
this.rTime = rTime;
|
||||
}
|
||||
|
||||
public String getRDate(){return rDate;}
|
||||
|
||||
public void settDate(String rDate){
|
||||
this.rDate = rDate;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RealRecord{" +
|
||||
"rpName=" + rpName +
|
||||
", repName=" + repName +
|
||||
", rrLocation='" + rrLocation + '\'' +
|
||||
", rTime='" + rTime + '\'' +
|
||||
", rDate='" + rDate + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.milotnt.pojo;
|
||||
|
||||
import org.springframework.data.relational.core.sql.In;
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
public class RecordTable {
|
||||
private String date;
|
||||
private Integer ruser;
|
||||
private Integer recordId;
|
||||
private String recordName;
|
||||
private String recordBegin;
|
||||
private String Location;
|
||||
|
||||
public RecordTable(){}
|
||||
public RecordTable(String date,Integer ruser,Integer recordId, String recordName, String recordBegin, String location) {
|
||||
this.ruser = ruser;
|
||||
this.date = date;
|
||||
this.recordId =recordId;
|
||||
this.recordName = recordName;
|
||||
this.recordBegin = recordBegin;
|
||||
this.Location = location;
|
||||
}
|
||||
|
||||
public String getDate() {return date;}
|
||||
|
||||
public void setDate(String date) { this.date = date; }
|
||||
|
||||
public Integer getRuser() {return ruser;}
|
||||
|
||||
public void setRuser(Integer ruser) {this.ruser = ruser;}
|
||||
|
||||
public Integer getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(Integer recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getRecordName() {
|
||||
return recordName;
|
||||
}
|
||||
|
||||
public void setRecordName(String recordName) {
|
||||
this.recordName = recordName;
|
||||
}
|
||||
|
||||
public String getRecordBegin() {
|
||||
return recordBegin;
|
||||
}
|
||||
|
||||
public void setRecordBegin(String recordBegin) {
|
||||
this.recordBegin = recordBegin;
|
||||
}
|
||||
|
||||
public String getLocation() {return Location;}
|
||||
|
||||
public void setLocation(String Location) {this.Location = Location;}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RecordTable{" +
|
||||
"date=" + date +
|
||||
", ruser=" + ruser +
|
||||
" recordId=" + recordId +
|
||||
", recordName='" + recordName + '\'' +
|
||||
", recordBegin='" + recordBegin + '\'' +
|
||||
", Location='" + Location + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.milotnt.pojo;
|
||||
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
public class TargetRecord {
|
||||
private Integer tuser ;
|
||||
private String tpName;
|
||||
private String tepName;
|
||||
private String trLocation;
|
||||
private String tTime;
|
||||
private String tDate;
|
||||
|
||||
public TargetRecord() {}
|
||||
public TargetRecord(Integer tuser,String tpName,String tepName, String trLocation, String tTime, String tDate) {
|
||||
this.tuser = tuser;
|
||||
this.tpName = tpName;
|
||||
this.tepName =tepName;
|
||||
this.trLocation = trLocation;
|
||||
this.tTime = tTime;
|
||||
this.tDate = tDate;
|
||||
}
|
||||
|
||||
public Integer getTuser() {
|
||||
return tuser;
|
||||
}
|
||||
|
||||
public void setTuser(Integer tuser) {
|
||||
this.tuser = tuser;
|
||||
}
|
||||
|
||||
public String getTpName() {return tpName;}
|
||||
|
||||
public void setTpName(String tpName) {
|
||||
this.tpName = tpName;
|
||||
}
|
||||
|
||||
public String getTepName() {return tepName;}
|
||||
|
||||
public void setTepName(String tepName){
|
||||
this.tepName = tepName;
|
||||
}
|
||||
|
||||
public String getTrLocation(){return trLocation;}
|
||||
|
||||
public void setTrLocation(String trLocation){
|
||||
this.trLocation = trLocation;
|
||||
}
|
||||
|
||||
public String getTTime(){return tTime;}
|
||||
|
||||
public void settTime(String tTime){
|
||||
this.tTime = tTime;
|
||||
}
|
||||
|
||||
public String getTDate(){return tDate;}
|
||||
|
||||
public void settDate(String tDate){
|
||||
this.tDate = tDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TargetRecord{" +
|
||||
"tuser=" + tuser +
|
||||
"tpName=" + tpName +
|
||||
", tepName=" + tepName +
|
||||
", trLocation='" + trLocation + '\'' +
|
||||
", tTime='" + tTime + '\'' +
|
||||
", tDate='" + tDate + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.milotnt.service;
|
||||
|
||||
import com.milotnt.pojo.Admin;
|
||||
|
||||
public interface AdminService {
|
||||
|
||||
//管理员登录
|
||||
Admin adminLogin(Admin admin);
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.milotnt.service;
|
||||
|
||||
import com.milotnt.pojo.ClassTable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ClassTableService {
|
||||
|
||||
//查询所有课程
|
||||
List<ClassTable> findAll();
|
||||
|
||||
//根据id删除课程
|
||||
Boolean deleteClassByClassId(Integer classId);
|
||||
|
||||
//添加课程
|
||||
Boolean insertClass(ClassTable classTable);
|
||||
|
||||
//根据id查询课表
|
||||
ClassTable selectByClassId(Integer classId);
|
||||
|
||||
//根据id删除已预约的课程
|
||||
Boolean deleteOrderByClassId(Integer classId);
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.milotnt.service;
|
||||
|
||||
import com.milotnt.pojo.Equipment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EquipmentService {
|
||||
|
||||
//查询所有器械
|
||||
List<Equipment> findAll();
|
||||
|
||||
//根据id删除器械
|
||||
Boolean deleteByEquipmentId(Integer equipmentId);
|
||||
|
||||
//添加器材
|
||||
Boolean insertEquipment(Equipment equipment);
|
||||
|
||||
//根据id修改器械信息
|
||||
Boolean updateEquipmentByEquipmentId(Equipment equipment);
|
||||
|
||||
//根据id查询器械
|
||||
List<Equipment> selectByEquipmentId(Integer equipmentId);
|
||||
|
||||
//查询器械总数
|
||||
Integer selectTotalCount();
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.milotnt.service;
|
||||
|
||||
import com.milotnt.pojo.RecordTable;
|
||||
import com.milotnt.pojo.TargetRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
|
||||
public interface TargetRecordService {
|
||||
|
||||
//查询所有课程
|
||||
List<TargetRecord> findAll();
|
||||
|
||||
List<TargetRecord> selectTargetRecord(String tDate);
|
||||
|
||||
//根据id删除课程
|
||||
Boolean deleteTargetRecord(String tDate);
|
||||
|
||||
Boolean insertTargetRecord(TargetRecord targetRecord);
|
||||
|
||||
List<TargetRecord> findLatestTargetRecord(Integer ruser);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.milotnt.service.impl;
|
||||
|
||||
import com.milotnt.mapper.AdminMapper;
|
||||
import com.milotnt.pojo.Admin;
|
||||
import com.milotnt.service.AdminService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AdminServiceImpl implements AdminService {
|
||||
|
||||
@Autowired
|
||||
private AdminMapper adminMapper;
|
||||
|
||||
@Override
|
||||
public Admin adminLogin(Admin admin) {
|
||||
return adminMapper.selectByAccountAndPassword(admin);
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.milotnt.service.impl;
|
||||
|
||||
import com.milotnt.mapper.ClassTableMapper;
|
||||
import com.milotnt.pojo.ClassTable;
|
||||
import com.milotnt.service.ClassTableService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ClassTableServiceImpl implements ClassTableService {
|
||||
|
||||
@Autowired
|
||||
private ClassTableMapper classTableMapper;
|
||||
|
||||
@Override
|
||||
public List<ClassTable> findAll() {
|
||||
return classTableMapper.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteClassByClassId(Integer classId) {
|
||||
return classTableMapper.deleteClassByClassId(classId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertClass(ClassTable classTable) {
|
||||
return classTableMapper.insertClass(classTable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassTable selectByClassId(Integer classId) {
|
||||
return classTableMapper.selectByClassId(classId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteOrderByClassId(Integer classId) {
|
||||
return classTableMapper.deleteOrderByClassId(classId);
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.milotnt.service.impl;
|
||||
|
||||
import com.milotnt.mapper.EquipmentMapper;
|
||||
import com.milotnt.pojo.Equipment;
|
||||
import com.milotnt.service.EquipmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class EquipmentServiceImpl implements EquipmentService {
|
||||
|
||||
@Autowired
|
||||
private EquipmentMapper equipmentMapper;
|
||||
|
||||
@Override
|
||||
public List<Equipment> findAll() {
|
||||
return equipmentMapper.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteByEquipmentId(Integer equipmentId) {
|
||||
return equipmentMapper.deleteByEquipmentId(equipmentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertEquipment(Equipment equipment) {
|
||||
return equipmentMapper.insertEquipment(equipment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateEquipmentByEquipmentId(Equipment equipment) {
|
||||
return equipmentMapper.updateEquipmentByEquipmentId(equipment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Equipment> selectByEquipmentId(Integer equipmentId) {
|
||||
return equipmentMapper.selectByEquipmentId(equipmentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectTotalCount() {
|
||||
return equipmentMapper.selectTotalCount();
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.milotnt.service.impl;
|
||||
|
||||
import com.milotnt.mapper.MemberMapper;
|
||||
import com.milotnt.pojo.Member;
|
||||
import com.milotnt.service.MemberService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class MemberServiceImpl implements MemberService {
|
||||
|
||||
@Autowired
|
||||
private MemberMapper memberMapper;
|
||||
|
||||
@Override
|
||||
public List<Member> findAll() {
|
||||
return memberMapper.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertMember(Member member) {
|
||||
return memberMapper.insertMember(member);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateMemberByMemberAccount(Member member) {
|
||||
return memberMapper.updateMemberByMemberAccount(member);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Member userLogin(Member member) {
|
||||
return memberMapper.selectByAccountAndPassword(member);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Member selectByPhoneAndPassword(Member member) {return memberMapper.selectByPhoneAndPassword(member);}
|
||||
|
||||
@Override
|
||||
public Boolean deleteByMemberAccount(Integer memberAccount) {
|
||||
return memberMapper.deleteByMemberAccount(memberAccount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectTotalCount() {
|
||||
return memberMapper.selectTotalCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Member> selectByMemberAccount(Integer memberAccount) {
|
||||
return memberMapper.selectByMemberAccount(memberAccount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Member> selectByMemberPhone(Integer memberPhone) {
|
||||
return memberMapper.selectByMemberPhone(memberPhone);
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.milotnt.service.impl;
|
||||
import com.milotnt.mapper.RealRecordMapper;
|
||||
import com.milotnt.pojo.RealRecord;
|
||||
import com.milotnt.pojo.TargetRecord;
|
||||
import com.milotnt.service.RealRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class RealRecordServiceImpl implements RealRecordService {
|
||||
|
||||
@Autowired
|
||||
private RealRecordMapper realRecordMapper;
|
||||
|
||||
@Override
|
||||
public List<RealRecord> findAll(Integer ruser) {
|
||||
return realRecordMapper.findAll(ruser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RealRecord> selectRealRecord(String rDate) {
|
||||
return realRecordMapper.selectRealRecord(rDate);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean deleteRealRecord(String rDate) {
|
||||
return realRecordMapper.deleteRealRecord(rDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertRealRecord(RealRecord realRecord) {
|
||||
return realRecordMapper.insertRealRecord(realRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RealRecord> findLatestRealRecord(Integer ruser) {
|
||||
return realRecordMapper.findLatestRealRecord(ruser);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.milotnt.service.impl;
|
||||
|
||||
import com.milotnt.mapper.RecordTableMapper;
|
||||
import com.milotnt.pojo.RecordTable;
|
||||
import com.milotnt.service.RecordTableService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
@Service
|
||||
public class RecordTableServiceImpl implements RecordTableService {
|
||||
|
||||
@Autowired
|
||||
private RecordTableMapper recordTableMapper;
|
||||
|
||||
@Override
|
||||
public List<RecordTable> findAll(Integer ruser) {
|
||||
return recordTableMapper.findAll(ruser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RecordTable> selectRecord(Integer recordId) {
|
||||
return recordTableMapper.selectRecord(recordId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean deleteRecord(Integer recordId, Integer ruser) {
|
||||
return recordTableMapper.deleteRecord(recordId,ruser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertRecord(RecordTable recordTable) {
|
||||
return recordTableMapper.insertRecord(recordTable);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.milotnt.service.impl;
|
||||
|
||||
import com.milotnt.mapper.TargetRecordMapper;
|
||||
import com.milotnt.pojo.RecordTable;
|
||||
import com.milotnt.pojo.TargetRecord;
|
||||
import com.milotnt.service.TargetRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lhl
|
||||
* @date 24/11
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class TargetRecordServiceImpl implements TargetRecordService {
|
||||
|
||||
@Autowired
|
||||
private TargetRecordMapper targetRecordMapper;
|
||||
|
||||
@Override
|
||||
public List<TargetRecord> findAll() {
|
||||
return targetRecordMapper.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TargetRecord> selectTargetRecord(String tDate) {
|
||||
return targetRecordMapper.selectTargetRecord(tDate);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean deleteTargetRecord(String tDate) {
|
||||
return targetRecordMapper.deleteTargetRecord(tDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertTargetRecord(TargetRecord targetRecord) {
|
||||
return targetRecordMapper.insertTargetRecord(targetRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TargetRecord> findLatestTargetRecord(Integer ruser) {
|
||||
return targetRecordMapper.findLatestTargetRecord(ruser);
|
||||
}
|
||||
|
||||
}
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 423 KiB After Width: | Height: | Size: 423 KiB |