Compare commits
84 Commits
branch-yff
...
main
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
@ -0,0 +1 @@
|
||||
/target/
|
@ -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
|
@ -0,0 +1 @@
|
||||
spring
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" />
|
||||
</descriptors>
|
||||
<webroots>
|
||||
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
|
||||
</webroots>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,70 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="exploded-war" name="Sport:war exploded">
|
||||
<output-path>$PROJECT_DIR$/target/ssm4o4c3</output-path>
|
||||
<properties id="maven-jee-properties">
|
||||
<options>
|
||||
<exploded>true</exploded>
|
||||
<module>Sport</module>
|
||||
<packaging>war</packaging>
|
||||
</options>
|
||||
</properties>
|
||||
<root id="root">
|
||||
<element id="directory" name="WEB-INF">
|
||||
<element id="directory" name="classes">
|
||||
<element id="module-output" name="Sport" />
|
||||
</element>
|
||||
<element id="directory" name="lib">
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-core:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-jcl:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-context:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-expression:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-context-support:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-tx:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-aop:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-beans:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-jdbc:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-web:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-webmvc:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.aspectj:aspectjweaver:1.8.8" />
|
||||
<element id="library" level="project" name="Maven: commons-fileupload:commons-fileupload:1.3.1" />
|
||||
<element id="library" level="project" name="Maven: javax.servlet:jstl:1.2" />
|
||||
<element id="library" level="project" name="Maven: com.baomidou:mybatis-plus:2.3" />
|
||||
<element id="library" level="project" name="Maven: com.baomidou:mybatis-plus-support:2.3" />
|
||||
<element id="library" level="project" name="Maven: com.baomidou:mybatis-plus-core:2.3" />
|
||||
<element id="library" level="project" name="Maven: com.github.jsqlparser:jsqlparser:1.1" />
|
||||
<element id="library" level="project" name="Maven: org.mybatis:mybatis-spring:1.3.2" />
|
||||
<element id="library" level="project" name="Maven: org.mybatis:mybatis:3.4.6" />
|
||||
<element id="library" level="project" name="Maven: com.baomidou:mybatis-plus-generate:2.3" />
|
||||
<element id="library" level="project" name="Maven: com.mysql:mysql-connector-j:8.0.31" />
|
||||
<element id="library" level="project" name="Maven: com.google.protobuf:protobuf-java:3.19.4" />
|
||||
<element id="library" level="project" name="Maven: com.microsoft.sqlserver:mssql-jdbc:6.2.0.jre8" />
|
||||
<element id="library" level="project" name="Maven: com.alibaba:druid:1.1.0" />
|
||||
<element id="library" level="project" name="Maven: com.alibaba:fastjson:1.2.8" />
|
||||
<element id="library" level="project" name="Maven: log4j:log4j:1.2.17" />
|
||||
<element id="library" level="project" name="Maven: org.slf4j:slf4j-api:1.7.19" />
|
||||
<element id="library" level="project" name="Maven: org.slf4j:slf4j-log4j12:1.7.19" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-test:5.0.0.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.apache.commons:commons-lang3:3.0" />
|
||||
<element id="library" level="project" name="Maven: javax.validation:validation-api:2.0.1.Final" />
|
||||
<element id="library" level="project" name="Maven: commons-io:commons-io:2.5" />
|
||||
<element id="library" level="project" name="Maven: cn.hutool:hutool-all:4.0.12" />
|
||||
<element id="library" level="project" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.29" />
|
||||
<element id="library" level="project" name="Maven: org.apache.tomcat:tomcat-annotations-api:9.0.29" />
|
||||
<element id="library" level="project" name="Maven: commons-beanutils:commons-beanutils:1.8.0" />
|
||||
<element id="library" level="project" name="Maven: commons-logging:commons-logging:1.1.1" />
|
||||
<element id="library" level="project" name="Maven: com.baidu.aip:java-sdk:4.4.1" />
|
||||
<element id="library" level="project" name="Maven: org.json:json:20160810" />
|
||||
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.1" />
|
||||
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.1" />
|
||||
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.1" />
|
||||
<element id="library" level="project" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.13" />
|
||||
<element id="library" level="project" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.13" />
|
||||
</element>
|
||||
</element>
|
||||
<element id="directory" name="META-INF">
|
||||
<element id="file-copy" path="$PROJECT_DIR$/target/ssm4o4c3/META-INF/MANIFEST.MF" />
|
||||
</element>
|
||||
<element id="javaee-facet-resources" facet="Sport/web/Web" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -0,0 +1,14 @@
|
||||
<?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="ssm4o4c3" />
|
||||
<module name="Sport" />
|
||||
</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$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="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,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<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="8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/classes" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WebContextManager">
|
||||
<option name="state">
|
||||
<map>
|
||||
<entry key="file://$PROJECT_DIR$/src/main/webapp/front/index.html" value="file://$PROJECT_DIR$/src/main/webapp/front" />
|
||||
<entry key="file://$PROJECT_DIR$/src/main/webapp/front/pages/home/home.html" value="file://$PROJECT_DIR$/src/main/webapp/front/pages/home" />
|
||||
<entry key="file://$PROJECT_DIR$/src/main/webapp/front/pages/news/detail.html" value="file://$PROJECT_DIR$/src/main/webapp/front/pages/news" />
|
||||
<entry key="file://$PROJECT_DIR$/src/main/webapp/front/pages/users/detail.html" value="file://$PROJECT_DIR$/src/main/webapp/front/pages/users" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>spring</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.core.springbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.springframework.ide.eclipse.core.springnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/webapp"/>
|
||||
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="target/m2e-wtp/web-resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||
<attributes>
|
||||
<attribute name="hide" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
@ -0,0 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,9 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="spring-schema">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<property name="java-output-path" value="/mybatisplus-spring-mvc/target/classes"/>
|
||||
<property name="context-root" value="spring-schema"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<installed facet="java" version="1.7"/>
|
||||
<installed facet="jst.web" version="3.0"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
</faceted-project>
|
@ -0,0 +1 @@
|
||||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
@ -0,0 +1 @@
|
||||
Window
|
@ -0,0 +1,2 @@
|
||||
disabled=06target
|
||||
eclipse.preferences.version=1
|
@ -0,0 +1,264 @@
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.jlwl</groupId>
|
||||
<artifactId>ssm4o4c3</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring.version>5.0.0.RELEASE</spring.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<druid.version>1.1.0</druid.version>
|
||||
<fastjson.version>1.2.8</fastjson.version>
|
||||
<mybaitsplus.version>2.3</mybaitsplus.version>
|
||||
<mysql.version>8.0.31</mysql.version>
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<slf4j.version>1.7.19</slf4j.version>
|
||||
<aspectjweaver.version>1.8.8</aspectjweaver.version>
|
||||
<fileupload.version>1.3.1</fileupload.version>
|
||||
<jstl.version>1.2</jstl.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- JUnit -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring MVC -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- AOP -->
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>${aspectjweaver.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- FileUpload -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${fileupload.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>${jstl.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mybatis-Plus -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus</artifactId>
|
||||
<version>${mybaitsplus.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.microsoft.sqlserver</groupId>-->
|
||||
<!-- <artifactId>sqljdbc4</artifactId>-->
|
||||
<!-- <scope>4.0</scope>-->
|
||||
<!-- <version>4.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- -->
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>6.2.0.jre8</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Druid -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- FastJson -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Log -->
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>4.0.12</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-core -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<version>9.0.29</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 百度人工智能 -->
|
||||
<dependency>
|
||||
<groupId>com.baidu.aip</groupId>
|
||||
<artifactId>java-sdk</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>2.10.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.10.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
<version>1.9.13</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 项目访问名称 -->
|
||||
<finalName>ssm4o4c3</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,15 @@
|
||||
package com.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 登录用户信息
|
||||
*/
|
||||
@Target(ElementType.PARAMETER)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface APPLoginUser {
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 忽略Token验证
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface IgnoreAuth {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 登录用户信息
|
||||
*/
|
||||
@Target(ElementType.PARAMETER)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface LoginUser {
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.config;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
|
||||
|
||||
/**
|
||||
* 自定义填充处理器
|
||||
*/
|
||||
public class MyMetaObjectHandler extends MetaObjectHandler {
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
this.setFieldValByName("ctime", new Date(), metaObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean openUpdateFill() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
// 关闭更新填充、这里不执行
|
||||
}
|
||||
}
|
@ -0,0 +1,215 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.BisaibaomingEntity;
|
||||
import com.entity.view.BisaibaomingView;
|
||||
|
||||
import com.service.BisaibaomingService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛报名
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bisaibaoming")
|
||||
public class BisaibaomingController {
|
||||
@Autowired
|
||||
private BisaibaomingService bisaibaomingService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,BisaibaomingEntity bisaibaoming,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
bisaibaoming.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<BisaibaomingEntity> ew = new EntityWrapper<BisaibaomingEntity>();
|
||||
PageUtils page = bisaibaomingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaibaoming), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,BisaibaomingEntity bisaibaoming, HttpServletRequest request){
|
||||
EntityWrapper<BisaibaomingEntity> ew = new EntityWrapper<BisaibaomingEntity>();
|
||||
PageUtils page = bisaibaomingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaibaoming), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( BisaibaomingEntity bisaibaoming){
|
||||
EntityWrapper<BisaibaomingEntity> ew = new EntityWrapper<BisaibaomingEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaibaoming, "bisaibaoming"));
|
||||
return R.ok().put("data", bisaibaomingService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(BisaibaomingEntity bisaibaoming){
|
||||
EntityWrapper< BisaibaomingEntity> ew = new EntityWrapper< BisaibaomingEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaibaoming, "bisaibaoming"));
|
||||
BisaibaomingView bisaibaomingView = bisaibaomingService.selectView(ew);
|
||||
return R.ok("查询比赛报名成功").put("data", bisaibaomingView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
BisaibaomingEntity bisaibaoming = bisaibaomingService.selectById(id);
|
||||
return R.ok().put("data", bisaibaoming);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
BisaibaomingEntity bisaibaoming = bisaibaomingService.selectById(id);
|
||||
return R.ok().put("data", bisaibaoming);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody BisaibaomingEntity bisaibaoming, HttpServletRequest request){
|
||||
bisaibaoming.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaibaoming);
|
||||
|
||||
bisaibaomingService.insert(bisaibaoming);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody BisaibaomingEntity bisaibaoming, HttpServletRequest request){
|
||||
bisaibaoming.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaibaoming);
|
||||
|
||||
bisaibaomingService.insert(bisaibaoming);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BisaibaomingEntity bisaibaoming, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(bisaibaoming);
|
||||
bisaibaomingService.updateById(bisaibaoming);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
bisaibaomingService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<BisaibaomingEntity> wrapper = new EntityWrapper<BisaibaomingEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = bisaibaomingService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,207 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.BisaixiangmuEntity;
|
||||
import com.entity.view.BisaixiangmuView;
|
||||
|
||||
import com.service.BisaixiangmuService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛项目
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bisaixiangmu")
|
||||
public class BisaixiangmuController {
|
||||
@Autowired
|
||||
private BisaixiangmuService bisaixiangmuService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,BisaixiangmuEntity bisaixiangmu,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<BisaixiangmuEntity> ew = new EntityWrapper<BisaixiangmuEntity>();
|
||||
PageUtils page = bisaixiangmuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaixiangmu), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,BisaixiangmuEntity bisaixiangmu, HttpServletRequest request){
|
||||
EntityWrapper<BisaixiangmuEntity> ew = new EntityWrapper<BisaixiangmuEntity>();
|
||||
PageUtils page = bisaixiangmuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaixiangmu), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( BisaixiangmuEntity bisaixiangmu){
|
||||
EntityWrapper<BisaixiangmuEntity> ew = new EntityWrapper<BisaixiangmuEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaixiangmu, "bisaixiangmu"));
|
||||
return R.ok().put("data", bisaixiangmuService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(BisaixiangmuEntity bisaixiangmu){
|
||||
EntityWrapper< BisaixiangmuEntity> ew = new EntityWrapper< BisaixiangmuEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaixiangmu, "bisaixiangmu"));
|
||||
BisaixiangmuView bisaixiangmuView = bisaixiangmuService.selectView(ew);
|
||||
return R.ok("查询比赛项目成功").put("data", bisaixiangmuView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
BisaixiangmuEntity bisaixiangmu = bisaixiangmuService.selectById(id);
|
||||
return R.ok().put("data", bisaixiangmu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
BisaixiangmuEntity bisaixiangmu = bisaixiangmuService.selectById(id);
|
||||
return R.ok().put("data", bisaixiangmu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody BisaixiangmuEntity bisaixiangmu, HttpServletRequest request){
|
||||
bisaixiangmu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaixiangmu);
|
||||
|
||||
bisaixiangmuService.insert(bisaixiangmu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody BisaixiangmuEntity bisaixiangmu, HttpServletRequest request){
|
||||
bisaixiangmu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaixiangmu);
|
||||
|
||||
bisaixiangmuService.insert(bisaixiangmu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BisaixiangmuEntity bisaixiangmu, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(bisaixiangmu);
|
||||
bisaixiangmuService.updateById(bisaixiangmu);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
bisaixiangmuService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<BisaixiangmuEntity> wrapper = new EntityWrapper<BisaixiangmuEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = bisaixiangmuService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.BisaixinxiEntity;
|
||||
import com.entity.view.BisaixinxiView;
|
||||
|
||||
import com.service.BisaixinxiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bisaixinxi")
|
||||
public class BisaixinxiController {
|
||||
@Autowired
|
||||
private BisaixinxiService bisaixinxiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,BisaixinxiEntity bisaixinxi,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<BisaixinxiEntity> ew = new EntityWrapper<BisaixinxiEntity>();
|
||||
PageUtils page = bisaixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaixinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,BisaixinxiEntity bisaixinxi, HttpServletRequest request){
|
||||
EntityWrapper<BisaixinxiEntity> ew = new EntityWrapper<BisaixinxiEntity>();
|
||||
PageUtils page = bisaixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bisaixinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( BisaixinxiEntity bisaixinxi){
|
||||
EntityWrapper<BisaixinxiEntity> ew = new EntityWrapper<BisaixinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaixinxi, "bisaixinxi"));
|
||||
return R.ok().put("data", bisaixinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(BisaixinxiEntity bisaixinxi){
|
||||
EntityWrapper< BisaixinxiEntity> ew = new EntityWrapper< BisaixinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( bisaixinxi, "bisaixinxi"));
|
||||
BisaixinxiView bisaixinxiView = bisaixinxiService.selectView(ew);
|
||||
return R.ok("查询比赛信息成功").put("data", bisaixinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
BisaixinxiEntity bisaixinxi = bisaixinxiService.selectById(id);
|
||||
return R.ok().put("data", bisaixinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
BisaixinxiEntity bisaixinxi = bisaixinxiService.selectById(id);
|
||||
return R.ok().put("data", bisaixinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody BisaixinxiEntity bisaixinxi, HttpServletRequest request){
|
||||
bisaixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaixinxi);
|
||||
|
||||
bisaixinxiService.insert(bisaixinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody BisaixinxiEntity bisaixinxi, HttpServletRequest request){
|
||||
bisaixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(bisaixinxi);
|
||||
|
||||
bisaixinxiService.insert(bisaixinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BisaixinxiEntity bisaixinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(bisaixinxi);
|
||||
bisaixinxiService.updateById(bisaixinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
bisaixinxiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<BisaixinxiEntity> wrapper = new EntityWrapper<BisaixinxiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = bisaixinxiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.annotation.IgnoreAuth;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.entity.ConfigEntity;
|
||||
import com.service.ConfigService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.ValidatorUtils;
|
||||
|
||||
/**
|
||||
* 登录相关
|
||||
*/
|
||||
@RequestMapping("config")
|
||||
@RestController
|
||||
public class ConfigController{
|
||||
|
||||
@Autowired
|
||||
private ConfigService configService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
|
||||
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
|
||||
PageUtils page = configService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
|
||||
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
|
||||
PageUtils page = configService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") String id){
|
||||
ConfigEntity config = configService.selectById(id);
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") String id){
|
||||
ConfigEntity config = configService.selectById(id);
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据name获取信息
|
||||
*/
|
||||
@RequestMapping("/info")
|
||||
public R infoByName(@RequestParam String name){
|
||||
ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody ConfigEntity config){
|
||||
// ValidatorUtils.validateEntity(config);
|
||||
configService.insert(config);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody ConfigEntity config){
|
||||
// ValidatorUtils.validateEntity(config);
|
||||
configService.updateById(config);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
configService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package com.controller;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
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 org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import com.annotation.IgnoreAuth;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.entity.ConfigEntity;
|
||||
import com.entity.EIException;
|
||||
import com.service.ConfigService;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 上传文件映射表
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("file")
|
||||
@SuppressWarnings({"unchecked","rawtypes"})
|
||||
public class FileController{
|
||||
@Autowired
|
||||
private ConfigService configService;
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
@RequestMapping("/upload")
|
||||
public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
|
||||
if (file.isEmpty()) {
|
||||
throw new EIException("上传文件不能为空");
|
||||
}
|
||||
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
|
||||
String fileName = new Date().getTime()+"."+fileExt;
|
||||
File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
|
||||
file.transferTo(dest);
|
||||
if(StringUtils.isNotBlank(type) && type.equals("1")) {
|
||||
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
|
||||
if(configEntity==null) {
|
||||
configEntity = new ConfigEntity();
|
||||
configEntity.setName("faceFile");
|
||||
configEntity.setValue(fileName);
|
||||
} else {
|
||||
configEntity.setValue(fileName);
|
||||
}
|
||||
configService.insertOrUpdate(configEntity);
|
||||
}
|
||||
return R.ok().put("file", fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/download")
|
||||
public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
|
||||
if (file.exists()) {
|
||||
response.reset();
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setHeader("Access-Control-Allow-Credentials", "true");
|
||||
response.setContentType("application/octet-stream; charset=UTF-8");
|
||||
IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.NewsEntity;
|
||||
import com.entity.view.NewsView;
|
||||
|
||||
import com.service.NewsService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 新闻资讯
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news")
|
||||
public class NewsController {
|
||||
@Autowired
|
||||
private NewsService newsService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,NewsEntity news,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
|
||||
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,NewsEntity news, HttpServletRequest request){
|
||||
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
|
||||
PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( NewsEntity news){
|
||||
EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( news, "news"));
|
||||
return R.ok().put("data", newsService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(NewsEntity news){
|
||||
EntityWrapper< NewsEntity> ew = new EntityWrapper< NewsEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( news, "news"));
|
||||
NewsView newsView = newsService.selectView(ew);
|
||||
return R.ok("查询新闻资讯成功").put("data", newsView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
NewsEntity news = newsService.selectById(id);
|
||||
return R.ok().put("data", news);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
NewsEntity news = newsService.selectById(id);
|
||||
return R.ok().put("data", news);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody NewsEntity news, HttpServletRequest request){
|
||||
news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(news);
|
||||
|
||||
newsService.insert(news);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody NewsEntity news, HttpServletRequest request){
|
||||
news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(news);
|
||||
|
||||
newsService.insert(news);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody NewsEntity news, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(news);
|
||||
newsService.updateById(news);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
newsService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<NewsEntity> wrapper = new EntityWrapper<NewsEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = newsService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,215 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.QiquanxinxiEntity;
|
||||
import com.entity.view.QiquanxinxiView;
|
||||
|
||||
import com.service.QiquanxinxiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 弃权信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/qiquanxinxi")
|
||||
public class QiquanxinxiController {
|
||||
@Autowired
|
||||
private QiquanxinxiService qiquanxinxiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,QiquanxinxiEntity qiquanxinxi,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
qiquanxinxi.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<QiquanxinxiEntity> ew = new EntityWrapper<QiquanxinxiEntity>();
|
||||
PageUtils page = qiquanxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, qiquanxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,QiquanxinxiEntity qiquanxinxi, HttpServletRequest request){
|
||||
EntityWrapper<QiquanxinxiEntity> ew = new EntityWrapper<QiquanxinxiEntity>();
|
||||
PageUtils page = qiquanxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, qiquanxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( QiquanxinxiEntity qiquanxinxi){
|
||||
EntityWrapper<QiquanxinxiEntity> ew = new EntityWrapper<QiquanxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( qiquanxinxi, "qiquanxinxi"));
|
||||
return R.ok().put("data", qiquanxinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(QiquanxinxiEntity qiquanxinxi){
|
||||
EntityWrapper< QiquanxinxiEntity> ew = new EntityWrapper< QiquanxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( qiquanxinxi, "qiquanxinxi"));
|
||||
QiquanxinxiView qiquanxinxiView = qiquanxinxiService.selectView(ew);
|
||||
return R.ok("查询弃权信息成功").put("data", qiquanxinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
QiquanxinxiEntity qiquanxinxi = qiquanxinxiService.selectById(id);
|
||||
return R.ok().put("data", qiquanxinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
QiquanxinxiEntity qiquanxinxi = qiquanxinxiService.selectById(id);
|
||||
return R.ok().put("data", qiquanxinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody QiquanxinxiEntity qiquanxinxi, HttpServletRequest request){
|
||||
qiquanxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(qiquanxinxi);
|
||||
|
||||
qiquanxinxiService.insert(qiquanxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody QiquanxinxiEntity qiquanxinxi, HttpServletRequest request){
|
||||
qiquanxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(qiquanxinxi);
|
||||
|
||||
qiquanxinxiService.insert(qiquanxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody QiquanxinxiEntity qiquanxinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(qiquanxinxi);
|
||||
qiquanxinxiService.updateById(qiquanxinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
qiquanxinxiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<QiquanxinxiEntity> wrapper = new EntityWrapper<QiquanxinxiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = qiquanxinxiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,221 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.SaiqianbianpaiEntity;
|
||||
import com.entity.view.SaiqianbianpaiView;
|
||||
|
||||
import com.service.SaiqianbianpaiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 赛前编排
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/saiqianbianpai")
|
||||
public class SaiqianbianpaiController {
|
||||
@Autowired
|
||||
private SaiqianbianpaiService saiqianbianpaiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,SaiqianbianpaiEntity saiqianbianpai,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
saiqianbianpai.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
saiqianbianpai.setZhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<SaiqianbianpaiEntity> ew = new EntityWrapper<SaiqianbianpaiEntity>();
|
||||
PageUtils page = saiqianbianpaiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saiqianbianpai), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,SaiqianbianpaiEntity saiqianbianpai, HttpServletRequest request){
|
||||
EntityWrapper<SaiqianbianpaiEntity> ew = new EntityWrapper<SaiqianbianpaiEntity>();
|
||||
PageUtils page = saiqianbianpaiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saiqianbianpai), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( SaiqianbianpaiEntity saiqianbianpai){
|
||||
EntityWrapper<SaiqianbianpaiEntity> ew = new EntityWrapper<SaiqianbianpaiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saiqianbianpai, "saiqianbianpai"));
|
||||
return R.ok().put("data", saiqianbianpaiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(SaiqianbianpaiEntity saiqianbianpai){
|
||||
EntityWrapper< SaiqianbianpaiEntity> ew = new EntityWrapper< SaiqianbianpaiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saiqianbianpai, "saiqianbianpai"));
|
||||
SaiqianbianpaiView saiqianbianpaiView = saiqianbianpaiService.selectView(ew);
|
||||
return R.ok("查询赛前编排成功").put("data", saiqianbianpaiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SaiqianbianpaiEntity saiqianbianpai = saiqianbianpaiService.selectById(id);
|
||||
return R.ok().put("data", saiqianbianpai);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
SaiqianbianpaiEntity saiqianbianpai = saiqianbianpaiService.selectById(id);
|
||||
return R.ok().put("data", saiqianbianpai);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SaiqianbianpaiEntity saiqianbianpai, HttpServletRequest request){
|
||||
saiqianbianpai.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saiqianbianpai);
|
||||
|
||||
saiqianbianpaiService.insert(saiqianbianpai);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody SaiqianbianpaiEntity saiqianbianpai, HttpServletRequest request){
|
||||
saiqianbianpai.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saiqianbianpai);
|
||||
|
||||
saiqianbianpaiService.insert(saiqianbianpai);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SaiqianbianpaiEntity saiqianbianpai, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(saiqianbianpai);
|
||||
saiqianbianpaiService.updateById(saiqianbianpai);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
saiqianbianpaiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<SaiqianbianpaiEntity> wrapper = new EntityWrapper<SaiqianbianpaiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = saiqianbianpaiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.SaiqiantongzhiEntity;
|
||||
import com.entity.view.SaiqiantongzhiView;
|
||||
|
||||
import com.service.SaiqiantongzhiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 赛前通知
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/saiqiantongzhi")
|
||||
public class SaiqiantongzhiController {
|
||||
@Autowired
|
||||
private SaiqiantongzhiService saiqiantongzhiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,SaiqiantongzhiEntity saiqiantongzhi,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<SaiqiantongzhiEntity> ew = new EntityWrapper<SaiqiantongzhiEntity>();
|
||||
PageUtils page = saiqiantongzhiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saiqiantongzhi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,SaiqiantongzhiEntity saiqiantongzhi, HttpServletRequest request){
|
||||
EntityWrapper<SaiqiantongzhiEntity> ew = new EntityWrapper<SaiqiantongzhiEntity>();
|
||||
PageUtils page = saiqiantongzhiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saiqiantongzhi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( SaiqiantongzhiEntity saiqiantongzhi){
|
||||
EntityWrapper<SaiqiantongzhiEntity> ew = new EntityWrapper<SaiqiantongzhiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saiqiantongzhi, "saiqiantongzhi"));
|
||||
return R.ok().put("data", saiqiantongzhiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(SaiqiantongzhiEntity saiqiantongzhi){
|
||||
EntityWrapper< SaiqiantongzhiEntity> ew = new EntityWrapper< SaiqiantongzhiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saiqiantongzhi, "saiqiantongzhi"));
|
||||
SaiqiantongzhiView saiqiantongzhiView = saiqiantongzhiService.selectView(ew);
|
||||
return R.ok("查询赛前通知成功").put("data", saiqiantongzhiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SaiqiantongzhiEntity saiqiantongzhi = saiqiantongzhiService.selectById(id);
|
||||
return R.ok().put("data", saiqiantongzhi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
SaiqiantongzhiEntity saiqiantongzhi = saiqiantongzhiService.selectById(id);
|
||||
return R.ok().put("data", saiqiantongzhi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SaiqiantongzhiEntity saiqiantongzhi, HttpServletRequest request){
|
||||
saiqiantongzhi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saiqiantongzhi);
|
||||
|
||||
saiqiantongzhiService.insert(saiqiantongzhi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody SaiqiantongzhiEntity saiqiantongzhi, HttpServletRequest request){
|
||||
saiqiantongzhi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saiqiantongzhi);
|
||||
|
||||
saiqiantongzhiService.insert(saiqiantongzhi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SaiqiantongzhiEntity saiqiantongzhi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(saiqiantongzhi);
|
||||
saiqiantongzhiService.updateById(saiqiantongzhi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
saiqiantongzhiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<SaiqiantongzhiEntity> wrapper = new EntityWrapper<SaiqiantongzhiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
|
||||
int count = saiqiantongzhiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,221 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.SaishichengjiEntity;
|
||||
import com.entity.view.SaishichengjiView;
|
||||
|
||||
import com.service.SaishichengjiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 赛事成绩
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/saishichengji")
|
||||
public class SaishichengjiController {
|
||||
@Autowired
|
||||
private SaishichengjiService saishichengjiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,SaishichengjiEntity saishichengji,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
saishichengji.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
saishichengji.setZhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<SaishichengjiEntity> ew = new EntityWrapper<SaishichengjiEntity>();
|
||||
PageUtils page = saishichengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saishichengji), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,SaishichengjiEntity saishichengji, HttpServletRequest request){
|
||||
EntityWrapper<SaishichengjiEntity> ew = new EntityWrapper<SaishichengjiEntity>();
|
||||
PageUtils page = saishichengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saishichengji), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( SaishichengjiEntity saishichengji){
|
||||
EntityWrapper<SaishichengjiEntity> ew = new EntityWrapper<SaishichengjiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saishichengji, "saishichengji"));
|
||||
return R.ok().put("data", saishichengjiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(SaishichengjiEntity saishichengji){
|
||||
EntityWrapper< SaishichengjiEntity> ew = new EntityWrapper< SaishichengjiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saishichengji, "saishichengji"));
|
||||
SaishichengjiView saishichengjiView = saishichengjiService.selectView(ew);
|
||||
return R.ok("查询赛事成绩成功").put("data", saishichengjiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SaishichengjiEntity saishichengji = saishichengjiService.selectById(id);
|
||||
return R.ok().put("data", saishichengji);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
SaishichengjiEntity saishichengji = saishichengjiService.selectById(id);
|
||||
return R.ok().put("data", saishichengji);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SaishichengjiEntity saishichengji, HttpServletRequest request){
|
||||
saishichengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saishichengji);
|
||||
|
||||
saishichengjiService.insert(saishichengji);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody SaishichengjiEntity saishichengji, HttpServletRequest request){
|
||||
saishichengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saishichengji);
|
||||
|
||||
saishichengjiService.insert(saishichengji);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SaishichengjiEntity saishichengji, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(saishichengji);
|
||||
saishichengjiService.updateById(saishichengji);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
saishichengjiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<SaishichengjiEntity> wrapper = new EntityWrapper<SaishichengjiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = saishichengjiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,221 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.SaizhongxinxiEntity;
|
||||
import com.entity.view.SaizhongxinxiView;
|
||||
|
||||
import com.service.SaizhongxinxiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 赛中信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/saizhongxinxi")
|
||||
public class SaizhongxinxiController {
|
||||
@Autowired
|
||||
private SaizhongxinxiService saizhongxinxiService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,SaizhongxinxiEntity saizhongxinxi,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
saizhongxinxi.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
saizhongxinxi.setZhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<SaizhongxinxiEntity> ew = new EntityWrapper<SaizhongxinxiEntity>();
|
||||
PageUtils page = saizhongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saizhongxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,SaizhongxinxiEntity saizhongxinxi, HttpServletRequest request){
|
||||
EntityWrapper<SaizhongxinxiEntity> ew = new EntityWrapper<SaizhongxinxiEntity>();
|
||||
PageUtils page = saizhongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, saizhongxinxi), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( SaizhongxinxiEntity saizhongxinxi){
|
||||
EntityWrapper<SaizhongxinxiEntity> ew = new EntityWrapper<SaizhongxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saizhongxinxi, "saizhongxinxi"));
|
||||
return R.ok().put("data", saizhongxinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(SaizhongxinxiEntity saizhongxinxi){
|
||||
EntityWrapper< SaizhongxinxiEntity> ew = new EntityWrapper< SaizhongxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( saizhongxinxi, "saizhongxinxi"));
|
||||
SaizhongxinxiView saizhongxinxiView = saizhongxinxiService.selectView(ew);
|
||||
return R.ok("查询赛中信息成功").put("data", saizhongxinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SaizhongxinxiEntity saizhongxinxi = saizhongxinxiService.selectById(id);
|
||||
return R.ok().put("data", saizhongxinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
SaizhongxinxiEntity saizhongxinxi = saizhongxinxiService.selectById(id);
|
||||
return R.ok().put("data", saizhongxinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SaizhongxinxiEntity saizhongxinxi, HttpServletRequest request){
|
||||
saizhongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saizhongxinxi);
|
||||
|
||||
saizhongxinxiService.insert(saizhongxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody SaizhongxinxiEntity saizhongxinxi, HttpServletRequest request){
|
||||
saizhongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(saizhongxinxi);
|
||||
|
||||
saizhongxinxiService.insert(saizhongxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SaizhongxinxiEntity saizhongxinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(saizhongxinxi);
|
||||
saizhongxinxiService.updateById(saizhongxinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
saizhongxinxiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<SaizhongxinxiEntity> wrapper = new EntityWrapper<SaizhongxinxiEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
if(tableName.equals("caipanyuan")) {
|
||||
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = saizhongxinxiService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,215 @@
|
||||
package com.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.TeshuduiyuanEntity;
|
||||
import com.entity.view.TeshuduiyuanView;
|
||||
|
||||
import com.service.TeshuduiyuanService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 特殊队员
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/teshuduiyuan")
|
||||
public class TeshuduiyuanController {
|
||||
@Autowired
|
||||
private TeshuduiyuanService teshuduiyuanService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,TeshuduiyuanEntity teshuduiyuan,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
teshuduiyuan.setDuiyuanzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<TeshuduiyuanEntity> ew = new EntityWrapper<TeshuduiyuanEntity>();
|
||||
PageUtils page = teshuduiyuanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, teshuduiyuan), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,TeshuduiyuanEntity teshuduiyuan, HttpServletRequest request){
|
||||
EntityWrapper<TeshuduiyuanEntity> ew = new EntityWrapper<TeshuduiyuanEntity>();
|
||||
PageUtils page = teshuduiyuanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, teshuduiyuan), params), params));
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( TeshuduiyuanEntity teshuduiyuan){
|
||||
EntityWrapper<TeshuduiyuanEntity> ew = new EntityWrapper<TeshuduiyuanEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( teshuduiyuan, "teshuduiyuan"));
|
||||
return R.ok().put("data", teshuduiyuanService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(TeshuduiyuanEntity teshuduiyuan){
|
||||
EntityWrapper< TeshuduiyuanEntity> ew = new EntityWrapper< TeshuduiyuanEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( teshuduiyuan, "teshuduiyuan"));
|
||||
TeshuduiyuanView teshuduiyuanView = teshuduiyuanService.selectView(ew);
|
||||
return R.ok("查询特殊队员成功").put("data", teshuduiyuanView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
TeshuduiyuanEntity teshuduiyuan = teshuduiyuanService.selectById(id);
|
||||
return R.ok().put("data", teshuduiyuan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
TeshuduiyuanEntity teshuduiyuan = teshuduiyuanService.selectById(id);
|
||||
return R.ok().put("data", teshuduiyuan);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody TeshuduiyuanEntity teshuduiyuan, HttpServletRequest request){
|
||||
teshuduiyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(teshuduiyuan);
|
||||
|
||||
teshuduiyuanService.insert(teshuduiyuan);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody TeshuduiyuanEntity teshuduiyuan, HttpServletRequest request){
|
||||
teshuduiyuan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(teshuduiyuan);
|
||||
|
||||
teshuduiyuanService.insert(teshuduiyuan);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody TeshuduiyuanEntity teshuduiyuan, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(teshuduiyuan);
|
||||
teshuduiyuanService.updateById(teshuduiyuan);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
teshuduiyuanService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提醒接口
|
||||
*/
|
||||
@RequestMapping("/remind/{columnName}/{type}")
|
||||
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
|
||||
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
|
||||
map.put("column", columnName);
|
||||
map.put("type", type);
|
||||
|
||||
if(type.equals("2")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date remindStartDate = null;
|
||||
Date remindEndDate = null;
|
||||
if(map.get("remindstart")!=null) {
|
||||
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindStart);
|
||||
remindStartDate = c.getTime();
|
||||
map.put("remindstart", sdf.format(remindStartDate));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
|
||||
c.setTime(new Date());
|
||||
c.add(Calendar.DAY_OF_MONTH,remindEnd);
|
||||
remindEndDate = c.getTime();
|
||||
map.put("remindend", sdf.format(remindEndDate));
|
||||
}
|
||||
}
|
||||
|
||||
Wrapper<TeshuduiyuanEntity> wrapper = new EntityWrapper<TeshuduiyuanEntity>();
|
||||
if(map.get("remindstart")!=null) {
|
||||
wrapper.ge(columnName, map.get("remindstart"));
|
||||
}
|
||||
if(map.get("remindend")!=null) {
|
||||
wrapper.le(columnName, map.get("remindend"));
|
||||
}
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("duiyuan")) {
|
||||
wrapper.eq("duiyuanzhanghao", (String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
|
||||
int count = teshuduiyuanService.selectCount(wrapper);
|
||||
return R.ok().put("count", count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.BisaibaomingEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.BisaibaomingVO;
|
||||
import com.entity.view.BisaibaomingView;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛报名
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface BisaibaomingDao extends BaseMapper<BisaibaomingEntity> {
|
||||
|
||||
List<BisaibaomingVO> selectListVO(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
BisaibaomingVO selectVO(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
List<BisaibaomingView> selectListView(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
List<BisaibaomingView> selectListView(Pagination page,@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
BisaibaomingView selectView(@Param("ew") Wrapper<BisaibaomingEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.BisaixiangmuEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.BisaixiangmuVO;
|
||||
import com.entity.view.BisaixiangmuView;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛项目
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface BisaixiangmuDao extends BaseMapper<BisaixiangmuEntity> {
|
||||
|
||||
List<BisaixiangmuVO> selectListVO(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
BisaixiangmuVO selectVO(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
List<BisaixiangmuView> selectListView(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
List<BisaixiangmuView> selectListView(Pagination page,@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
BisaixiangmuView selectView(@Param("ew") Wrapper<BisaixiangmuEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.BisaixinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.BisaixinxiVO;
|
||||
import com.entity.view.BisaixinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 比赛信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface BisaixinxiDao extends BaseMapper<BisaixinxiEntity> {
|
||||
|
||||
List<BisaixinxiVO> selectListVO(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
BisaixinxiVO selectVO(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
List<BisaixinxiView> selectListView(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
List<BisaixinxiView> selectListView(Pagination page,@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
BisaixinxiView selectView(@Param("ew") Wrapper<BisaixinxiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.CaipanyuanEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.CaipanyuanVO;
|
||||
import com.entity.view.CaipanyuanView;
|
||||
|
||||
|
||||
/**
|
||||
* 裁判员
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface CaipanyuanDao extends BaseMapper<CaipanyuanEntity> {
|
||||
|
||||
List<CaipanyuanVO> selectListVO(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
CaipanyuanVO selectVO(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
List<CaipanyuanView> selectListView(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
List<CaipanyuanView> selectListView(Pagination page,@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
CaipanyuanView selectView(@Param("ew") Wrapper<CaipanyuanEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 通用接口
|
||||
*/
|
||||
public interface CommonDao{
|
||||
List<String> getOption(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> getFollowByOption(Map<String, Object> params);
|
||||
|
||||
List<String> getFollowByOption2(Map<String, Object> params);
|
||||
|
||||
void sh(Map<String, Object> params);
|
||||
|
||||
int remindCount(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> selectCal(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectGroup(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectValue(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.entity.ConfigEntity;
|
||||
|
||||
/**
|
||||
* 配置
|
||||
*/
|
||||
public interface ConfigDao extends BaseMapper<ConfigEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.DuiyuanEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.DuiyuanVO;
|
||||
import com.entity.view.DuiyuanView;
|
||||
|
||||
|
||||
/**
|
||||
* 队员
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface DuiyuanDao extends BaseMapper<DuiyuanEntity> {
|
||||
|
||||
List<DuiyuanVO> selectListVO(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
DuiyuanVO selectVO(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
List<DuiyuanView> selectListView(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
List<DuiyuanView> selectListView(Pagination page,@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
DuiyuanView selectView(@Param("ew") Wrapper<DuiyuanEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.NewsEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.NewsVO;
|
||||
import com.entity.view.NewsView;
|
||||
|
||||
|
||||
/**
|
||||
* 新闻资讯
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface NewsDao extends BaseMapper<NewsEntity> {
|
||||
|
||||
List<NewsVO> selectListVO(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
List<NewsView> selectListView(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
List<NewsView> selectListView(Pagination page,@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.QiquanxinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.QiquanxinxiVO;
|
||||
import com.entity.view.QiquanxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 弃权信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface QiquanxinxiDao extends BaseMapper<QiquanxinxiEntity> {
|
||||
|
||||
List<QiquanxinxiVO> selectListVO(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
QiquanxinxiVO selectVO(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
List<QiquanxinxiView> selectListView(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
List<QiquanxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
QiquanxinxiView selectView(@Param("ew") Wrapper<QiquanxinxiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.SaiqianbianpaiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.SaiqianbianpaiVO;
|
||||
import com.entity.view.SaiqianbianpaiView;
|
||||
|
||||
|
||||
/**
|
||||
* 赛前编排
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface SaiqianbianpaiDao extends BaseMapper<SaiqianbianpaiEntity> {
|
||||
|
||||
List<SaiqianbianpaiVO> selectListVO(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
SaiqianbianpaiVO selectVO(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
List<SaiqianbianpaiView> selectListView(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
List<SaiqianbianpaiView> selectListView(Pagination page,@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
SaiqianbianpaiView selectView(@Param("ew") Wrapper<SaiqianbianpaiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.SaiqiantongzhiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.SaiqiantongzhiVO;
|
||||
import com.entity.view.SaiqiantongzhiView;
|
||||
|
||||
|
||||
/**
|
||||
* 赛前通知
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface SaiqiantongzhiDao extends BaseMapper<SaiqiantongzhiEntity> {
|
||||
|
||||
List<SaiqiantongzhiVO> selectListVO(@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
SaiqiantongzhiVO selectVO(@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
List<SaiqiantongzhiView> selectListView(@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
List<SaiqiantongzhiView> selectListView(Pagination page,@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
SaiqiantongzhiView selectView(@Param("ew") Wrapper<SaiqiantongzhiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.SaishichengjiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.SaishichengjiVO;
|
||||
import com.entity.view.SaishichengjiView;
|
||||
|
||||
|
||||
/**
|
||||
* 赛事成绩
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface SaishichengjiDao extends BaseMapper<SaishichengjiEntity> {
|
||||
|
||||
List<SaishichengjiVO> selectListVO(@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
SaishichengjiVO selectVO(@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
List<SaishichengjiView> selectListView(@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
List<SaishichengjiView> selectListView(Pagination page,@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
SaishichengjiView selectView(@Param("ew") Wrapper<SaishichengjiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.SaizhongxinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.SaizhongxinxiVO;
|
||||
import com.entity.view.SaizhongxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 赛中信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface SaizhongxinxiDao extends BaseMapper<SaizhongxinxiEntity> {
|
||||
|
||||
List<SaizhongxinxiVO> selectListVO(@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
SaizhongxinxiVO selectVO(@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
List<SaizhongxinxiView> selectListView(@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
List<SaizhongxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
SaizhongxinxiView selectView(@Param("ew") Wrapper<SaizhongxinxiEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.TeshuduiyuanEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.TeshuduiyuanVO;
|
||||
import com.entity.view.TeshuduiyuanView;
|
||||
|
||||
|
||||
/**
|
||||
* 特殊队员
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-24 19:14:37
|
||||
*/
|
||||
public interface TeshuduiyuanDao extends BaseMapper<TeshuduiyuanEntity> {
|
||||
|
||||
List<TeshuduiyuanVO> selectListVO(@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
TeshuduiyuanVO selectVO(@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
List<TeshuduiyuanView> selectListView(@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
List<TeshuduiyuanView> selectListView(Pagination page,@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
TeshuduiyuanView selectView(@Param("ew") Wrapper<TeshuduiyuanEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.TokenEntity;
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
public interface TokenDao extends BaseMapper<TokenEntity> {
|
||||
|
||||
List<TokenEntity> selectListView(@Param("ew") Wrapper<TokenEntity> wrapper);
|
||||
|
||||
List<TokenEntity> selectListView(Pagination page,@Param("ew") Wrapper<TokenEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.UserEntity;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
public interface UserDao extends BaseMapper<UserEntity> {
|
||||
|
||||
List<UserEntity> selectListView(@Param("ew") Wrapper<UserEntity> wrapper);
|
||||
|
||||
List<UserEntity> selectListView(Pagination page,@Param("ew") Wrapper<UserEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
|
||||
/**
|
||||
* 类说明 :
|
||||
*/
|
||||
@TableName("config")
|
||||
public class ConfigEntity implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* key
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* value
|
||||
*/
|
||||
private String value;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
|
||||
package com.entity;
|
||||
|
||||
/**
|
||||
* 自定义异常
|
||||
*/
|
||||
public class EIException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String msg;
|
||||
private int code = 500;
|
||||
|
||||
public EIException(String msg) {
|
||||
super(msg);
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public EIException(String msg, Throwable e) {
|
||||
super(msg, e);
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public EIException(String msg, int code) {
|
||||
super(msg);
|
||||
this.msg = msg;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public EIException(String msg, int code, Throwable e) {
|
||||
super(msg, e);
|
||||
this.msg = msg;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
package com.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
|
||||
/**
|
||||
* token表
|
||||
*/
|
||||
@TableName("token")
|
||||
public class TokenEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userid;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String tablename;
|
||||
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
private String token;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private Date expiratedtime;
|
||||
|
||||
/**
|
||||
* 新增时间
|
||||
*/
|
||||
private Date addtime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void setUserid(Long userid) {
|
||||
this.userid = userid;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public String getTablename() {
|
||||
return tablename;
|
||||
}
|
||||
|
||||
public void setTablename(String tablename) {
|
||||
this.tablename = tablename;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public Date getExpiratedtime() {
|
||||
return expiratedtime;
|
||||
}
|
||||
|
||||
public void setExpiratedtime(Date expiratedtime) {
|
||||
this.expiratedtime = expiratedtime;
|
||||
}
|
||||
|
||||
public Date getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public void setAddtime(Date addtime) {
|
||||
this.addtime = addtime;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public TokenEntity(Long userid, String username, String tablename,String role, String token, Date expiratedtime) {
|
||||
super();
|
||||
this.userid = userid;
|
||||
this.username = username;
|
||||
this.tablename = tablename;
|
||||
this.role = role;
|
||||
this.token = token;
|
||||
this.expiratedtime = expiratedtime;
|
||||
}
|
||||
|
||||
public TokenEntity() {
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package com.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
@TableName("users")
|
||||
public class UserEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String role;
|
||||
|
||||
private Date addtime;
|
||||
|
||||
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 getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public Date getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public void setAddtime(Date addtime) {
|
||||
this.addtime = addtime;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue