@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/../../../../:\IdeaProjects\StudentScore\.idea/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
@ -0,0 +1,13 @@
|
||||
<?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="StudentScore" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,7 @@
|
||||
<?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>
|
@ -0,0 +1,25 @@
|
||||
<?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://maven.aliyun.com/repository/public" />
|
||||
</remote-repository>
|
||||
<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="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>
|
@ -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_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/classes" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/target/classes/public/assets/admin" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Spring-5.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.5.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.24" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.24" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.24" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.24" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.5.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.3.4.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.0.29" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="Maven: com.alibaba:jconsole:1.8.0">
|
||||
<CLASSES>
|
||||
<root url="jar://C:/jdk1.8_64x_v1/jdk1.8/lib/jconsole.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Maven: com.alibaba:tools:1.8.0">
|
||||
<CLASSES>
|
||||
<root url="jar://C:/jdk1.8_64x_v1/jdk1.8/lib/tools.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.11.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,64 @@
|
||||
<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.score.study</groupId>
|
||||
<artifactId>StudentScore</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>StudentScore</name>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.5.2.RELEASE</version>
|
||||
</parent>
|
||||
<!-- 添加相关依赖 -->
|
||||
<dependencies>
|
||||
<!-- 添加web支持的starter -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!-- spingBoot整合Mybatis -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<!-- 数据源 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.0.29</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</dependency>
|
||||
<!-- mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.26</version>
|
||||
</dependency>
|
||||
<!-- 好用的分页插件 -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper</artifactId>
|
||||
<version>5.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis-spring</artifactId>
|
||||
<version>1.3.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- 添加编译和打包的相关插件 -->
|
||||
<build>
|
||||
<!-- 添加Spring boot编译插件 -->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,36 @@
|
||||
package com.score.bean;
|
||||
|
||||
public class ResultObject<T> {
|
||||
private String code;
|
||||
private String msg;
|
||||
private T data;
|
||||
private Long count;
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
public Long getCount() {
|
||||
return count;
|
||||
}
|
||||
public void setCount(Long count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,170 @@
|
||||
package com.score.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class TScore implements Serializable {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column t_score.score_id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer scoreId;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column t_score.score_value
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer scoreValue;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column t_score.score_type
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String scoreType;
|
||||
|
||||
private String scoreTypeName;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column t_score.student_id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer studentId;
|
||||
|
||||
private String studentName;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table t_score
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column t_score.score_id
|
||||
*
|
||||
* @return the value of t_score.score_id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Integer getScoreId() {
|
||||
return scoreId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column t_score.score_id
|
||||
*
|
||||
* @param scoreId the value for t_score.score_id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setScoreId(Integer scoreId) {
|
||||
this.scoreId = scoreId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column t_score.score_value
|
||||
*
|
||||
* @return the value of t_score.score_value
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Integer getScoreValue() {
|
||||
return scoreValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column t_score.score_value
|
||||
*
|
||||
* @param scoreValue the value for t_score.score_value
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setScoreValue(Integer scoreValue) {
|
||||
this.scoreValue = scoreValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column t_score.score_type
|
||||
*
|
||||
* @return the value of t_score.score_type
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public String getScoreType() {
|
||||
return scoreType;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column t_score.score_type
|
||||
*
|
||||
* @param scoreType the value for t_score.score_type
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setScoreType(String scoreType) {
|
||||
this.scoreType = scoreType == null ? null : scoreType.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column t_score.student_id
|
||||
*
|
||||
* @return the value of t_score.student_id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Integer getStudentId() {
|
||||
return studentId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column t_score.student_id
|
||||
*
|
||||
* @param studentId the value for t_score.student_id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setStudentId(Integer studentId) {
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public String getStudentName() {
|
||||
return studentName;
|
||||
}
|
||||
|
||||
public void setStudentName(String studentName) {
|
||||
this.studentName = studentName;
|
||||
}
|
||||
|
||||
public String getScoreTypeName() {
|
||||
return scoreTypeName;
|
||||
}
|
||||
|
||||
public void setScoreTypeName(String scoreTypeName) {
|
||||
this.scoreTypeName = scoreTypeName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_score
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
|
||||
}
|
@ -0,0 +1,195 @@
|
||||
package com.score.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class TStudent implements Serializable {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column t_student.student_no
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Integer studentNo;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column t_student.student_name
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column t_student.student_sex
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String studentSex;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column t_student.del_status
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String stuPass;
|
||||
|
||||
private double score1;
|
||||
|
||||
private double score2;
|
||||
|
||||
private double score3;
|
||||
|
||||
private double sumScore;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table t_student
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column t_student.student_no
|
||||
*
|
||||
* @return the value of t_student.student_no
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Integer getStudentNo() {
|
||||
return studentNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column t_student.student_no
|
||||
*
|
||||
* @param studentNo the value for t_student.student_no
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setStudentNo(Integer studentNo) {
|
||||
this.studentNo = studentNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column t_student.student_name
|
||||
*
|
||||
* @return the value of t_student.student_name
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public String getStudentName() {
|
||||
return studentName;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column t_student.student_name
|
||||
*
|
||||
* @param studentName the value for t_student.student_name
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setStudentName(String studentName) {
|
||||
this.studentName = studentName == null ? null : studentName.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column t_student.student_sex
|
||||
*
|
||||
* @return the value of t_student.student_sex
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public String getStudentSex() {
|
||||
return studentSex;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column t_student.student_sex
|
||||
*
|
||||
* @param studentSex the value for t_student.student_sex
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setStudentSex(String studentSex) {
|
||||
this.studentSex = studentSex == null ? null : studentSex.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column t_student.del_status
|
||||
*
|
||||
* @return the value of t_student.del_status
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
|
||||
|
||||
public double getScore1() {
|
||||
return score1;
|
||||
}
|
||||
|
||||
public String getStuPass() {
|
||||
return stuPass;
|
||||
}
|
||||
|
||||
public void setStuPass(String stuPass) {
|
||||
this.stuPass = stuPass;
|
||||
}
|
||||
|
||||
public void setScore1(double score1) {
|
||||
this.score1 = score1;
|
||||
}
|
||||
|
||||
public double getScore2() {
|
||||
return score2;
|
||||
}
|
||||
|
||||
public void setScore2(double score2) {
|
||||
this.score2 = score2;
|
||||
}
|
||||
|
||||
public double getScore3() {
|
||||
return score3;
|
||||
}
|
||||
|
||||
public void setScore3(double score3) {
|
||||
this.score3 = score3;
|
||||
}
|
||||
|
||||
public double getSumScore() {
|
||||
return sumScore;
|
||||
}
|
||||
|
||||
public void setSumScore(double sumScore) {
|
||||
this.sumScore = sumScore;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_student
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TStudent{" +
|
||||
"studentNo=" + studentNo +
|
||||
", studentName='" + studentName + '\'' +
|
||||
", studentSex='" + studentSex + '\'' +
|
||||
", stuPass='" + stuPass + '\'' +
|
||||
", score1=" + score1 +
|
||||
", score2=" + score2 +
|
||||
", score3=" + score3 +
|
||||
", sumScore=" + sumScore +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.score.bean;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class User {
|
||||
/*用户名称*/
|
||||
private int userId;
|
||||
/*用户登录名称*/
|
||||
private String userName;
|
||||
/* 用户登录密码 */
|
||||
private String password;
|
||||
|
||||
private String type;
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,145 @@
|
||||
package com.score.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.score.bean.ResultObject;
|
||||
import com.score.bean.TScore;
|
||||
import com.score.bean.TStudent;
|
||||
import com.score.service.IScoreService;
|
||||
import com.score.util.Constant;
|
||||
|
||||
@RequestMapping("/score")
|
||||
@RestController //标识为返回类型为Json的控制
|
||||
public class ScoreController {
|
||||
/**
|
||||
* 注入成绩
|
||||
*/
|
||||
@Autowired
|
||||
private IScoreService scoreService;
|
||||
|
||||
//标识请求地址
|
||||
@RequestMapping("/addScore")
|
||||
public ResultObject<Object> addScore(TScore score) {
|
||||
ResultObject<Object> rs=scoreService.insertScore(score);
|
||||
return rs;
|
||||
}
|
||||
|
||||
//标识请求地址
|
||||
@RequestMapping("/getAllScore")
|
||||
public ResultObject<List<TScore>> getAllScore(TScore score,@RequestParam("limit") int limit,@RequestParam("page") int page) {
|
||||
PageInfo<TScore> pageInfo=scoreService.getAllScore(score,limit, page);
|
||||
ResultObject<List<TScore>> rs=new ResultObject<List<TScore>>();
|
||||
List<TScore> list=pageInfo.getList();
|
||||
for(TScore temp:list) {
|
||||
String type=temp.getScoreType();
|
||||
if("1".equals(type)) {
|
||||
temp.setScoreTypeName("习题");
|
||||
}
|
||||
if("2".equals(type)) {
|
||||
temp.setScoreTypeName("测验");
|
||||
}
|
||||
if("3".equals(type)) {
|
||||
temp.setScoreTypeName("考试成绩");
|
||||
}
|
||||
}
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("查询成功");
|
||||
rs.setData(list);
|
||||
rs.setCount(pageInfo.getTotal());
|
||||
return rs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//标识请求地址
|
||||
@RequestMapping("/updateScore")
|
||||
public ResultObject<Object> updateScore(TScore score) {
|
||||
Integer total=scoreService.updateScore(score);
|
||||
//统一返回
|
||||
ResultObject<Object> rs=new ResultObject<Object>();
|
||||
if(null==total||0==total) {
|
||||
rs.setCode(Constant.FAILURE_RETUEN_CODE);
|
||||
rs.setMsg("修改学生成绩信息失败");
|
||||
}else {
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("修改学生成绩信息成功");
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
//标识请求地址
|
||||
@RequestMapping("/deleteScore")
|
||||
public ResultObject<Object> deleteScore(TScore score) {
|
||||
Integer total=scoreService.deleteScore(score.getScoreId());
|
||||
//统一返回
|
||||
ResultObject<Object> rs=new ResultObject<Object>();
|
||||
if(null==total||0==total) {
|
||||
rs.setCode(Constant.FAILURE_RETUEN_CODE);
|
||||
rs.setMsg("删除学生成绩信息失败");
|
||||
}else {
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("删除学生成绩信息成功");
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
@RequestMapping("/getAllSumScore")
|
||||
public ResultObject<List<TStudent>> getAllSumScore(TStudent student,@RequestParam("limit") int limit,@RequestParam("page") int page) {
|
||||
PageInfo<TStudent> pageInfo =scoreService.getAllFinalScore(student, limit, page);
|
||||
ResultObject<List<TStudent>> rs=new ResultObject<List<TStudent>>();
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("查询成功");
|
||||
rs.setData(pageInfo.getList());
|
||||
rs.setCount(pageInfo.getTotal());
|
||||
return rs;
|
||||
|
||||
}
|
||||
//获取我的成绩
|
||||
@RequestMapping("/getMyScore")
|
||||
public ResultObject<List<TStudent>> getAllSumScore(HttpServletRequest request,@RequestParam("limit") int limit,@RequestParam("page") int page) {
|
||||
TStudent student = (TStudent)request.getSession().getAttribute("student");
|
||||
PageInfo<TStudent> pageInfo =scoreService.getAllFinalScore(student, limit, page);
|
||||
ResultObject<List<TStudent>> rs=new ResultObject<List<TStudent>>();
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("查询成功");
|
||||
rs.setData(pageInfo.getList());
|
||||
rs.setCount(pageInfo.getTotal());
|
||||
return rs;
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping("/getMyScoreInfo")
|
||||
public ResultObject<List<TScore>> getMyScoreInfo(HttpServletRequest request,@RequestParam("limit") int limit,@RequestParam("page") int page) {
|
||||
TStudent student = (TStudent)request.getSession().getAttribute("student");
|
||||
TScore score=new TScore();
|
||||
score.setStudentId(student.getStudentNo());
|
||||
PageInfo<TScore> pageInfo=scoreService.getAllScore(score,limit, page);
|
||||
ResultObject<List<TScore>> rs=new ResultObject<List<TScore>>();
|
||||
List<TScore> list=pageInfo.getList();
|
||||
for(TScore temp:list) {
|
||||
String type=temp.getScoreType();
|
||||
if("1".equals(type)) {
|
||||
temp.setScoreTypeName("习题");
|
||||
}
|
||||
if("2".equals(type)) {
|
||||
temp.setScoreTypeName("测验");
|
||||
}
|
||||
if("3".equals(type)) {
|
||||
temp.setScoreTypeName("考试成绩");
|
||||
}
|
||||
}
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("查询成功");
|
||||
rs.setData(list);
|
||||
rs.setCount(pageInfo.getTotal());
|
||||
return rs;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.score.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.score.bean.ResultObject;
|
||||
import com.score.bean.TStudent;
|
||||
import com.score.service.TStudentService;
|
||||
import com.score.util.Constant;
|
||||
|
||||
/**
|
||||
* @author hmg
|
||||
*
|
||||
*/
|
||||
@RequestMapping("/student")
|
||||
@RestController //标识为返回类型为Json的控制
|
||||
public class StudentController {
|
||||
@Autowired
|
||||
private TStudentService studentService;
|
||||
//标识请求地址
|
||||
@RequestMapping("/getAllStudent")
|
||||
public ResultObject<List<TStudent>> getUsers(TStudent student,@RequestParam("limit") int limit,@RequestParam("page") int page) {
|
||||
System.out.println(limit);
|
||||
|
||||
PageInfo<TStudent> pageInfo=studentService.getAll(student, page, limit);
|
||||
System.out.println(pageInfo.getPageNum());
|
||||
System.out.println(pageInfo.getPageSize()+"-------------1");
|
||||
ResultObject<List<TStudent>> rs=new ResultObject<List<TStudent>>();
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("查询成功");
|
||||
rs.setData(pageInfo.getList());
|
||||
rs.setCount(pageInfo.getTotal());
|
||||
return rs;
|
||||
}
|
||||
//标识请求地址
|
||||
@RequestMapping("/addStudent")
|
||||
public ResultObject<Object> addStudent(TStudent student) {
|
||||
|
||||
Integer studentNo=student.getStudentNo();
|
||||
student.setStuPass(studentNo.toString());
|
||||
TStudent result=studentService.selectByNo(studentNo);
|
||||
//统一返回
|
||||
ResultObject<Object> rs=new ResultObject<Object>();
|
||||
if(null==result) {
|
||||
studentService.addStudent(student);
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("增加学生信息成功");
|
||||
}else {
|
||||
rs.setCode(Constant.HASE_RETUEN_CODE);
|
||||
rs.setMsg("学号已存在");
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
//标识请求地址
|
||||
@RequestMapping("/updateStudent")
|
||||
public ResultObject<Object> updateStudent(TStudent student) {
|
||||
Integer total=studentService.updateStudent(student);
|
||||
//统一返回
|
||||
ResultObject<Object> rs=new ResultObject<Object>();
|
||||
if(null==total||0==total) {
|
||||
rs.setCode(Constant.FAILURE_RETUEN_CODE);
|
||||
rs.setMsg("修改学生信息失败");
|
||||
}else {
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("修改学生信息成功");
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
//标识请求地址
|
||||
@RequestMapping("/deleteStudent")
|
||||
public ResultObject<Object> deleteStudent(@RequestParam("studentNo") int studentNo) {
|
||||
Integer total=studentService.deleteStudent(studentNo);
|
||||
//统一返回
|
||||
ResultObject<Object> rs=new ResultObject<Object>();
|
||||
if(null==total||0==total) {
|
||||
rs.setCode(Constant.FAILURE_RETUEN_CODE);
|
||||
rs.setMsg("修改学生信息失败");
|
||||
}else {
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("修改学生信息成功");
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生下拉框
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/studentSelect")
|
||||
public ResultObject<List<TStudent>> studentSelect() {
|
||||
ResultObject<List<TStudent>> rs=new ResultObject<List<TStudent>>();
|
||||
List<TStudent> list=studentService.selectAllStudent();
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("查询成功");
|
||||
rs.setData(list);
|
||||
int total=list.size();
|
||||
Long a=Long.parseLong(String.valueOf(total));
|
||||
rs.setCount(a);
|
||||
return rs;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.score.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.score.bean.ResultObject;
|
||||
import com.score.bean.TStudent;
|
||||
import com.score.bean.User;
|
||||
import com.score.service.IUserService;
|
||||
import com.score.service.TStudentService;
|
||||
import com.score.util.Constant;
|
||||
|
||||
/**
|
||||
* @author hmg
|
||||
*
|
||||
*/
|
||||
@RequestMapping("/user")
|
||||
@RestController //标识为返回类型为Json的控制器
|
||||
public class UserController {
|
||||
|
||||
//自动注入服务类
|
||||
@Autowired
|
||||
private IUserService userService;
|
||||
|
||||
@Autowired
|
||||
private TStudentService studentService;
|
||||
|
||||
//标识请求地址
|
||||
@RequestMapping("/login")
|
||||
public ResultObject<List<User>> getUsers(User user,HttpServletRequest request) {
|
||||
//查询用户列表
|
||||
List<User> list= userService.getUser(user);
|
||||
ResultObject<List<User>> rs=new ResultObject<List<User>>();
|
||||
if(list.isEmpty()) {
|
||||
//状态码
|
||||
rs.setCode(Constant.FAILURE_RETUEN_CODE);
|
||||
//提示
|
||||
rs.setMsg("登录失败");
|
||||
}else {
|
||||
//状态码
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
request.getSession().setAttribute("user", list.get(0));
|
||||
//提示
|
||||
rs.setMsg("登录成功");
|
||||
}
|
||||
//数据
|
||||
rs.setData(list);
|
||||
return rs;
|
||||
}
|
||||
@RequestMapping("/loginOut")
|
||||
public ResultObject<Object> loginOut(HttpServletRequest request) {
|
||||
//查询用户列表
|
||||
ResultObject<Object> rs=new ResultObject<Object>();
|
||||
request.getSession().removeAttribute("user");
|
||||
//数据
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("退出成功");
|
||||
return rs;
|
||||
}
|
||||
|
||||
//标识请求地址
|
||||
@RequestMapping("/studentLogin")
|
||||
public ResultObject<List<TStudent>> studentLogin(User user,HttpServletRequest request) {
|
||||
//查询用户列表
|
||||
TStudent student=new TStudent();
|
||||
student.setStudentNo(Integer.parseInt(user.getUserName()));
|
||||
student.setStuPass(user.getPassword());
|
||||
List<TStudent> list= studentService.selectloginStudent(student);
|
||||
ResultObject<List<TStudent>> rs=new ResultObject<List<TStudent>>();
|
||||
if(list.isEmpty()) {
|
||||
//状态码
|
||||
rs.setCode(Constant.FAILURE_RETUEN_CODE);
|
||||
//提示
|
||||
rs.setMsg("登录失败");
|
||||
}else {
|
||||
//状态码
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
request.getSession().setAttribute("student", list.get(0));
|
||||
//提示
|
||||
rs.setMsg("登录成功");
|
||||
}
|
||||
//数据
|
||||
rs.setData(list);
|
||||
return rs;
|
||||
}
|
||||
@RequestMapping("/studentloginOut")
|
||||
public ResultObject<Object> studentloginOut(HttpServletRequest request) {
|
||||
//查询用户列表
|
||||
ResultObject<Object> rs=new ResultObject<Object>();
|
||||
request.getSession().removeAttribute("student");
|
||||
//数据
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("退出成功");
|
||||
return rs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.score.dao;
|
||||
|
||||
import com.score.bean.TScore;
|
||||
import java.util.List;
|
||||
|
||||
public interface TScoreMapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_score
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer scoreId);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_score
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int insert(TScore record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_score
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
TScore selectByPrimaryKey(Integer scoreId);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_score
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
List<TScore> selectAll(TScore score);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_score
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByPrimaryKey(TScore record);
|
||||
//判断类型已经添加了几次
|
||||
int countByType(TScore record);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.score.dao;
|
||||
|
||||
import com.score.bean.TStudent;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface TStudentMapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_student
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer studentNo);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_student
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int insert(TStudent record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_student
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
TStudent selectByPrimaryKey(Integer studentNo);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_student
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
List<TStudent> selectAll(TStudent record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table t_student
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByPrimaryKey(TStudent record);
|
||||
|
||||
/**
|
||||
* 查询学生总成绩
|
||||
* @param student
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectFinalScore(TStudent student);
|
||||
|
||||
/**
|
||||
* 查询学生账号信息
|
||||
* @param record
|
||||
* @return
|
||||
*/
|
||||
List<TStudent> selectloginStudent(TStudent student);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.score.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import com.score.bean.User;
|
||||
|
||||
/**
|
||||
* 用户登录数据层
|
||||
* @author hmg
|
||||
*
|
||||
*/
|
||||
@Mapper //标识为mybatis数据层接口
|
||||
public interface UserDao {
|
||||
/**
|
||||
*全量查询用户
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
List<User> getUser(User user);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.score.interceptor;
|
||||
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class FilterConfig {
|
||||
|
||||
@Bean
|
||||
public FilterRegistrationBean registFilter() {
|
||||
FilterRegistrationBean registration = new FilterRegistrationBean();
|
||||
registration.setFilter(new LoginFilter());
|
||||
registration.addUrlPatterns("/*");
|
||||
registration.setName("loginFilter");
|
||||
registration.setOrder(1);
|
||||
return registration;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.score.interceptor;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.annotation.WebFilter;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.score.util.Constant;
|
||||
|
||||
@WebFilter(filterName = "loginFilter", urlPatterns = "/*.html")
|
||||
public class LoginFilter implements Filter {
|
||||
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
|
||||
System.out.println("----------------------->过滤器被创建");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
HttpServletResponse response=(HttpServletResponse)servletResponse;
|
||||
String requestURI = request.getRequestURI();
|
||||
System.out.println("--------------------->过滤器:请求地址"+requestURI);
|
||||
if(Constant.loginUrl.equals(requestURI)||requestURI.contains(Constant.AESSET)||Constant.LOGIN_URI.equals(requestURI)||Constant.STUDENT_LOGIN_URL.equals(requestURI)) {
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
}else {
|
||||
if(Constant.STUDENT_INDEX.equals(requestURI)||Constant.MY_SCORE.equals(requestURI)||
|
||||
Constant.STUDENT_LOGINOUT_URL.equals(requestURI)||Constant.GET_MY_SCORE.equals(requestURI)||
|
||||
Constant.SCORE.equals(requestURI)||Constant.GET_MY_SCORE_COUNT.equals(requestURI)
|
||||
) {
|
||||
Object obj=request.getSession().getAttribute("student");
|
||||
if(obj==null){
|
||||
response.sendRedirect("/login.html");
|
||||
return;
|
||||
}else {
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
}
|
||||
}else {
|
||||
Object obj=request.getSession().getAttribute("user");
|
||||
if(obj==null){
|
||||
response.sendRedirect("/login.html");
|
||||
return;
|
||||
}else {
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void destroy() {
|
||||
System.out.println("----------------------->过滤器被销毁");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.score.interceptor;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
@Configuration
|
||||
public class MyWebAppConfigurer extends WebMvcConfigurerAdapter {
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
// 多个拦截器组成一个拦截器链
|
||||
// addPathPatterns 用于添加拦截规则
|
||||
// excludePathPatterns 用户排除拦截
|
||||
registry.addInterceptor(new ErrorInterceptor()).addPathPatterns("/**");
|
||||
super.addInterceptors(registry);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
package com.score.service;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.score.bean.ResultObject;
|
||||
import com.score.bean.TScore;
|
||||
import com.score.bean.TStudent;
|
||||
|
||||
public interface IScoreService {
|
||||
/**
|
||||
* 模糊查询学生成绩
|
||||
* @param score
|
||||
* @return
|
||||
*/
|
||||
public PageInfo<TScore> getAllScore(TScore score,int limit,int page);
|
||||
|
||||
/**
|
||||
* 增加学生成绩
|
||||
* @param score
|
||||
* @return
|
||||
*/
|
||||
public ResultObject<Object> insertScore(TScore score);
|
||||
|
||||
/**
|
||||
* 更改学生成绩
|
||||
* @param score
|
||||
* @return
|
||||
*/
|
||||
public Integer updateScore(TScore score);
|
||||
|
||||
/**
|
||||
* 删除学生学生成绩
|
||||
* @param score
|
||||
* @return
|
||||
*/
|
||||
public Integer deleteScore(int scoreId);
|
||||
|
||||
/**
|
||||
* 根据编号查询学生成绩
|
||||
* @param score
|
||||
* @return
|
||||
*/
|
||||
public TScore selectScoreById(int scoreId);
|
||||
|
||||
/**
|
||||
* 查询成绩报表
|
||||
* @param student
|
||||
* @param limit
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
public PageInfo<TStudent> getAllFinalScore(TStudent student, int limit, int page);
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.score.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.score.bean.User;
|
||||
|
||||
/**
|
||||
* 用户服务接口
|
||||
* @author Yang
|
||||
*
|
||||
*/
|
||||
public interface IUserService {
|
||||
/**
|
||||
*全量查询用户
|
||||
* @return
|
||||
*/
|
||||
List<User> getUser(User user);
|
||||
|
||||
/**
|
||||
* 分页查询用户
|
||||
* @param page 页码
|
||||
* @param size 数量
|
||||
* @return
|
||||
*/
|
||||
PageInfo<User> getUsersLimit(int page,int size);
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.score.service;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.score.bean.TStudent;
|
||||
|
||||
public interface TStudentService {
|
||||
/**
|
||||
*全量查询用户
|
||||
* @return
|
||||
*/
|
||||
PageInfo<TStudent> getAll(TStudent student,int pageNum,int pageSize);
|
||||
|
||||
/**
|
||||
*查询是否存在
|
||||
* @return
|
||||
*/
|
||||
TStudent selectByNo(int studentNo);
|
||||
|
||||
/**
|
||||
* 增加学生信息
|
||||
* @param student
|
||||
* @return
|
||||
*/
|
||||
Integer addStudent(TStudent student);
|
||||
|
||||
|
||||
/**
|
||||
* 修改学生信息
|
||||
* @param student
|
||||
* @return
|
||||
*/
|
||||
Integer updateStudent(TStudent student);
|
||||
|
||||
|
||||
/**
|
||||
* 删除学生信息
|
||||
* @param student
|
||||
* @return
|
||||
*/
|
||||
Integer deleteStudent(int studentNo);
|
||||
/**
|
||||
*全量查询用户为下拉框
|
||||
* @return
|
||||
*/
|
||||
List <TStudent> selectAllStudent();
|
||||
|
||||
/**
|
||||
* 查询学生账号信息
|
||||
* @param record
|
||||
* @return
|
||||
*/
|
||||
List<TStudent> selectloginStudent(TStudent student);
|
||||
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
package com.score.service.impl;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.score.bean.ResultObject;
|
||||
import com.score.bean.TScore;
|
||||
import com.score.bean.TStudent;
|
||||
import com.score.dao.TScoreMapper;
|
||||
import com.score.dao.TStudentMapper;
|
||||
import com.score.service.IScoreService;
|
||||
import com.score.util.Constant;
|
||||
|
||||
@Service
|
||||
public class SoreServiceImpl implements IScoreService {
|
||||
|
||||
@Autowired
|
||||
private TScoreMapper scoreMapper;
|
||||
|
||||
@Autowired
|
||||
private TStudentMapper studentMapper;
|
||||
|
||||
@Override
|
||||
public PageInfo<TScore> getAllScore(TScore score, int limit, int page) {
|
||||
// 首先开启PageHelper的分页
|
||||
PageHelper.startPage(page, limit);
|
||||
// 查询分页信息 调用方式与普通方式一致
|
||||
List<TScore> list = scoreMapper.selectAll(score);
|
||||
// 生成PageInfo对象
|
||||
PageInfo<TScore> pageInfo = new PageInfo<TScore>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultObject<Object> insertScore(TScore score) {
|
||||
|
||||
int count = scoreMapper.countByType(score);
|
||||
String type = score.getScoreType();
|
||||
boolean flag = true;
|
||||
String str="";
|
||||
switch (Integer.parseInt(type)) {
|
||||
case 1:
|
||||
if (count >= 16) {
|
||||
flag = false;
|
||||
str = "该学生的习题成绩已经达到16条";
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (count >= 3) {
|
||||
flag = false;
|
||||
str = "该学生的测验成绩已经达到3条";
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (count >= 1) {
|
||||
flag = false;
|
||||
str = "该学生的考试成绩已经达到1条";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
// 统一返回
|
||||
ResultObject<Object> rs = new ResultObject<Object>();
|
||||
if(flag) {
|
||||
Integer total = scoreMapper.insert(score);
|
||||
if (null == total || 0 == total) {
|
||||
rs.setCode(Constant.HASE_RETUEN_CODE);
|
||||
rs.setMsg("成绩添加失败");
|
||||
} else {
|
||||
rs.setCode(Constant.SUCCESS_RETUEN_CODE);
|
||||
rs.setMsg("成绩添加成功");
|
||||
}
|
||||
}else {
|
||||
rs.setCode(Constant.HASE_RETUEN_CODE);
|
||||
rs.setMsg(str);
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer updateScore(TScore score) {
|
||||
// TODO Auto-generated method stub
|
||||
return scoreMapper.updateByPrimaryKey(score);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer deleteScore(int scoreId) {
|
||||
// TODO Auto-generated method stub
|
||||
return scoreMapper.deleteByPrimaryKey(scoreId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TScore selectScoreById(int scoreId) {
|
||||
// TODO Auto-generated method stub
|
||||
return scoreMapper.selectByPrimaryKey(scoreId);
|
||||
}
|
||||
@Override
|
||||
public PageInfo<TStudent> getAllFinalScore(TStudent student, int limit, int page) {
|
||||
// 首先开启PageHelper的分页
|
||||
PageHelper.startPage(page, limit);
|
||||
// 查询分页信息 调用方式与普通方式一致
|
||||
List<TStudent> list = studentMapper.selectAll(student);
|
||||
|
||||
for(TStudent temp:list) {
|
||||
double sum=0;
|
||||
Map<String,Object> map=studentMapper.selectFinalScore(temp);
|
||||
DecimalFormat df = new DecimalFormat("#.00");
|
||||
double score1=Double.parseDouble(map.get("score1").toString());
|
||||
temp.setScore1(Double.parseDouble(df.format(score1)));
|
||||
double score2=Double.parseDouble(map.get("score2").toString());
|
||||
temp.setScore2(Double.parseDouble(df.format(score2)));
|
||||
double score3=Double.parseDouble(map.get("score3").toString());
|
||||
temp.setScore3(Double.parseDouble(df.format(score3)));
|
||||
sum=(score1)+(score2)+(score3);
|
||||
temp.setSumScore(Double.parseDouble(df.format(sum)));
|
||||
}
|
||||
// 生成PageInfo对象
|
||||
PageInfo<TStudent> pageInfo = new PageInfo<TStudent>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package com.score.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.score.bean.TStudent;
|
||||
import com.score.dao.TStudentMapper;
|
||||
import com.score.service.TStudentService;
|
||||
|
||||
@Service // 标识为服务类
|
||||
public class StudentServiceImpl implements TStudentService {
|
||||
@Autowired
|
||||
private TStudentMapper studentMapper;
|
||||
|
||||
@Override
|
||||
public PageInfo<TStudent> getAll(TStudent student,int pageNum,int pageSize) {
|
||||
// 首先开启PageHelper的分页
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
// 查询分页信息 调用方式与普通方式一致
|
||||
List<TStudent> list = studentMapper.selectAll(student);
|
||||
//生成PageInfo对象
|
||||
PageInfo<TStudent> pageInfo=new PageInfo<TStudent>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
/**
|
||||
*查询是否存在
|
||||
* @return
|
||||
*/
|
||||
public TStudent selectByNo(int studentNo) {
|
||||
TStudent student=studentMapper.selectByPrimaryKey(studentNo);
|
||||
return student;
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加学生信息
|
||||
* @param student
|
||||
* @return
|
||||
*/
|
||||
public Integer addStudent(TStudent student) {
|
||||
Integer total=studentMapper.insert(student);
|
||||
return total;
|
||||
}
|
||||
/**
|
||||
* 修改学生信息
|
||||
* @param student
|
||||
* @return
|
||||
*/
|
||||
public Integer updateStudent(TStudent student) {
|
||||
Integer total=studentMapper.updateByPrimaryKey(student);
|
||||
return total;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除学生信息
|
||||
* @param student
|
||||
* @return
|
||||
*/
|
||||
public Integer deleteStudent(int studentNo) {
|
||||
Integer total=studentMapper.deleteByPrimaryKey(studentNo);
|
||||
return total;
|
||||
}
|
||||
/**
|
||||
*全量查询用户为下拉框
|
||||
* @return
|
||||
*/
|
||||
public List<TStudent> selectAllStudent(){
|
||||
return studentMapper.selectAll(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生账号信息
|
||||
* @param record
|
||||
* @return
|
||||
*/
|
||||
public List<TStudent> selectloginStudent(TStudent student){
|
||||
return studentMapper.selectloginStudent(student);
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.score.service.impl;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.score.bean.User;
|
||||
import com.score.dao.UserDao;
|
||||
import com.score.service.IUserService;
|
||||
|
||||
/**
|
||||
* 服务实现
|
||||
* @author hmg
|
||||
*
|
||||
*/
|
||||
@Service //标识为服务类
|
||||
public class UserServiceImpl implements IUserService {
|
||||
//注入数据层接口
|
||||
@Autowired
|
||||
private UserDao userDao;
|
||||
|
||||
public List<User> getUser(User user) {
|
||||
return userDao.getUser(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询用户
|
||||
* @param page 页码
|
||||
* @param size 数量
|
||||
* @return
|
||||
*/
|
||||
public PageInfo<User> getUsersLimit(int page,int size){
|
||||
//首先开启PageHelper的分页
|
||||
PageHelper.startPage(page, size);
|
||||
//查询分页信息 调用方式与普通方式一致
|
||||
List<User> list=userDao.getUser(new User());
|
||||
//生成PageInfo对象
|
||||
PageInfo<User> pageInfo=new PageInfo<User>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.score.util;
|
||||
|
||||
public class Constant {
|
||||
public static String loginUrl="/login.html";
|
||||
public static String NULL_URI="/404.html";
|
||||
public static String STUDENT_INDEX="/student-index.html";
|
||||
public static String MY_SCORE="/my-score.html";
|
||||
public static String SCORE="/score.html";
|
||||
public static String ERROR_URI="/error";
|
||||
public static String AESSET="/assets/";
|
||||
public static String LOGIN_URI="/user/login";
|
||||
//学生登录请求地址
|
||||
public static String STUDENT_LOGIN_URL="/user/studentLogin";
|
||||
//学生退出请求地址
|
||||
public static String STUDENT_LOGINOUT_URL="/user/studentloginOut";
|
||||
//查询我的总成绩
|
||||
public static String GET_MY_SCORE_COUNT="/score/getMyScore";
|
||||
//查询我的成绩
|
||||
public static String GET_MY_SCORE="/score/getMyScoreInfo";
|
||||
//统一返回码--成功
|
||||
public static String SUCCESS_RETUEN_CODE="0";
|
||||
//统一返回码--失败
|
||||
public static String FAILURE_RETUEN_CODE="-9999";
|
||||
//统一返回码--已存在
|
||||
public static String HASE_RETUEN_CODE="1";
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
#数据库连接池配置
|
||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||
spring.datasource.platform=mysql
|
||||
#配置数据源
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/score?characterEncoding=utf8
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
#Mybatis配置
|
||||
#扫描的实体的包
|
||||
mybatis.typeAliasesPackage=com.score.bean
|
||||
#扫描的配置文件地址
|
||||
mybatis.mapperLocations=classpath:mapper/*.xml
|
||||
#mybatis.configLocation=classpath:mybatis-config.xml
|
||||
server.port=8088
|
||||
|
||||
#控制台打印SQL语句
|
||||
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
pagehelper.helper-dialect=mysql
|
||||
pagehelper.reasonable=true
|
||||
pagehelper.support-methods-arguments=true
|
||||
pagehelper.params=count=countSql
|
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.score.dao.TScoreMapper">
|
||||
<resultMap id="BaseResultMap" type="com.score.bean.TScore">
|
||||
<id column="score_id" property="scoreId" jdbcType="INTEGER" />
|
||||
<result column="score_value" property="scoreValue" jdbcType="INTEGER" />
|
||||
<result column="score_type" property="scoreType" jdbcType="VARCHAR" />
|
||||
<result column="student_id" property="studentId" jdbcType="INTEGER" />
|
||||
<result column="student_name" property="studentName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from
|
||||
t_score
|
||||
where score_id = #{scoreId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.score.bean.TScore">
|
||||
<selectKey resultType="java.lang.Integer" keyProperty="scoreId"
|
||||
order="AFTER">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into t_score (score_value, score_type, student_id
|
||||
)
|
||||
values
|
||||
(#{scoreValue,jdbcType=INTEGER}, #{scoreType,jdbcType=VARCHAR},
|
||||
#{studentId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="com.score.bean.TScore">
|
||||
update t_score
|
||||
set
|
||||
score_value = #{scoreValue,jdbcType=INTEGER},
|
||||
score_type =#{scoreType,jdbcType=VARCHAR},
|
||||
student_id =#{studentId,jdbcType=INTEGER}
|
||||
where score_id =#{scoreId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.Integer">
|
||||
select score_id, score_value, score_type, student_id
|
||||
from t_score
|
||||
where score_id = #{scoreId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectAll" resultMap="BaseResultMap" parameterType="com.score.bean.TScore">
|
||||
select score_id, score_value, score_type, student_id,student_name
|
||||
from
|
||||
t_score c LEFT JOIN t_student s ON s.student_no=c.student_id
|
||||
where 1=1
|
||||
<if test="studentName !=null and studentName !=''">
|
||||
and student_name like concat('%',#{studentName},'%')
|
||||
</if>
|
||||
<if test="studentId !=null and studentId !=''">
|
||||
and student_id =#{studentId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countByType" resultType="java.lang.Integer"
|
||||
parameterType="com.score.bean.TScore">
|
||||
select count(1)
|
||||
from t_score
|
||||
where score_type=#{scoreType}
|
||||
and student_id=#{studentId}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.score.dao.TStudentMapper">
|
||||
<resultMap id="BaseResultMap" type="com.score.bean.TStudent">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<id column="student_no" jdbcType="INTEGER" property="studentNo" />
|
||||
<result column="student_name" jdbcType="VARCHAR" property="studentName" />
|
||||
<result column="student_sex" jdbcType="VARCHAR" property="studentSex" />
|
||||
<result column="stu_pass" jdbcType="VARCHAR" property="stuPass" />
|
||||
</resultMap>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
delete from t_student
|
||||
where student_no = #{studentNo,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.score.bean.TStudent">
|
||||
insert into t_student (student_no,student_name, student_sex, stu_pass
|
||||
)
|
||||
values (#{studentNo,jdbcType=INTEGER},#{studentName,jdbcType=VARCHAR}, #{studentSex,jdbcType=VARCHAR}, #{stuPass,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="com.score.bean.TStudent">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update t_student
|
||||
set student_name = #{studentName,jdbcType=VARCHAR},
|
||||
student_sex = #{studentSex,jdbcType=VARCHAR},
|
||||
stu_pass = #{stuPass,jdbcType=VARCHAR}
|
||||
where student_no = #{studentNo,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select student_no, student_name, student_sex, stu_pass
|
||||
from t_student
|
||||
where student_no = #{studentNo,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectAll" resultMap="BaseResultMap" parameterType="com.score.bean.TStudent">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select student_no, student_name, student_sex, stu_pass
|
||||
from t_student
|
||||
where 1=1
|
||||
<if test="studentName !=null and studentName !=''">
|
||||
and student_name like concat('%',#{studentName},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectFinalScore" parameterType="com.score.bean.TStudent" resultType="java.util.Map">
|
||||
SELECT IFNULL(a.score,0) score1,IFNULL(b.score,0)
|
||||
score2,IFNULL(c.score,0) score3 FROM (
|
||||
SELECT (sum(score_value)) score FROM t_score WHERE score_type='1' AND
|
||||
student_id=#{studentNo}
|
||||
)a,
|
||||
(
|
||||
SELECT (sum(score_value)) score FROM t_score WHERE score_type='2' AND
|
||||
student_id=#{studentNo}
|
||||
|
||||
) b,
|
||||
(
|
||||
SELECT sum(score_value) score FROM t_score WHERE score_type='3' AND
|
||||
student_id=#{studentNo}
|
||||
)c
|
||||
</select>
|
||||
<select id="selectloginStudent" resultMap="BaseResultMap" parameterType="com.score.bean.TStudent">
|
||||
select student_no, student_name, student_sex, stu_pass
|
||||
from t_student
|
||||
where 1=1
|
||||
<if test="studentNo !=null and studentNo !=''">
|
||||
and student_no =#{studentNo}
|
||||
</if>
|
||||
<if test="stuPass !=null and stuPass !=''">
|
||||
and stu_pass =#{stuPass}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.score.dao.UserDao">
|
||||
<!-- 获得用户列表 -->
|
||||
<select id="getUser" resultType="com.score.bean.User" parameterType="com.score.bean.User">
|
||||
select user_id userId,user_name userName,pass_word password from t_user
|
||||
<where>
|
||||
<if test="userName !=null and userName !=''">
|
||||
and user_name=#{userName}
|
||||
</if>
|
||||
<if test="password !=null and password !=''">
|
||||
and pass_word=#{password}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,56 @@
|
||||
/*3.6.3 头像
|
||||
Name: mod_avatar
|
||||
Example: <i class="avatar avatar-L radius"><img src="static/h-ui/images/ucenter/avatar-default.jpg"></i>
|
||||
*/
|
||||
.avatar {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.avatar img {
|
||||
display: block;
|
||||
}
|
||||
.avatar.radius,
|
||||
.avatar.radius img {
|
||||
border-radius: 50%;
|
||||
}
|
||||
.avatar,
|
||||
.avatar img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
.avatar.size-MINI {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.avatar.size-S,
|
||||
.avatar.size-S img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.avatar.size-M,
|
||||
.avatar.size-M img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
/*默认为中,可以不写,可以理解为:均码*/
|
||||
.avatar.size-L,
|
||||
.avatar.size-L img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
.avatar.size-XL,
|
||||
.avatar.size-XL img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
.avatar.size-XXL,
|
||||
.avatar.size-XXL img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.avatar.size-XXXL,
|
||||
.avatar.size-XXXL img {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
.column-wrap {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
background: #f5f5f5;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.iframe-h {
|
||||
height: 100%;
|
||||
}
|
||||
.column-edge {
|
||||
float: left;
|
||||
padding-top: 16px;
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.column-content {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
background: #f5f5f5;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.column-content-detail {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
.page-content {
|
||||
padding: 0px;
|
||||
}
|
||||
.page-content-wrap {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.layui-nav-no-bg {
|
||||
background: #fff;
|
||||
}
|
||||
.layui-nav-no-bg .layui-nav-item {
|
||||
border-bottom: 1px solid #f8f8f8;
|
||||
}
|
||||
.column-edge {
|
||||
float: none;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.column-content {
|
||||
background: #fff;
|
||||
height: auto;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.layui-tab-content {
|
||||
padding: 15px 0;
|
||||
}
|
||||
.layui-form-label {
|
||||
padding: 9px 0px;
|
||||
}
|
||||
.layui-input-block {
|
||||
margin-left: 80px;
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
.commentList .item {
|
||||
list-style: none outside none;
|
||||
margin: 1.6rem 0 0;
|
||||
}
|
||||
.commentList .avatar {
|
||||
border: 1px solid transparent;
|
||||
float: left;
|
||||
}
|
||||
.comment-main {
|
||||
position: relative;
|
||||
margin-left: 64px;
|
||||
border: 1px solid #dedede;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.comment-main:after,
|
||||
.comment-main:before {
|
||||
position: absolute;
|
||||
top: 11px;
|
||||
left: -16px;
|
||||
right: 100%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
display: block;
|
||||
content: " ";
|
||||
border-color: transparent;
|
||||
border-style: solid solid outset;
|
||||
pointer-events: none;
|
||||
}
|
||||
.comment-main:before {
|
||||
border-right-color: #dedede;
|
||||
border-width: 8px;
|
||||
}
|
||||
.comment-main:after {
|
||||
border-width: 7px;
|
||||
border-right-color: #f8f8f8;
|
||||
margin-top: 1px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
.comment-header {
|
||||
padding: 10px 15px;
|
||||
background: #f8f8f8;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.comment-title {
|
||||
margin: 0 0 8px;
|
||||
font-size: 1.6rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.comment-meta {
|
||||
font-size: 13px;
|
||||
color: #999;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.comment-meta a {
|
||||
color: #999;
|
||||
}
|
||||
.comment-author {
|
||||
font-weight: 700;
|
||||
color: #999;
|
||||
}
|
||||
.comment-body {
|
||||
padding: 15px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.comment-body > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.commentList .comment-flip .avatar {
|
||||
float: right;
|
||||
}
|
||||
.comment-flip .comment-main {
|
||||
margin-left: 0;
|
||||
margin-right: 64px;
|
||||
}
|
||||
.comment-flip .comment-main:before {
|
||||
border-left-color: #dedede;
|
||||
border-right-color: transparent;
|
||||
}
|
||||
.comment-flip .comment-main:after,
|
||||
.comment-flip .comment-main:before {
|
||||
left: 100%;
|
||||
position: absolute;
|
||||
right: -16px;
|
||||
}
|
||||
.comment-flip .comment-main:after {
|
||||
border-left-color: #f8f8f8;
|
||||
border-right-color: transparent;
|
||||
margin-left: auto;
|
||||
margin-right: 2px;
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
/*圆角*/
|
||||
/*阴影*/
|
||||
/*字体*/
|
||||
/*动画属性*/
|
||||
/*清楚浮动*/
|
@ -0,0 +1,154 @@
|
||||
.email-wrap {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
background: #f5f5f5;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.email-wrap .email-write-btn {
|
||||
width: 100%;
|
||||
}
|
||||
.email-wrap .email-folder {
|
||||
padding-top: 20px;
|
||||
}
|
||||
.email-wrap .email-folder dt {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
line-height: 32px;
|
||||
}
|
||||
.email-wrap .email-folder dd {
|
||||
font-size: 12px;
|
||||
color: #545454;
|
||||
line-height: 32px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.email-wrap .email-folder dd button {
|
||||
margin-top: 4px;
|
||||
}
|
||||
.email-wrap .email-folder dd .iconfont,
|
||||
.email-wrap .email-folder dd .layui-icon {
|
||||
float: left;
|
||||
padding-right: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.email-wrap .email-classify {
|
||||
padding-top: 20px;
|
||||
}
|
||||
.email-wrap .email-classify dt {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
line-height: 32px;
|
||||
}
|
||||
.email-wrap .email-classify dd {
|
||||
font-size: 12px;
|
||||
color: #545454;
|
||||
line-height: 32px;
|
||||
}
|
||||
.email-wrap .email-classify dd .iconfont,
|
||||
.email-wrap .email-classify dd .layui-icon {
|
||||
float: left;
|
||||
padding-right: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.email-wrap .email-classify dd .icon-blue {
|
||||
color: #01AAED;
|
||||
}
|
||||
.email-wrap .email-classify dd .icon-green {
|
||||
color: #009688;
|
||||
}
|
||||
.email-wrap .email-classify dd .icon-wran {
|
||||
color: #F7B824;
|
||||
}
|
||||
.email-wrap .email-classify dd .icon-red {
|
||||
color: #FF5722;
|
||||
}
|
||||
.email-wrap .email-classify dd .icon-gray {
|
||||
color: #2F4056;
|
||||
}
|
||||
.email-wrap .email-label {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.email-wrap .email-label dt {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
line-height: 32px;
|
||||
}
|
||||
.email-wrap .email-label .layui-btn {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.email-wrap .email-label .layui-btn + .layui-btn {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
.email-wrap .email-content {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
padding: 15px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.iframe-h {
|
||||
height: 100%;
|
||||
}
|
||||
.email-write {
|
||||
padding: 15px;
|
||||
}
|
||||
.email-write .layui-btn {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.email-content-title {
|
||||
padding: 15px;
|
||||
}
|
||||
.email-content-title .write-title {
|
||||
font-size: 20px;
|
||||
}
|
||||
.email-tool-btn {
|
||||
margin-top: 3px;
|
||||
}
|
||||
.email-tool-btn .layui-form-item {
|
||||
margin: 0;
|
||||
}
|
||||
.email-tool-btn .layui-form-item .layui-inline {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.email-tool-btn .email-tool-btn-right {
|
||||
text-align: right;
|
||||
}
|
||||
.email-list {
|
||||
padding: 0 15px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.email-wrap .email-content {
|
||||
padding: 0;
|
||||
}
|
||||
.email-write {
|
||||
padding: 15px;
|
||||
}
|
||||
.email-write .layui-btn {
|
||||
width: 100%;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
.email-tool-btn .email-tool-btn-right {
|
||||
text-align: left;
|
||||
}
|
||||
.email-tool-btn-left,
|
||||
.email-tool-btn-right {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.email-tool-btn-left .layui-inline,
|
||||
.email-tool-btn-right .layui-inline {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
html {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body {
|
||||
background: url("../images/login/login_line.jpg") left center repeat-x;
|
||||
height: 100%;
|
||||
}
|
||||
/*移除表单填充色*/
|
||||
input:-webkit-autofill {
|
||||
-webkit-box-shadow: 0 0 0 1000px #ececec inset;
|
||||
}
|
||||
/*按钮移上去颜色*/
|
||||
.layui-btn-primary:hover {
|
||||
border-color: #1E9FFF;
|
||||
color: #333;
|
||||
}
|
||||
/*页面背景色*/
|
||||
.m-login-bg {
|
||||
background: url("../images/login/login_bg.png") left center repeat-x;
|
||||
height: 100%;
|
||||
}
|
||||
.m-login {
|
||||
width: 390px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -195px;
|
||||
margin-top: -205px;
|
||||
}
|
||||
.m-login h3 {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
height: 60px;
|
||||
font-size: 28px;
|
||||
}
|
||||
.m-login .copyright {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.m-login-warp {
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
padding: 25px;
|
||||
}
|
||||
.m-login-warp .layui-input {
|
||||
height: 40px;
|
||||
line-height: 40px\9;
|
||||
margin-bottom: 5px;
|
||||
-webkit-transition-property: none;
|
||||
transition-property: none;
|
||||
background: #ececec;
|
||||
border: 1px solid #ececec;
|
||||
}
|
||||
.m-login-warp .m-login-btn .layui-inline {
|
||||
width: 49%;
|
||||
margin: 0;
|
||||
}
|
||||
.m-login-warp .m-login-btn .layui-inline button {
|
||||
width: 100%;
|
||||
}
|
||||
.m-login-warp .verifyImg {
|
||||
width: 130px;
|
||||
height: 42px;
|
||||
}
|
||||
@media screen and (max-width: 450px) {
|
||||
.m-login {
|
||||
width: 300px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -150px;
|
||||
margin-top: -240px;
|
||||
}
|
||||
.layui-form-item .layui-inline {
|
||||
display: block;
|
||||
margin-right: 0;
|
||||
margin-bottom: 20px;
|
||||
clear: both;
|
||||
}
|
||||
.m-login-warp .m-login-btn .layui-inline {
|
||||
width: 100%;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
.page-wrap {
|
||||
text-align: center;
|
||||
}
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
*zoom: 1;
|
||||
text-align: center;
|
||||
margin: 10px 0;
|
||||
font-size: 0;
|
||||
}
|
||||
.pagination li {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
*zoom: 1;
|
||||
border: 1px solid #e2e2e2;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
margin: 0 -1px 5px 0;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
.pagination li a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.pagination li.active {
|
||||
border: 1px solid #1E9FFF;
|
||||
}
|
||||
.pagination li.active span {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #1E9FFF;
|
||||
color: #fff;
|
||||
}
|
||||
.pagination li.disabled {
|
||||
background: #f2f2f2;
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
.panel {
|
||||
background-color: #fff;
|
||||
border: solid 1px transparent;
|
||||
}
|
||||
.panel-header {
|
||||
border-bottom: solid 1px transparent;
|
||||
padding: 8px 15px;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
/*面板标题*/
|
||||
.panel-body {
|
||||
padding: 15px;
|
||||
}
|
||||
/*面板内容*/
|
||||
.panel-footer {
|
||||
background-color: #f5f5f5;
|
||||
border-top: 1px solid #ddd;
|
||||
padding: 5px 20px;
|
||||
}
|
||||
/*面板页脚*/
|
||||
/*默认面板*/
|
||||
.panel-default {
|
||||
border-color: #dddddd;
|
||||
}
|
||||
.panel-default > .panel-header {
|
||||
border-color: #ddd;
|
||||
background-color: #f5f5f5;
|
||||
color: #444444;
|
||||
}
|
||||
/*主要面板*/
|
||||
.panel-primary {
|
||||
border-color: #5a98de;
|
||||
}
|
||||
.panel-primary > .panel-header {
|
||||
border-color: #5a98de;
|
||||
background-color: #5a98de;
|
||||
color: #ffffff;
|
||||
}
|
||||
/*次要面板*/
|
||||
.panel-secondary {
|
||||
border-color: #3bb4f2;
|
||||
}
|
||||
.panel-secondary > .panel-header {
|
||||
border-color: #3bb4f2;
|
||||
background-color: #3bb4f2;
|
||||
color: #ffffff;
|
||||
}
|
||||
/*成功面板*/
|
||||
.panel-success {
|
||||
border-color: #5eb95e;
|
||||
}
|
||||
.panel-success > .panel-header {
|
||||
border-color: #5eb95e;
|
||||
background-color: #5eb95e;
|
||||
color: #ffffff;
|
||||
}
|
||||
/*警告面板*/
|
||||
.panel-warning {
|
||||
border-color: #f37b1d;
|
||||
}
|
||||
.panel-warning > .panel-header {
|
||||
border-color: #f37b1d;
|
||||
background-color: #f37b1d;
|
||||
color: #ffffff;
|
||||
}
|
||||
/*危险面板*/
|
||||
.panel-danger {
|
||||
border-color: #dd514c;
|
||||
}
|
||||
.panel-danger > .panel-header {
|
||||
border-color: #dd514c;
|
||||
background-color: #dd514c;
|
||||
color: #ffffff;
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
/*圆角*/
|
||||
/*阴影*/
|
||||
/*字体*/
|
||||
/*动画属性*/
|
||||
/*清楚浮动*/
|
||||
.f-l {
|
||||
float: left;
|
||||
}
|
||||
.f-r {
|
||||
float: right;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'iconfont';
|
||||
src: url('../fonts//iconfont.eot');
|
||||
src: url('../fonts//iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('../fonts//iconfont.woff') format('woff'), /* Modern Browsers */ url('../fonts//iconfont.ttf') format('truetype'), /* Safari, Android, iOS */ url('../fonts//iconfont.svg#svgFontName') format('svg');
|
||||
|
||||
/* IE9 Compat Modes */
|
||||
/* Legacy iOS */
|
||||
}
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.panel-default {
|
||||
border-color: #ebeaea;
|
||||
}
|
||||
.panel-default .panel-header {
|
||||
border-color: transparent;
|
||||
background-color: #fff;
|
||||
color: #555555;
|
||||
}
|
||||
.panel-header {
|
||||
border-bottom: solid 1px transparent;
|
||||
padding: 8px 15px;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.layui-form-select dl dd.layui-this {
|
||||
background: #f2f2f2;
|
||||
color: #333;
|
||||
}
|
||||
.layui-btn-primary:hover {
|
||||
border-color: #00b5f9;
|
||||
color: #333;
|
||||
}
|
||||
.layui-tab-bar {
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 3px;
|
||||
z-index: 10;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border: 1px solid #e2e2e2;
|
||||
border-radius: 2px;
|
||||
background-color: #fff;
|
||||
}
|
||||
.layui-elem-quote {
|
||||
border-left: 5px solid #00b5f9;
|
||||
}
|
||||
/*清楚浮动*/
|
||||
.clearfix {
|
||||
zoom: 1;
|
||||
}
|
||||
.clearfix:after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
.layui-nav-no-bg {
|
||||
background: transparent;
|
||||
width: auto;
|
||||
}
|
||||
.layui-nav-no-bg.layui-nav-tree .layui-nav-item a:hover {
|
||||
background-color: transparent;
|
||||
color: #00b5f9;
|
||||
}
|
||||
.layui-nav-no-bg.layui-nav .layui-nav-item a {
|
||||
color: #333;
|
||||
}
|
||||
.layui-nav-no-bg .layui-nav-itemed > a,
|
||||
.layui-nav-no-bg .layui-nav-tree .layui-nav-title a,
|
||||
.layui-nav-no-bg .layui-nav-tree .layui-nav-title a:hover {
|
||||
background: transparent!important;
|
||||
color: #333!important;
|
||||
}
|
||||
.layui-nav-no-bg.layui-nav-tree .layui-nav-child a {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-indent: 10px;
|
||||
color: #666;
|
||||
}
|
||||
.layui-nav-no-bg.layui-nav-tree .layui-nav-child dd.layui-this,
|
||||
.layui-nav-no-bg.layui-nav-tree .layui-this,
|
||||
.layui-nav-no-bg.layui-nav-tree .layui-this > a:hover {
|
||||
background-color: #fff;
|
||||
color: #00b5f9;
|
||||
}
|
||||
.layui-nav-no-bg.layui-nav-tree .layui-this > a {
|
||||
background-color: #fff;
|
||||
color: #00b5f9;
|
||||
border-left: 3px solid #00b5f9;
|
||||
margin-right: -20px;
|
||||
}
|
||||
.layui-nav-no-bg .layui-nav-bar {
|
||||
display: none;
|
||||
}
|
||||
.showSubBtn {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
margin-left: 5px;
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
|
||||
@font-face {font-family: "iconfont";
|
||||
src: url('iconfont.eot?t=1490337422326'); /* IE9*/
|
||||
src: url('iconfont.eot?t=1490337422326#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('iconfont.woff?t=1490337422326') format('woff'), /* chrome, firefox */
|
||||
url('iconfont.ttf?t=1490337422326') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
||||
url('iconfont.svg?t=1490337422326#iconfont') format('svg'); /* iOS 4.1- */
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family:"iconfont" !important;
|
||||
font-size:16px;
|
||||
font-style:normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-shuaxin:before { content: "\e60d"; }
|
||||
|
||||
.icon-shujuku:before { content: "\e600"; }
|
||||
|
||||
.icon-shanchu:before { content: "\e601"; }
|
||||
|
||||
.icon-wenzhang:before { content: "\e602"; }
|
||||
|
||||
.icon-lianjie:before { content: "\e60c"; }
|
||||
|
||||
.icon-caidan:before { content: "\e60e"; }
|
||||
|
||||
.icon-youjian:before { content: "\e603"; }
|
||||
|
||||
.icon-tuijian:before { content: "\e604"; }
|
||||
|
||||
.icon-msg:before { content: "\e605"; }
|
||||
|
||||
.icon-userpro:before { content: "\e606"; }
|
||||
|
||||
.icon-leimulianjie:before { content: "\e607"; }
|
||||
|
||||
.icon-list:before { content: "\e608"; }
|
||||
|
||||
.icon-remind:before { content: "\e609"; }
|
||||
|
||||
.icon-Password:before { content: "\e60a"; }
|
||||
|
||||
.icon-Setup:before { content: "\e60b"; }
|
||||
|
||||
.icon-shangsheng:before { content: "\e628"; }
|
||||
|
||||
.icon-fajianxiang:before { content: "\e639"; }
|
||||
|
||||
.icon-xiajiang:before { content: "\e60f"; }
|
||||
|
||||
.icon-paixu:before { content: "\e656"; }
|
||||
|
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 147 B |
After Width: | Height: | Size: 147 B |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
@ -0,0 +1,57 @@
|
||||
layui.define(['jquery', 'layer'], function (exports) {
|
||||
var $ = layui.jquery;
|
||||
var layer = layui.layer;
|
||||
var dialog = {
|
||||
/*确认框*/
|
||||
confirm: function (jsonData) {
|
||||
layer.confirm(jsonData.message, {
|
||||
btn: ['确定', '取消'],
|
||||
shade: [0.1, '#fff']
|
||||
}, function () {
|
||||
jsonData.success && jsonData.success();
|
||||
}, function () {
|
||||
jsonData.cancel && jsonData.cancel();
|
||||
});
|
||||
},
|
||||
page: function (title, url, w, h) {
|
||||
if (title == null || title == '') {
|
||||
title = false;
|
||||
}
|
||||
;
|
||||
if (url == null || url == '') {
|
||||
url = "404.html";
|
||||
}
|
||||
;
|
||||
if (w == null || w == '') {
|
||||
w = '700px';
|
||||
}
|
||||
;
|
||||
if (h == null || h == '') {
|
||||
h = '350px';
|
||||
}
|
||||
;
|
||||
var index = layer.open({
|
||||
type: 2,
|
||||
title: title,
|
||||
area: [w, h],
|
||||
fixed: false, //不固定
|
||||
maxmin: true,
|
||||
content: url
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 提示
|
||||
* @param title
|
||||
* @param obj
|
||||
*/
|
||||
tips: function(title, obj) {
|
||||
layer.tips(title, obj, {
|
||||
tips: [1, '#444c63'], //还可配置颜色
|
||||
time: 1000
|
||||
});
|
||||
}
|
||||
};
|
||||
//输出test接口
|
||||
exports('dialog', dialog);
|
||||
}
|
||||
);
|
@ -0,0 +1,2 @@
|
||||
/** layui-v2.2.6-rc2 MIT License By https://www.layui.com */
|
||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,87 @@
|
||||
{
|
||||
"code": 0,
|
||||
"pages": 1,
|
||||
"data": [
|
||||
{
|
||||
"id": 76,
|
||||
"content": "申请添加你为好友",
|
||||
"uid": 168,
|
||||
"from": 166488,
|
||||
"from_group": 0,
|
||||
"type": 1,
|
||||
"remark": "有问题要问",
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "刚刚",
|
||||
"user": {
|
||||
"id": 166488,
|
||||
"avatar": "http://q.qlogo.cn/qqapp/101235792/B704597964F9BD0DB648292D1B09F7E8/100",
|
||||
"username": "李彦宏",
|
||||
"sign": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 75,
|
||||
"content": "申请添加你为好友",
|
||||
"uid": 168,
|
||||
"from": 347592,
|
||||
"from_group": 0,
|
||||
"type": 1,
|
||||
"remark": "你好啊!",
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "刚刚",
|
||||
"user": {
|
||||
"id": 347592,
|
||||
"avatar": "http://q.qlogo.cn/qqapp/101235792/B78751375E0531675B1272AD994BA875/100",
|
||||
"username": "麻花疼",
|
||||
"sign": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"content": "雷军 拒绝了你的好友申请",
|
||||
"uid": 168,
|
||||
"from": null,
|
||||
"from_group": null,
|
||||
"type": 1,
|
||||
"remark": null,
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "10天前",
|
||||
"user": {
|
||||
"id": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"content": "马小云 已经同意你的好友申请",
|
||||
"uid": 168,
|
||||
"from": null,
|
||||
"from_group": null,
|
||||
"type": 1,
|
||||
"remark": null,
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "10天前",
|
||||
"user": {
|
||||
"id": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"content": "贤心 已经同意你的好友申请",
|
||||
"uid": 168,
|
||||
"from": null,
|
||||
"from_group": null,
|
||||
"type": 1,
|
||||
"remark": null,
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "10天前",
|
||||
"user": {
|
||||
"id": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 269 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.0 KiB |