1.7.198日考

master
ruyaxie 2024-07-19 09:27:10 +08:00
commit 126a204a54
8 changed files with 212 additions and 0 deletions

38
.gitignore vendored 100644
View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
.idea/.gitignore vendored 100644
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

14
.idea/misc.xml 100644
View File

@ -0,0 +1,14 @@
<?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_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

6
.idea/vcs.xml 100644
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

17
pom.xml 100644
View File

@ -0,0 +1,17 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.muyu</groupId>
<artifactId>h6-exam719</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -0,0 +1,13 @@
package com.muyu;
/**
* @version 1.0
* @Author xie ya ru
* @Date 2024/7/19 9:18
* @
*/
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}

View File

@ -0,0 +1,109 @@
/*
Navicat Premium Data Transfer
Source Server : 2112B
Source Server Type : MySQL
Source Server Version : 50557
Source Host : localhost:3306
Source Schema : h6-exam719
Target Server Type : MySQL
Target Server Version : 50557
File Encoding : 65001
Date: 19/07/2024 09:18:11
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for stu_cou
-- ----------------------------
DROP TABLE IF EXISTS `stu_cou`;
CREATE TABLE `stu_cou` (
`sc_id` int(11) NOT NULL AUTO_INCREMENT,
`c_id` int(11) NOT NULL,
`s_id` int(11) NOT NULL,
PRIMARY KEY (`sc_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of stu_cou
-- ----------------------------
INSERT INTO `stu_cou` VALUES (1, 1, 1);
INSERT INTO `stu_cou` VALUES (2, 1, 5);
INSERT INTO `stu_cou` VALUES (3, 1, 6);
INSERT INTO `stu_cou` VALUES (4, 1, 3);
INSERT INTO `stu_cou` VALUES (5, 2, 2);
INSERT INTO `stu_cou` VALUES (6, 2, 5);
INSERT INTO `stu_cou` VALUES (7, 2, 4);
INSERT INTO `stu_cou` VALUES (8, 2, 9);
INSERT INTO `stu_cou` VALUES (9, 3, 11);
INSERT INTO `stu_cou` VALUES (10, 3, 5);
INSERT INTO `stu_cou` VALUES (11, 3, 6);
INSERT INTO `stu_cou` VALUES (12, 4, 7);
INSERT INTO `stu_cou` VALUES (13, 4, 8);
INSERT INTO `stu_cou` VALUES (14, 4, 3);
INSERT INTO `stu_cou` VALUES (15, 4, 2);
-- ----------------------------
-- Table structure for t_course
-- ----------------------------
DROP TABLE IF EXISTS `t_course`;
CREATE TABLE `t_course` (
`c_id` int(11) NOT NULL AUTO_INCREMENT,
`c_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`c_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of t_course
-- ----------------------------
INSERT INTO `t_course` VALUES (1, '语文');
INSERT INTO `t_course` VALUES (2, '英语');
INSERT INTO `t_course` VALUES (3, '数学');
INSERT INTO `t_course` VALUES (4, '化学');
-- ----------------------------
-- Table structure for t_student
-- ----------------------------
DROP TABLE IF EXISTS `t_student`;
CREATE TABLE `t_student` (
`s_id` int(11) NOT NULL AUTO_INCREMENT,
`s_name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`sex` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`s_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of t_student
-- ----------------------------
INSERT INTO `t_student` VALUES (1, '张三', '');
INSERT INTO `t_student` VALUES (2, '李四', '');
INSERT INTO `t_student` VALUES (3, '王艳', '');
INSERT INTO `t_student` VALUES (4, '王岩', '');
INSERT INTO `t_student` VALUES (5, '王麻子', '');
INSERT INTO `t_student` VALUES (6, '刘柳', '');
INSERT INTO `t_student` VALUES (7, '孙红', '');
INSERT INTO `t_student` VALUES (8, '孙宏', '');
INSERT INTO `t_student` VALUES (9, '柳梧', '');
INSERT INTO `t_student` VALUES (10, '李二', '');
INSERT INTO `t_student` VALUES (11, '赵六', '');
-- ----------------------------
-- Function structure for expect
-- ----------------------------
DROP FUNCTION IF EXISTS `expect`;
delimiter ;;
CREATE FUNCTION `expect`(`SELECT COUNT(ts.sex) FROM t_student ts WHERE ts.sex =\'男\' GROUP BY ts.sex;` int,`SELECT count(ts.s_name) FROM t_student ts;` int)
RETURNS int(11)
BEGIN
#Routine body goes here...
RETURN 0;
END
;;
delimiter ;
SET FOREIGN_KEY_CHECKS = 1;