初始化官网

master
ymnets 5 months ago
parent 0a81b03e17
commit 25adc3f45f

@ -2,6 +2,10 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/JAVA_MYSQL_HCJXJY/jxjy-business/jxjy-business.iml" filepath="$PROJECT_DIR$/JAVA_MYSQL_HCJXJY/jxjy-business/jxjy-business.iml" />
<module fileurl="file://$PROJECT_DIR$/JAVA_MYSQL_HCJXJY/jxjy-core/jxjy-core.iml" filepath="$PROJECT_DIR$/JAVA_MYSQL_HCJXJY/jxjy-core/jxjy-core.iml" />
<module fileurl="file://$PROJECT_DIR$/JAVA_MYSQL_HCJXJY/jxjy-education.iml" filepath="$PROJECT_DIR$/JAVA_MYSQL_HCJXJY/jxjy-education.iml" />
<module fileurl="file://$PROJECT_DIR$/JAVA_MYSQL_HCJXJY/jxjy-web/jxjy-web.iml" filepath="$PROJECT_DIR$/JAVA_MYSQL_HCJXJY/jxjy-web/jxjy-web.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/政采.iml" filepath="$PROJECT_DIR$/.idea/政采.iml" />
</modules>
</component>

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_X">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="gp-core" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.2.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.37" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.20.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:23.0" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.0.18" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
<orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.29" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okhttp3:okhttp:3.14.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.1.2" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.4" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.4" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper:4.0.4" level="project" />
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.9" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.9" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.7" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
<orderEntry type="library" name="Maven: com.auth0:java-jwt:3.3.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.3.11" level="project" />
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.11" level="project" />
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.8.RELEASE" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
<orderEntry type="library" name="Maven: com.spring4all:swagger-spring-boot-starter:1.9.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.13" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
</component>
</module>

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.hc</groupId>
<artifactId>gpwebv2</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>gp-business</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>gp-business</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>com.hc</groupId>
<artifactId>gp-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

@ -0,0 +1,26 @@
package com.hc.gpbusiness.dto;
import lombok.Data;
import java.util.List;
@Data
public class ModulesDto {
private Integer moduleId;
private Integer parentId;
private String moduleName;
private Integer moduleType;
private Integer moduleIndex;
private Long createTime;
private Long updateTime;
private List<ModulesDto> childModuleType;
}

@ -0,0 +1,19 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.Banner;
import com.hc.gpcore.utils.tk.mapper.Mapper;
import org.springframework.stereotype.Repository;
/**
* 广
* (Banner)访
*
* @author java
* @since 2020-07-29 16:23:02
*/
@Repository
public interface BannerMapper extends Mapper<Banner> {
}

@ -0,0 +1,17 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.CourseChapterAnnex;
import com.hc.gpcore.utils.tk.mapper.Mapper;
import org.springframework.stereotype.Repository;
/**
* (CourseChapterAnnex)访
*
* @author java
* @since 2020-07-29 16:23:07
*/
@Repository
public interface CourseChapterAnnexMapper extends Mapper<CourseChapterAnnex> {
}

@ -0,0 +1,27 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.CourseChapter;
import com.hc.gpcore.utils.tk.mapper.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* (CourseChapter)访
*
* @author java
* @since 2020-07-29 16:23:06
*/
@Repository
public interface CourseChapterMapper extends Mapper<CourseChapter> {
/**
* id
*
* @param courseId id
* @return
*/
List<CourseChapter> queryByCourseId(Integer courseId);
}

@ -0,0 +1,16 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.CourseChapterTag;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
/**
* (CourseChapterTag)访
*
* @author java
* @since 2020-07-29 16:23:07
*/
@Repository
public interface CourseChapterTagMapper extends Mapper<CourseChapterTag> {
}

@ -0,0 +1,16 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.CourseChapterTest;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
/**
* /(CourseChapterTest)访
*
* @author java
* @since 2020-07-29 16:23:08
*/
@Repository
public interface CourseChapterTestMapper extends Mapper<CourseChapterTest> {
}

@ -0,0 +1,27 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.CourseChapterVideo;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
import java.util.List;
/**
* (CourseChapterVideo)访
*
* @author java
* @since 2020-07-29 16:23:08
*/
@Repository
public interface CourseChapterVideoMapper extends Mapper<CourseChapterVideo> {
/**
*
*
* @param chapterId id
* @return
*/
List<CourseChapterVideo> queryByChapterId(Integer chapterId);
}

@ -0,0 +1,28 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.Course;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
import java.util.List;
/**
* (Course)访
*
* @author java
* @since 2020-07-29 16:23:06
*/
@Repository
public interface CourseMapper extends Mapper<Course> {
/**
* moduleId
*
* @param moduleId id
* @return
*/
List<Course> queryByModuleId(Integer moduleId);
}

@ -0,0 +1,16 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.CourseTagCollection;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
/**
* (CourseTagCollection)访
*
* @author java
* @since 2020-07-29 16:23:09
*/
@Repository
public interface CourseTagCollectionMapper extends Mapper<CourseTagCollection> {
}

@ -0,0 +1,16 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.CourseTag;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
/**
* (CourseTag)访
*
* @author java
* @since 2020-07-29 16:23:08
*/
@Repository
public interface CourseTagMapper extends Mapper<CourseTag> {
}

@ -0,0 +1,29 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.dto.ModulesDto;
import com.hc.gpbusiness.model.Modules;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
import java.util.List;
/**
* (Module)访
*
* @author java
* @since 2020-07-29 16:23:10
*/
@Repository
public interface ModulesMapper extends Mapper<Modules> {
/**
* id modules
*
* @param parentId id
* @return
*/
List<ModulesDto> queryByParentId(Integer parentId);
}

@ -0,0 +1,16 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.NewsHistory;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
/**
* (NewsHistory)访
*
* @author java
* @since 2020-07-29 16:23:11
*/
@Repository
public interface NewsHistoryMapper extends Mapper<NewsHistory> {
}

@ -0,0 +1,28 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.News;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
import java.util.List;
/**
*
* (News)访
*
* @author java
* @since 2020-07-29 16:23:10
*/
@Repository
public interface NewsMapper extends Mapper<News> {
/**
* moduleId
*
* @param moduleId id
* @return
*/
List<News> queryNewsByModuleId(Integer moduleId);
}

@ -0,0 +1,16 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.NewsTagCollection;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
/**
* (NewsTagCollection)访
*
* @author java
* @since 2020-07-29 16:23:12
*/
@Repository
public interface NewsTagCollectionMapper extends Mapper<NewsTagCollection> {
}

@ -0,0 +1,16 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.NewsTag;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
/**
* (NewsTag)访
*
* @author java
* @since 2020-07-29 16:23:11
*/
@Repository
public interface NewsTagMapper extends Mapper<NewsTag> {
}

@ -0,0 +1,27 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.UserAdmin;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
import java.util.List;
/**
* (UserAdmin)访
*
* @author java
* @since 2020-07-29 16:23:13
*/
@Repository
public interface UserAdminMapper extends Mapper<UserAdmin> {
/**
*
*
* @param adminAccount
* @return
*/
List<UserAdmin> selectAdminByAdminAccount(String adminAccount);
}

@ -0,0 +1,16 @@
package com.hc.gpbusiness.mapper;
import com.hc.gpbusiness.model.User;
import org.springframework.stereotype.Repository;
import com.hc.gpcore.utils.tk.mapper.Mapper;
/**
* (User)访
*
* @author java
* @since 2020-07-29 16:23:12
*/
@Repository
public interface UserMapper extends Mapper<User> {
}

@ -0,0 +1,59 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* 广
* (Banner)
*
* @author java
* @since 2020-07-29 17:28:23
*/
@Builder
@Data
public class Banner implements Serializable {
private static final long serialVersionUID = 616327737880757755L;
/**
* ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "ID主键")
private Integer bannerId;
/**
*
*/
@ApiModelProperty(value = "地址", required = true)
private String bannerUrl;
/**
*
*/
@ApiModelProperty(value = "索引", required = true)
private Integer bannerIndex;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,111 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (Course)
*
* @author java
* @since 2020-07-29 17:28:23
*/
@Builder
@Data
public class Course implements Serializable {
private static final long serialVersionUID = 749521682797285061L;
/**
* ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键ID")
private Integer courseId;
/**
*
*/
@ApiModelProperty(value = "课程名称", required = true)
private String courseName;
/**
*
*/
@ApiModelProperty(value = "图标", required = true)
private String courseLogo;
/**
*
*/
@ApiModelProperty(value = "老师介绍是否可见", required = true)
private Integer courseTeacherVisible;
/**
*
*/
@ApiModelProperty(value = "章节是否可见", required = true)
private Integer courseChapterVisible;
/**
*
*/
@ApiModelProperty(value = "介绍是否可见", required = true)
private Integer courseDescVisible;
/**
*
*/
@ApiModelProperty(value = "课程介绍", required = true)
private String courseDesc;
/**
*
*/
@ApiModelProperty(value = "课程时长", required = true)
private Float courseHours;
/**
*
*/
@ApiModelProperty(value = "教师", required = true)
private String courseTeacher;
/**
*
*/
@ApiModelProperty(value = "课程是否上架。下架后不可见", required = true)
private Integer isValid;
/**
*
*/
@ApiModelProperty(value = "如果有多张详情图,相册", required = true)
private String gallery;
/**
*
*/
@ApiModelProperty(value = "课程所属板块表", required = true)
private Integer moduleId;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,69 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (CourseChapter)
*
* @author java
* @since 2020-07-29 17:28:23
*/
@Builder
@Data
public class CourseChapter implements Serializable {
private static final long serialVersionUID = -19353598448976927L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键id")
private Integer courseChapterId;
/**
*
*/
@ApiModelProperty(value = "章节名字", required = true)
private String chapterName;
/**
* ID
*/
@ApiModelProperty(value = "父节点ID", required = true)
private Integer parentId;
/**
*
*/
@ApiModelProperty(value = "章节层级", required = true)
private Integer chapterLevel;
/**
* ID
*/
@ApiModelProperty(value = "课程ID", required = true)
private Integer courseId;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,69 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (CourseChapterAnnex)
*
* @author java
* @since 2020-07-29 17:28:23
*/
@Builder
@Data
public class CourseChapterAnnex implements Serializable {
private static final long serialVersionUID = 481844161933884385L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键id")
private Integer courseChapterAnnexId;
/**
*
*/
@ApiModelProperty(value = "附件名字", required = true)
private String annexName;
/**
* ID
*/
@ApiModelProperty(value = "章节ID", required = true)
private Integer courseChapterId;
/**
*
*/
@ApiModelProperty(value = "介绍", required = true)
private String annexIntroduction;
/**
*
*/
@ApiModelProperty(value = "附件地址", required = true)
private String annexUrl;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,63 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (CourseChapterTag)
*
* @author java
* @since 2020-07-29 17:28:23
*/
@Builder
@Data
public class CourseChapterTag implements Serializable {
private static final long serialVersionUID = -58319150173298367L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键id")
private Integer tagId;
/**
*
*/
@ApiModelProperty(value = "标签名", required = true)
private String tagName;
/**
*
*/
@ApiModelProperty(value = "显示索引", required = true)
private Integer tagIndex;
/**
* ID
*/
@ApiModelProperty(value = "章节ID", required = true)
private Integer courseChapterId;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,51 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* /(CourseChapterTest)
*
* @author java
* @since 2020-07-29 17:28:23
*/
@Builder
@Data
public class CourseChapterTest implements Serializable {
private static final long serialVersionUID = -96480269731831437L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键id")
private Integer testId;
/**
* id
*/
@ApiModelProperty(value = "习题id", required = true)
private Integer questionId;
/**
* id.0
*/
@ApiModelProperty(value = "章节id.目前得系统部分章节默认0", required = true)
private Integer chapterId;
/**
* ID
*/
@ApiModelProperty(value = "课程ID。目前得随堂练习都是配置在图书下得", required = true)
private Integer courseId;
}

@ -0,0 +1,79 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (CourseChapterVideo)
*
* @author java
* @since 2020-07-29 17:28:23
*/
@Builder
@Data
public class CourseChapterVideo implements Serializable {
private static final long serialVersionUID = 219725579098381488L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键id")
private Integer videoId;
/**
* idID=NULL
*/
@ApiModelProperty(value = "章节id目前视频直接配置在课程下允许章节ID=NULL", required = true)
private Integer courseChapterId;
/**
*
*/
@ApiModelProperty(value = "视频名称", required = true)
private String videoName;
/**
*
*/
@ApiModelProperty(value = "视频地址", required = true)
private String videoUrl;
@ApiModelProperty(value = "${column.comment}", required = true)
private String videoOriUrl;
/**
*
*/
@ApiModelProperty(value = "是否精品课程,精品课程允许试看", required = true)
private Integer isFree;
/**
*
*/
@ApiModelProperty(value = "试看时间,分钟", required = true)
private Integer freeTime;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,57 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (CourseTag)
*
* @author java
* @since 2020-07-29 17:28:23
*/
@Builder
@Data
public class CourseTag implements Serializable {
private static final long serialVersionUID = 170290086943577317L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键id")
private Integer tagId;
/**
*
*/
@ApiModelProperty(value = "标签名称", required = true)
private String tagName;
/**
* ID
*/
@ApiModelProperty(value = "板块ID", required = true)
private Integer moduleId;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,45 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (CourseTagCollection)
*
* @author java
* @since 2020-07-29 17:28:24
*/
@Builder
@Data
public class CourseTagCollection implements Serializable {
private static final long serialVersionUID = -46653580285753544L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键id", required = true)
private Integer collectionId;
/**
* tag id
*/
@ApiModelProperty(value = "新闻tag id", required = true)
private Integer tagId;
/**
* ID
*/
@ApiModelProperty(value = "课程ID", required = true)
private Integer courseId;
}

@ -0,0 +1,72 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.List;
/**
* (Module)
*
* @author java
* @since 2020-07-29 17:28:24
*/
@Builder
@Data
public class Modules implements Serializable {
private static final long serialVersionUID = -22327544394038593L;
/**
* ids
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "板块表id")
private Integer moduleId;
/**
* Id0
*/
@ApiModelProperty(value = "父板块节点Id。0表示第一级板块", required = true)
private Integer parentId;
/**
*
*/
@ApiModelProperty(value = "板块名字", required = true)
private String moduleName;
/**
* 12
*/
@ApiModelProperty(value = "板块类型12表示新闻视频", required = true)
private Integer moduleType;
/**
*
*/
@ApiModelProperty(value = "模块得索引,保留", required = true)
private Integer moduleIndex;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,70 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
*
* (News)
*
* @author java
* @since 2020-07-29 17:28:24
*/
@Builder
@Data
public class News implements Serializable {
private static final long serialVersionUID = 485489852911503744L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "新闻id")
private Integer newsId;
/**
*
*/
@ApiModelProperty(value = "鏍囬", required = true)
private String newsTitle;
/**
* Logo
*/
@ApiModelProperty(value = "鏂伴椈Logo", required = true)
private String newsLogo;
/**
*
*/
@ApiModelProperty(value = "新闻内容", required = true)
private String newsContent;
/**
*
*/
@ApiModelProperty(value = "新闻所属板块", required = true)
private Integer moduleId;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,63 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (NewsHistory)
*
* @author java
* @since 2020-07-29 17:28:24
*/
@Builder
@Data
public class NewsHistory implements Serializable {
private static final long serialVersionUID = -84251348332107794L;
/**
*
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键")
private Integer historyId;
/**
* ID
*/
@ApiModelProperty(value = "用户ID", required = true)
private Integer userId;
/**
* 01
*/
@ApiModelProperty(value = "01点评转发", required = true)
private Integer opType;
/**
*
*/
@ApiModelProperty(value = "点评或者转发得内容", required = true)
private String opContent;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,57 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (NewsTag)
*
* @author java
* @since 2020-07-29 17:28:24
*/
@Builder
@Data
public class NewsTag implements Serializable {
private static final long serialVersionUID = -54401004133126215L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "新闻标签id")
private Integer tagId;
/**
*
*/
@ApiModelProperty(value = "标签名称", required = true)
private String tagName;
/**
* ID
*/
@ApiModelProperty(value = "板块ID", required = true)
private Integer moduleId;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,45 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (NewsTagCollection)
*
* @author java
* @since 2020-07-29 17:28:24
*/
@Builder
@Data
public class NewsTagCollection implements Serializable {
private static final long serialVersionUID = -65633173510831046L;
/**
*
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键")
private Integer collectionId;
/**
* tag id
*/
@ApiModelProperty(value = "新闻tag id", required = true)
private Integer tagId;
/**
* ID
*/
@ApiModelProperty(value = "新闻ID", required = true)
private Integer newsId;
}

@ -0,0 +1,99 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (User)
*
* @author java
* @since 2020-07-29 17:28:24
*/
@Builder
@Data
public class User implements Serializable {
private static final long serialVersionUID = -38876657990073810L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键id")
private Integer userId;
/**
*
*/
@ApiModelProperty(value = "身份账号", required = true)
private String cardId;
/**
*
*/
@ApiModelProperty(value = "用户登陆账号", required = true)
private String userAccount;
/**
*
*/
@ApiModelProperty(value = "用户密码", required = true)
private String userPassword;
/**
*
*/
@ApiModelProperty(value = "用户昵称", required = true)
private String userNick;
/**
*
*/
@ApiModelProperty(value = "头像", required = true)
private String userLogo;
/**
*
*/
@ApiModelProperty(value = "手机号码", required = true)
private String userMobile;
/**
*
*/
@ApiModelProperty(value = "邮箱", required = true)
private String userEmail;
/**
*
*/
@ApiModelProperty(value = "性别", required = true)
private String userGender;
/**
*
*/
@ApiModelProperty(value = "生日", required = true)
private String userBirthday;
/**
*
*/
@ApiModelProperty(value = "创建时间")
private Long createTime;
/**
*
*/
@ApiModelProperty(value = "更新时间")
private Long updateTime;
}

@ -0,0 +1,57 @@
package com.hc.gpbusiness.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
/**
* (UserAdmin)
*
* @author java
* @since 2020-07-29 17:28:24
*/
@Builder
@Data
public class UserAdmin implements Serializable {
private static final long serialVersionUID = -24174751835191163L;
/**
* id
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "主键id")
private Integer userAdminId;
/**
*
*/
@ApiModelProperty(value = "管理员名字", required = true)
private String adminName;
/**
*
*/
@ApiModelProperty(value = "管理员账号", required = true)
private String adminAccount;
/**
*
*/
@ApiModelProperty(value = "管理员密码", required = true)
private String adminPass;
/**
*
*/
@ApiModelProperty(value = "管理员级别", required = true)
private Integer permissionLevel;
}

@ -0,0 +1,65 @@
package com.hc.gpbusiness.model.jwt;
import com.hc.gpbusiness.model.User;
import com.hc.gpbusiness.model.UserAdmin;
import com.hc.gpbusiness.model.login.AccessEntity;
import com.hc.gpbusiness.model.login.AuthEntity;
import com.hc.gpbusiness.model.login.TokenEntity;
import com.hc.gpcore.utils.redis.RedisUtil;
import com.hc.gpcore.utils.tool.IdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.SerializationUtils;
import java.io.UnsupportedEncodingException;
import java.util.Objects;
@Slf4j
@Component
public class GenerateAuthToken {
@Autowired
private RedisUtil redisUtil;
public AccessEntity generateToken(AuthEntity auth, User user, UserAdmin userAdmin) {
AccessEntity accessEntity = new AccessEntity();
accessEntity.setAuth(auth);
TokenEntity tokenEntity = new TokenEntity();
// 默认超时 8 小时
tokenEntity.setExpires(60 * 60 * 8);
String token = null;
try {
token = JWTUtil.sign(auth.getUserName(), IdGenerator.passwordToHash(auth.getPassword()));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
tokenEntity.setId(token);
if (userAdmin != null) {
//设置权限级别
tokenEntity.setPermissionLevel(userAdmin.getPermissionLevel());
}
accessEntity.setToken(tokenEntity);
String accessEntityStr = null;
try {
accessEntityStr = new String(Objects.requireNonNull(SerializationUtils.serialize(accessEntity)));
} catch (Exception e) {
log.warn("{}-{}用户登录出错", auth.getUserName(), auth.getPassword());
}
// 写入到 redis
redisUtil.set(accessEntity.getToken().getId(),
accessEntityStr,
accessEntity.getToken().getExpires());
if (user != null) {
accessEntity.setUser(user);
}
if (userAdmin != null){
accessEntity.setUserAdmin(userAdmin);
}
log.info("user: {}", auth.getUserName()+" 成功登录系统");
return accessEntity;
}
}

@ -0,0 +1,71 @@
package com.hc.gpbusiness.model.jwt;
import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.exceptions.JWTDecodeException;
import com.auth0.jwt.interfaces.DecodedJWT;
import org.springframework.stereotype.Component;
import java.io.UnsupportedEncodingException;
import java.util.Date;
@Component
public class JWTUtil {
// 过期时间8小时0分钟
private static final long EXPIRE_TIME = 8 * 60 * 60 * 1000;
/**
* token
*
* @param token
* @param secret
* @return
*/
public static boolean verify(String token, String userName, String secret) {
try {
Algorithm algorithm = Algorithm.HMAC256(secret);
JWTVerifier verifier = JWT.require(algorithm)
.withClaim("userName", userName)
.build();
DecodedJWT jwt = verifier.verify(token);
return true;
} catch (Exception exception) {
System.out.println(exception.getMessage());
return false;
}
}
/**
* tokensecret
*
* @return token
*/
public static String getUserName(String token) {
try {
DecodedJWT jwt = JWT.decode(token);
return jwt.getClaim("userName").asString();
} catch (JWTDecodeException e) {
return null;
}
}
/**
* ,2
*
* @param userName
* @param secret
* @return token
*/
public static String sign(String userName, String secret) throws UnsupportedEncodingException {
Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
Algorithm algorithm = Algorithm.HMAC256(secret);
// 附带userName信息
return JWT.create()
.withClaim("userName", userName)
.withExpiresAt(date)
.sign(algorithm);
}
}

@ -0,0 +1,38 @@
package com.hc.gpbusiness.model.login;
import com.hc.gpbusiness.model.User;
import com.hc.gpbusiness.model.UserAdmin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@ApiModel
@Data
public class AccessEntity implements Serializable{
/**
*
*/
private static final long serialVersionUID = -5164168823800497252L;
// @ApiModelProperty(value = "状态码",example = "1",required = true)
// private String code;
//
// @ApiModelProperty(value = "信息描述",example = "用户名或密码错误")
// private String msg;
@ApiModelProperty(value = "用户信息")
private AuthEntity auth;
@ApiModelProperty(value = "token",example = "e781d000-0498-46d3-90df-96edfd95bcd6")
private TokenEntity token;
@ApiModelProperty(value = "user")
private User user;
@ApiModelProperty(value = "userAdmin")
private UserAdmin userAdmin;
}

@ -0,0 +1,23 @@
package com.hc.gpbusiness.model.login;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
public class AuthEntity implements Serializable {
private static final long serialVersionUID = -9061398570055647081L;
@NotNull(message = "用户名不可以为空")
private String userName;
@NotNull(message = "密码不可以为空")
private String password;
@NotNull(message = "登录类型不可以为空")
private Integer loginType;
}

@ -0,0 +1,23 @@
package com.hc.gpbusiness.model.login;
import lombok.Data;
import java.io.Serializable;
@Data
public class TokenEntity implements Serializable{
/**
*
*/
private static final long serialVersionUID = -6482495805136843397L;
private String id; // token的ID
private int expires; // 过期时间
//1,2,3d对应后台123级管理员4作为新增的前台用户
private Integer permissionLevel; // 权限级别
}

@ -0,0 +1,61 @@
package com.hc.gpbusiness.service;
import com.github.pagehelper.PageInfo;
import com.hc.gpbusiness.model.Banner;
import org.springframework.stereotype.Component;
/**
* 广
* (Banner)
*
* @author java
* @since 2020-07-29 16:23:03
*/
@Component
public interface BannerService {
/**
* ID
*
* @param bannerId
* @return
*/
Banner queryById(Integer bannerId);
/**
*
*
* @param banner
* @return
*/
Banner insert(Banner banner);
/**
*
*
* @param banner
* @return
*/
Banner update(Banner banner);
/**
*
*
* @param bannerId
* @return
*/
boolean deleteById(Integer bannerId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,60 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.CourseChapterAnnex;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (CourseChapterAnnex)
*
* @author java
* @since 2020-07-29 16:23:07
*/
@Component
public interface CourseChapterAnnexService {
/**
* ID
*
* @param courseChapterAnnexId
* @return
*/
CourseChapterAnnex queryById(Integer courseChapterAnnexId);
/**
*
*
* @param courseChapterAnnex
* @return
*/
CourseChapterAnnex insert(CourseChapterAnnex courseChapterAnnex);
/**
*
*
* @param courseChapterAnnex
* @return
*/
CourseChapterAnnex update(CourseChapterAnnex courseChapterAnnex);
/**
*
*
* @param courseChapterAnnexId
* @return
*/
boolean deleteById(Integer courseChapterAnnexId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,61 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.CourseChapter;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (CourseChapter)
*
* @author java
* @since 2020-07-29 16:23:06
*/
@Component
public interface CourseChapterService {
/**
* ID
*
* @param courseChapterId
* @return
*/
CourseChapter queryById(Integer courseChapterId);
/**
*
*
* @param courseChapter
* @return
*/
CourseChapter insert(CourseChapter courseChapter);
/**
*
*
* @param courseChapter
* @return
*/
CourseChapter update(CourseChapter courseChapter);
/**
*
*
* @param courseChapterId
* @return
*/
boolean deleteById(Integer courseChapterId);
/**
*
*
* @param page
* @param size
* @param courseId id
* @return
*/
PageInfo queryAllByLimit(int page, int size, Integer courseId);
}

@ -0,0 +1,60 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.CourseChapterTag;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (CourseChapterTag)
*
* @author java
* @since 2020-07-29 16:23:07
*/
@Component
public interface CourseChapterTagService {
/**
* ID
*
* @param tagId
* @return
*/
CourseChapterTag queryById(Integer tagId);
/**
*
*
* @param courseChapterTag
* @return
*/
CourseChapterTag insert(CourseChapterTag courseChapterTag);
/**
*
*
* @param courseChapterTag
* @return
*/
CourseChapterTag update(CourseChapterTag courseChapterTag);
/**
*
*
* @param tagId
* @return
*/
boolean deleteById(Integer tagId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,60 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.CourseChapterTest;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* /(CourseChapterTest)
*
* @author java
* @since 2020-07-29 16:23:08
*/
@Component
public interface CourseChapterTestService {
/**
* ID
*
* @param testId
* @return
*/
CourseChapterTest queryById(Integer testId);
/**
*
*
* @param courseChapterTest
* @return
*/
CourseChapterTest insert(CourseChapterTest courseChapterTest);
/**
*
*
* @param courseChapterTest
* @return
*/
CourseChapterTest update(CourseChapterTest courseChapterTest);
/**
*
*
* @param testId
* @return
*/
boolean deleteById(Integer testId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,61 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.CourseChapterVideo;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (CourseChapterVideo)
*
* @author java
* @since 2020-07-29 16:23:08
*/
@Component
public interface CourseChapterVideoService {
/**
* ID
*
* @param videoId
* @return
*/
CourseChapterVideo queryById(Integer videoId);
/**
*
*
* @param courseChapterVideo
* @return
*/
CourseChapterVideo insert(CourseChapterVideo courseChapterVideo);
/**
*
*
* @param courseChapterVideo
* @return
*/
CourseChapterVideo update(CourseChapterVideo courseChapterVideo);
/**
*
*
* @param videoId
* @return
*/
boolean deleteById(Integer videoId);
/**
*
*
* @param page
* @param size
* @param chapterId id
* @return
*/
PageInfo queryAllByLimit(int page, int size, Integer chapterId);
}

@ -0,0 +1,61 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.Course;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (Course)
*
* @author java
* @since 2020-07-29 16:23:06
*/
@Component
public interface CourseService {
/**
* ID
*
* @param courseId
* @return
*/
Course queryById(Integer courseId);
/**
*
*
* @param course
* @return
*/
Course insert(Course course);
/**
*
*
* @param course
* @return
*/
Course update(Course course);
/**
*
*
* @param courseId
* @return
*/
boolean deleteById(Integer courseId);
/**
*
*
* @param page
* @param size
* @param moduleId id
* @return
*/
PageInfo queryAllByLimit(int page, int size, Integer moduleId);
}

@ -0,0 +1,60 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.CourseTagCollection;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (CourseTagCollection)
*
* @author java
* @since 2020-07-29 16:23:09
*/
@Component
public interface CourseTagCollectionService {
/**
* ID
*
* @param collectionId
* @return
*/
CourseTagCollection queryById(Integer collectionId);
/**
*
*
* @param courseTagCollection
* @return
*/
CourseTagCollection insert(CourseTagCollection courseTagCollection);
/**
*
*
* @param courseTagCollection
* @return
*/
CourseTagCollection update(CourseTagCollection courseTagCollection);
/**
*
*
* @param collectionId
* @return
*/
boolean deleteById(Integer collectionId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,60 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.CourseTag;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (CourseTag)
*
* @author java
* @since 2020-07-29 16:23:09
*/
@Component
public interface CourseTagService {
/**
* ID
*
* @param tagId
* @return
*/
CourseTag queryById(Integer tagId);
/**
*
*
* @param courseTag
* @return
*/
CourseTag insert(CourseTag courseTag);
/**
*
*
* @param courseTag
* @return
*/
CourseTag update(CourseTag courseTag);
/**
*
*
* @param tagId
* @return
*/
boolean deleteById(Integer tagId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,61 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.Modules;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (Module)
*
* @author java
* @since 2020-07-29 16:23:10
*/
@Component
public interface ModulesService {
/**
* ID
*
* @param moduleId
* @return
*/
Modules queryById(Integer moduleId);
/**
*
*
* @param modules
* @return
*/
Modules insert(Modules modules);
/**
*
*
* @param modules
* @return
*/
Modules update(Modules modules);
/**
*
*
* @param moduleId
* @return
*/
boolean deleteById(Integer moduleId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,60 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.NewsHistory;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (NewsHistory)
*
* @author java
* @since 2020-07-29 16:23:11
*/
@Component
public interface NewsHistoryService {
/**
* ID
*
* @param historyId
* @return
*/
NewsHistory queryById(Integer historyId);
/**
*
*
* @param newsHistory
* @return
*/
NewsHistory insert(NewsHistory newsHistory);
/**
*
*
* @param newsHistory
* @return
*/
NewsHistory update(NewsHistory newsHistory);
/**
*
*
* @param historyId
* @return
*/
boolean deleteById(Integer historyId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,62 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.News;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
*
* (News)
*
* @author java
* @since 2020-07-29 16:23:10
*/
@Component
public interface NewsService {
/**
* ID
*
* @param newsId
* @return
*/
News queryById(Integer newsId);
/**
*
*
* @param news
* @return
*/
News insert(News news);
/**
*
*
* @param news
* @return
*/
News update(News news);
/**
*
*
* @param newsId
* @return
*/
boolean deleteById(Integer newsId);
/**
*
*
* @param page
* @param size
* @param moduleId id
* @return
*/
PageInfo queryAllByLimit(int page, int size, Integer moduleId);
}

@ -0,0 +1,60 @@
package com.hc.gpbusiness.service;
import com.github.pagehelper.PageInfo;
import com.hc.gpbusiness.model.NewsTagCollection;
import org.springframework.stereotype.Component;
/**
* (NewsTagCollection)
*
* @author java
* @since 2020-07-29 16:23:12
*/
@Component
public interface NewsTagCollectionService {
/**
* ID
*
* @param collectionId
* @return
*/
NewsTagCollection queryById(Integer collectionId);
/**
*
*
* @param newsTagCollection
* @return
*/
NewsTagCollection insert(NewsTagCollection newsTagCollection);
/**
*
*
* @param newsTagCollection
* @return
*/
NewsTagCollection update(NewsTagCollection newsTagCollection);
/**
*
*
* @param collectionId
* @return
*/
boolean deleteById(Integer collectionId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,60 @@
package com.hc.gpbusiness.service;
import com.hc.gpbusiness.model.NewsTag;
import org.springframework.stereotype.Component;
import com.github.pagehelper.PageInfo;
/**
* (NewsTag)
*
* @author java
* @since 2020-07-29 16:23:11
*/
@Component
public interface NewsTagService {
/**
* ID
*
* @param tagId
* @return
*/
NewsTag queryById(Integer tagId);
/**
*
*
* @param newsTag
* @return
*/
NewsTag insert(NewsTag newsTag);
/**
*
*
* @param newsTag
* @return
*/
NewsTag update(NewsTag newsTag);
/**
*
*
* @param tagId
* @return
*/
boolean deleteById(Integer tagId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,70 @@
package com.hc.gpbusiness.service;
import com.github.pagehelper.PageInfo;
import com.hc.gpbusiness.model.UserAdmin;
import com.hc.gpbusiness.model.login.AccessEntity;
import com.hc.gpbusiness.model.login.AuthEntity;
import org.springframework.stereotype.Component;
/**
* (UserAdmin)
*
* @author java
* @since 2020-07-29 16:23:13
*/
@Component
public interface UserAdminService {
/**
* ID
*
* @param userAdminId
* @return
*/
UserAdmin queryById(Integer userAdminId);
/**
*
*
* @param userAdmin
* @return
*/
UserAdmin insert(UserAdmin userAdmin);
/**
*
*
* @param userAdmin
* @return
*/
UserAdmin update(UserAdmin userAdmin);
/**
*
*
* @param userAdminId
* @return
*/
boolean deleteById(Integer userAdminId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
/**
*
*
* @param authEntity
* @return
*/
AccessEntity userAdminLogin(AuthEntity authEntity) ;
}

@ -0,0 +1,60 @@
package com.hc.gpbusiness.service;
import com.github.pagehelper.PageInfo;
import com.hc.gpbusiness.model.User;
import org.springframework.stereotype.Component;
/**
* (User)
*
* @author java
* @since 2020-07-29 16:23:12
*/
@Component
public interface UserService {
/**
* ID
*
* @param userId
* @return
*/
User queryById(Integer userId);
/**
*
*
* @param user
* @return
*/
User insert(User user);
/**
*
*
* @param user
* @return
*/
User update(User user);
/**
*
*
* @param userId
* @return
*/
boolean deleteById(Integer userId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
}

@ -0,0 +1,86 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hc.gpbusiness.mapper.BannerMapper;
import com.hc.gpbusiness.model.Banner;
import com.hc.gpbusiness.service.BannerService;
import org.springframework.stereotype.Service;
/**
* 广
* (Banner)
*
* @author java
* @since 2020-07-29 16:23:04
*/
@Service("bannerService")
public class BannerServiceImpl implements BannerService {
private final BannerMapper bannerMapper;
public BannerServiceImpl(BannerMapper bannerMapper) {
this.bannerMapper = bannerMapper;
}
/**
* ID
*
* @param bannerId
* @return
*/
@Override
public Banner queryById(Integer bannerId) {
return this.bannerMapper.selectByPrimaryKey(bannerId);
}
/**
*
*
* @param banner
* @return
*/
@Override
public Banner insert(Banner banner) {
banner.setCreateTime(System.currentTimeMillis());
this.bannerMapper.insert(banner);
return banner;
}
/**
*
*
* @param banner
* @return
*/
@Override
public Banner update(Banner banner) {
banner.setUpdateTime(System.currentTimeMillis());
this.bannerMapper.updateByPrimaryKeySelective(banner);
return this.queryById(banner.getBannerId());
}
/**
*
*
* @param bannerId
* @return
*/
@Override
public boolean deleteById(Integer bannerId) {
return this.bannerMapper.deleteByPrimaryKey(bannerId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.bannerMapper::selectAll);
}
}

@ -0,0 +1,85 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.CourseChapterAnnexMapper;
import com.hc.gpbusiness.model.CourseChapterAnnex;
import com.hc.gpbusiness.service.CourseChapterAnnexService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
/**
* (CourseChapterAnnex)
*
* @author java
* @since 2020-07-29 16:23:07
*/
@Service("courseChapterAnnexService")
public class CourseChapterAnnexServiceImpl implements CourseChapterAnnexService {
private final CourseChapterAnnexMapper courseChapterAnnexMapper;
public CourseChapterAnnexServiceImpl(CourseChapterAnnexMapper courseChapterAnnexMapper) {
this.courseChapterAnnexMapper = courseChapterAnnexMapper;
}
/**
* ID
*
* @param courseChapterAnnexId
* @return
*/
@Override
public CourseChapterAnnex queryById(Integer courseChapterAnnexId) {
return this.courseChapterAnnexMapper.selectByPrimaryKey(courseChapterAnnexId);
}
/**
*
*
* @param courseChapterAnnex
* @return
*/
@Override
public CourseChapterAnnex insert(CourseChapterAnnex courseChapterAnnex) {
courseChapterAnnex.setCreateTime(System.currentTimeMillis());
this.courseChapterAnnexMapper.insert(courseChapterAnnex);
return courseChapterAnnex;
}
/**
*
*
* @param courseChapterAnnex
* @return
*/
@Override
public CourseChapterAnnex update(CourseChapterAnnex courseChapterAnnex) {
courseChapterAnnex.setUpdateTime(System.currentTimeMillis());
this.courseChapterAnnexMapper.updateByPrimaryKeySelective(courseChapterAnnex);
return this.queryById(courseChapterAnnex.getCourseChapterAnnexId());
}
/**
*
*
* @param courseChapterAnnexId
* @return
*/
@Override
public boolean deleteById(Integer courseChapterAnnexId) {
return this.courseChapterAnnexMapper.deleteByPrimaryKey(courseChapterAnnexId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.courseChapterAnnexMapper::selectAll);
}
}

@ -0,0 +1,91 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.CourseChapterMapper;
import com.hc.gpbusiness.model.CourseChapter;
import com.hc.gpbusiness.service.CourseChapterService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
import java.util.List;
/**
* (CourseChapter)
*
* @author java
* @since 2020-07-29 16:23:06
*/
@Service("courseChapterService")
public class CourseChapterServiceImpl implements CourseChapterService {
private final CourseChapterMapper courseChapterMapper;
public CourseChapterServiceImpl(CourseChapterMapper courseChapterMapper) {
this.courseChapterMapper = courseChapterMapper;
}
/**
* ID
*
* @param courseChapterId
* @return
*/
@Override
public CourseChapter queryById(Integer courseChapterId) {
return this.courseChapterMapper.selectByPrimaryKey(courseChapterId);
}
/**
*
*
* @param courseChapter
* @return
*/
@Override
public CourseChapter insert(CourseChapter courseChapter) {
courseChapter.setCreateTime(System.currentTimeMillis());
this.courseChapterMapper.insert(courseChapter);
return courseChapter;
}
/**
*
*
* @param courseChapter
* @return
*/
@Override
public CourseChapter update(CourseChapter courseChapter) {
courseChapter.setUpdateTime(System.currentTimeMillis());
this.courseChapterMapper.updateByPrimaryKeySelective(courseChapter);
return this.queryById(courseChapter.getCourseChapterId());
}
/**
*
*
* @param courseChapterId
* @return
*/
@Override
public boolean deleteById(Integer courseChapterId) {
return this.courseChapterMapper.deleteByPrimaryKey(courseChapterId) > 0;
}
/**
*
*
* @param page
* @param size
* @param courseId id
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size, Integer courseId) {
PageHelper.startPage(page, size);
List<CourseChapter> courseChapters =
this.courseChapterMapper.queryByCourseId(courseId);
return new PageInfo(courseChapters);
}
}

@ -0,0 +1,85 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.CourseChapterTagMapper;
import com.hc.gpbusiness.model.CourseChapterTag;
import com.hc.gpbusiness.service.CourseChapterTagService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
/**
* (CourseChapterTag)
*
* @author java
* @since 2020-07-29 16:23:07
*/
@Service("courseChapterTagService")
public class CourseChapterTagServiceImpl implements CourseChapterTagService {
private final CourseChapterTagMapper courseChapterTagMapper;
public CourseChapterTagServiceImpl(CourseChapterTagMapper courseChapterTagMapper) {
this.courseChapterTagMapper = courseChapterTagMapper;
}
/**
* ID
*
* @param tagId
* @return
*/
@Override
public CourseChapterTag queryById(Integer tagId) {
return this.courseChapterTagMapper.selectByPrimaryKey(tagId);
}
/**
*
*
* @param courseChapterTag
* @return
*/
@Override
public CourseChapterTag insert(CourseChapterTag courseChapterTag) {
courseChapterTag.setCreateTime(System.currentTimeMillis());
this.courseChapterTagMapper.insert(courseChapterTag);
return courseChapterTag;
}
/**
*
*
* @param courseChapterTag
* @return
*/
@Override
public CourseChapterTag update(CourseChapterTag courseChapterTag) {
courseChapterTag.setUpdateTime(System.currentTimeMillis());
this.courseChapterTagMapper.updateByPrimaryKeySelective(courseChapterTag);
return this.queryById(courseChapterTag.getTagId());
}
/**
*
*
* @param tagId
* @return
*/
@Override
public boolean deleteById(Integer tagId) {
return this.courseChapterTagMapper.deleteByPrimaryKey(tagId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.courseChapterTagMapper::selectAll);
}
}

@ -0,0 +1,83 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.CourseChapterTestMapper;
import com.hc.gpbusiness.model.CourseChapterTest;
import com.hc.gpbusiness.service.CourseChapterTestService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
/**
* /(CourseChapterTest)
*
* @author java
* @since 2020-07-29 16:23:08
*/
@Service("courseChapterTestService")
public class CourseChapterTestServiceImpl implements CourseChapterTestService {
private final CourseChapterTestMapper courseChapterTestMapper;
public CourseChapterTestServiceImpl(CourseChapterTestMapper courseChapterTestMapper) {
this.courseChapterTestMapper = courseChapterTestMapper;
}
/**
* ID
*
* @param testId
* @return
*/
@Override
public CourseChapterTest queryById(Integer testId) {
return this.courseChapterTestMapper.selectByPrimaryKey(testId);
}
/**
*
*
* @param courseChapterTest
* @return
*/
@Override
public CourseChapterTest insert(CourseChapterTest courseChapterTest) {
this.courseChapterTestMapper.insert(courseChapterTest);
return courseChapterTest;
}
/**
*
*
* @param courseChapterTest
* @return
*/
@Override
public CourseChapterTest update(CourseChapterTest courseChapterTest) {
this.courseChapterTestMapper.updateByPrimaryKeySelective(courseChapterTest);
return this.queryById(courseChapterTest.getTestId());
}
/**
*
*
* @param testId
* @return
*/
@Override
public boolean deleteById(Integer testId) {
return this.courseChapterTestMapper.deleteByPrimaryKey(testId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.courseChapterTestMapper::selectAll);
}
}

@ -0,0 +1,90 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.CourseChapterVideoMapper;
import com.hc.gpbusiness.model.CourseChapterVideo;
import com.hc.gpbusiness.service.CourseChapterVideoService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
import java.util.List;
/**
* (CourseChapterVideo)
*
* @author java
* @since 2020-07-29 16:23:08
*/
@Service("courseChapterVideoService")
public class CourseChapterVideoServiceImpl implements CourseChapterVideoService {
private final CourseChapterVideoMapper courseChapterVideoMapper;
public CourseChapterVideoServiceImpl(CourseChapterVideoMapper courseChapterVideoMapper) {
this.courseChapterVideoMapper = courseChapterVideoMapper;
}
/**
* ID
*
* @param videoId
* @return
*/
@Override
public CourseChapterVideo queryById(Integer videoId) {
return this.courseChapterVideoMapper.selectByPrimaryKey(videoId);
}
/**
*
*
* @param courseChapterVideo
* @return
*/
@Override
public CourseChapterVideo insert(CourseChapterVideo courseChapterVideo) {
courseChapterVideo.setCreateTime(System.currentTimeMillis());
this.courseChapterVideoMapper.insert(courseChapterVideo);
return courseChapterVideo;
}
/**
*
*
* @param courseChapterVideo
* @return
*/
@Override
public CourseChapterVideo update(CourseChapterVideo courseChapterVideo) {
courseChapterVideo.setUpdateTime(System.currentTimeMillis());
this.courseChapterVideoMapper.updateByPrimaryKeySelective(courseChapterVideo);
return this.queryById(courseChapterVideo.getVideoId());
}
/**
*
*
* @param videoId
* @return
*/
@Override
public boolean deleteById(Integer videoId) {
return this.courseChapterVideoMapper.deleteByPrimaryKey(videoId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size, Integer chapterId) {
PageHelper.startPage(page, size);
List<CourseChapterVideo> courseChapterVideos
= this.courseChapterVideoMapper.queryByChapterId(chapterId);
return new PageInfo(courseChapterVideos);
}
}

@ -0,0 +1,91 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.CourseMapper;
import com.hc.gpbusiness.model.Course;
import com.hc.gpbusiness.model.News;
import com.hc.gpbusiness.service.CourseService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
import java.util.List;
/**
* (Course)
*
* @author java
* @since 2020-07-29 16:23:06
*/
@Service("courseService")
public class CourseServiceImpl implements CourseService {
private final CourseMapper courseMapper;
public CourseServiceImpl(CourseMapper courseMapper) {
this.courseMapper = courseMapper;
}
/**
* ID
*
* @param courseId
* @return
*/
@Override
public Course queryById(Integer courseId) {
return this.courseMapper.selectByPrimaryKey(courseId);
}
/**
*
*
* @param course
* @return
*/
@Override
public Course insert(Course course) {
course.setCreateTime(System.currentTimeMillis());
this.courseMapper.insert(course);
return course;
}
/**
*
*
* @param course
* @return
*/
@Override
public Course update(Course course) {
course.setUpdateTime(System.currentTimeMillis());
this.courseMapper.updateByPrimaryKeySelective(course);
return this.queryById(course.getCourseId());
}
/**
*
*
* @param courseId
* @return
*/
@Override
public boolean deleteById(Integer courseId) {
return this.courseMapper.deleteByPrimaryKey(courseId) > 0;
}
/**
*
*
* @param page
* @param size
* @param moduleId id
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size, Integer moduleId) {
PageHelper.startPage(page, size);
List<Course> courses = this.courseMapper.queryByModuleId(moduleId);
return new PageInfo(courses);
}
}

@ -0,0 +1,83 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.CourseTagCollectionMapper;
import com.hc.gpbusiness.model.CourseTagCollection;
import com.hc.gpbusiness.service.CourseTagCollectionService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
/**
* (CourseTagCollection)
*
* @author java
* @since 2020-07-29 16:23:09
*/
@Service("courseTagCollectionService")
public class CourseTagCollectionServiceImpl implements CourseTagCollectionService {
private final CourseTagCollectionMapper courseTagCollectionMapper;
public CourseTagCollectionServiceImpl(CourseTagCollectionMapper courseTagCollectionMapper) {
this.courseTagCollectionMapper = courseTagCollectionMapper;
}
/**
* ID
*
* @param collectionId
* @return
*/
@Override
public CourseTagCollection queryById(Integer collectionId) {
return this.courseTagCollectionMapper.selectByPrimaryKey(collectionId);
}
/**
*
*
* @param courseTagCollection
* @return
*/
@Override
public CourseTagCollection insert(CourseTagCollection courseTagCollection) {
this.courseTagCollectionMapper.insert(courseTagCollection);
return courseTagCollection;
}
/**
*
*
* @param courseTagCollection
* @return
*/
@Override
public CourseTagCollection update(CourseTagCollection courseTagCollection) {
this.courseTagCollectionMapper.updateByPrimaryKeySelective(courseTagCollection);
return this.queryById(courseTagCollection.getCollectionId());
}
/**
*
*
* @param collectionId
* @return
*/
@Override
public boolean deleteById(Integer collectionId) {
return this.courseTagCollectionMapper.deleteByPrimaryKey(collectionId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.courseTagCollectionMapper::selectAll);
}
}

@ -0,0 +1,85 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.CourseTagMapper;
import com.hc.gpbusiness.model.CourseTag;
import com.hc.gpbusiness.service.CourseTagService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
/**
* (CourseTag)
*
* @author java
* @since 2020-07-29 16:23:09
*/
@Service("courseTagService")
public class CourseTagServiceImpl implements CourseTagService {
private final CourseTagMapper courseTagMapper;
public CourseTagServiceImpl(CourseTagMapper courseTagMapper) {
this.courseTagMapper = courseTagMapper;
}
/**
* ID
*
* @param tagId
* @return
*/
@Override
public CourseTag queryById(Integer tagId) {
return this.courseTagMapper.selectByPrimaryKey(tagId);
}
/**
*
*
* @param courseTag
* @return
*/
@Override
public CourseTag insert(CourseTag courseTag) {
courseTag.setCreateTime(System.currentTimeMillis());
this.courseTagMapper.insert(courseTag);
return courseTag;
}
/**
*
*
* @param courseTag
* @return
*/
@Override
public CourseTag update(CourseTag courseTag) {
courseTag.setUpdateTime(System.currentTimeMillis());
this.courseTagMapper.updateByPrimaryKeySelective(courseTag);
return this.queryById(courseTag.getTagId());
}
/**
*
*
* @param tagId
* @return
*/
@Override
public boolean deleteById(Integer tagId) {
return this.courseTagMapper.deleteByPrimaryKey(tagId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.courseTagMapper::selectAll);
}
}

@ -0,0 +1,95 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.dto.ModulesDto;
import com.hc.gpbusiness.mapper.ModulesMapper;
import com.hc.gpbusiness.model.Modules;
import com.hc.gpbusiness.service.ModulesService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* (Module)
*
* @author java
* @since 2020-07-29 16:23:10
*/
@Service("moduleService")
public class ModulesServiceImpl implements ModulesService {
private final ModulesMapper moduleMapper;
public ModulesServiceImpl(ModulesMapper moduleMapper) {
this.moduleMapper = moduleMapper;
}
/**
* ID
*
* @param moduleId
* @return
*/
@Override
public Modules queryById(Integer moduleId) {
return this.moduleMapper.selectByPrimaryKey(moduleId);
}
/**
*
*
* @param modules
* @return
*/
@Override
public Modules insert(Modules modules) {
modules.setCreateTime(System.currentTimeMillis());
this.moduleMapper.insert(modules);
return modules;
}
/**
*
*
* @param modules
* @return
*/
@Override
public Modules update(Modules modules) {
modules.setUpdateTime(System.currentTimeMillis());
this.moduleMapper.updateByPrimaryKeySelective(modules);
return this.queryById(modules.getModuleId());
}
/**
*
*
* @param moduleId
* @return
*/
@Override
public boolean deleteById(Integer moduleId) {
return this.moduleMapper.deleteByPrimaryKey(moduleId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
PageHelper.startPage(page, size);
List<ModulesDto> moduless = this.moduleMapper.queryByParentId(0);
if (CollectionUtils.isEmpty(moduless)) {
return null;
}
moduless.forEach(modulesDto -> modulesDto.setChildModuleType(this.moduleMapper.queryByParentId(modulesDto.getModuleId())));
return new PageInfo(moduless);
}
}

@ -0,0 +1,85 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.NewsHistoryMapper;
import com.hc.gpbusiness.model.NewsHistory;
import com.hc.gpbusiness.service.NewsHistoryService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
/**
* (NewsHistory)
*
* @author java
* @since 2020-07-29 16:23:11
*/
@Service("newsHistoryService")
public class NewsHistoryServiceImpl implements NewsHistoryService {
private final NewsHistoryMapper newsHistoryMapper;
public NewsHistoryServiceImpl(NewsHistoryMapper newsHistoryMapper) {
this.newsHistoryMapper = newsHistoryMapper;
}
/**
* ID
*
* @param historyId
* @return
*/
@Override
public NewsHistory queryById(Integer historyId) {
return this.newsHistoryMapper.selectByPrimaryKey(historyId);
}
/**
*
*
* @param newsHistory
* @return
*/
@Override
public NewsHistory insert(NewsHistory newsHistory) {
newsHistory.setCreateTime(System.currentTimeMillis());
this.newsHistoryMapper.insert(newsHistory);
return newsHistory;
}
/**
*
*
* @param newsHistory
* @return
*/
@Override
public NewsHistory update(NewsHistory newsHistory) {
newsHistory.setUpdateTime(System.currentTimeMillis());
this.newsHistoryMapper.updateByPrimaryKeySelective(newsHistory);
return this.queryById(newsHistory.getHistoryId());
}
/**
*
*
* @param historyId
* @return
*/
@Override
public boolean deleteById(Integer historyId) {
return this.newsHistoryMapper.deleteByPrimaryKey(historyId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.newsHistoryMapper::selectAll);
}
}

@ -0,0 +1,91 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.NewsMapper;
import com.hc.gpbusiness.model.News;
import com.hc.gpbusiness.service.NewsService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
import java.util.List;
/**
*
* (News)
*
* @author java
* @since 2020-07-29 16:23:10
*/
@Service("newsService")
public class NewsServiceImpl implements NewsService {
private final NewsMapper newsMapper;
public NewsServiceImpl(NewsMapper newsMapper) {
this.newsMapper = newsMapper;
}
/**
* ID
*
* @param newsId
* @return
*/
@Override
public News queryById(Integer newsId) {
return this.newsMapper.selectByPrimaryKey(newsId);
}
/**
*
*
* @param news
* @return
*/
@Override
public News insert(News news) {
news.setCreateTime(System.currentTimeMillis());
this.newsMapper.insert(news);
return news;
}
/**
*
*
* @param news
* @return
*/
@Override
public News update(News news) {
news.setUpdateTime(System.currentTimeMillis());
this.newsMapper.updateByPrimaryKeySelective(news);
return this.queryById(news.getNewsId());
}
/**
*
*
* @param newsId
* @return
*/
@Override
public boolean deleteById(Integer newsId) {
return this.newsMapper.deleteByPrimaryKey(newsId) > 0;
}
/**
*
*
* @param page
* @param size
* @param moduleId id
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size, Integer moduleId) {
PageHelper.startPage(page, size);
List<News> news = this.newsMapper.queryNewsByModuleId(moduleId);
return new PageInfo(news);
}
}

@ -0,0 +1,83 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.NewsTagCollectionMapper;
import com.hc.gpbusiness.model.NewsTagCollection;
import com.hc.gpbusiness.service.NewsTagCollectionService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
/**
* (NewsTagCollection)
*
* @author java
* @since 2020-07-29 16:23:12
*/
@Service("newsTagCollectionService")
public class NewsTagCollectionServiceImpl implements NewsTagCollectionService {
private final NewsTagCollectionMapper newsTagCollectionMapper;
public NewsTagCollectionServiceImpl(NewsTagCollectionMapper newsTagCollectionMapper) {
this.newsTagCollectionMapper = newsTagCollectionMapper;
}
/**
* ID
*
* @param collectionId
* @return
*/
@Override
public NewsTagCollection queryById(Integer collectionId) {
return this.newsTagCollectionMapper.selectByPrimaryKey(collectionId);
}
/**
*
*
* @param newsTagCollection
* @return
*/
@Override
public NewsTagCollection insert(NewsTagCollection newsTagCollection) {
this.newsTagCollectionMapper.insert(newsTagCollection);
return newsTagCollection;
}
/**
*
*
* @param newsTagCollection
* @return
*/
@Override
public NewsTagCollection update(NewsTagCollection newsTagCollection) {
this.newsTagCollectionMapper.updateByPrimaryKeySelective(newsTagCollection);
return this.queryById(newsTagCollection.getCollectionId());
}
/**
*
*
* @param collectionId
* @return
*/
@Override
public boolean deleteById(Integer collectionId) {
return this.newsTagCollectionMapper.deleteByPrimaryKey(collectionId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.newsTagCollectionMapper::selectAll);
}
}

@ -0,0 +1,85 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.NewsTagMapper;
import com.hc.gpbusiness.model.NewsTag;
import com.hc.gpbusiness.service.NewsTagService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
/**
* (NewsTag)
*
* @author java
* @since 2020-07-29 16:23:11
*/
@Service("newsTagService")
public class NewsTagServiceImpl implements NewsTagService {
private final NewsTagMapper newsTagMapper;
public NewsTagServiceImpl(NewsTagMapper newsTagMapper) {
this.newsTagMapper = newsTagMapper;
}
/**
* ID
*
* @param tagId
* @return
*/
@Override
public NewsTag queryById(Integer tagId) {
return this.newsTagMapper.selectByPrimaryKey(tagId);
}
/**
*
*
* @param newsTag
* @return
*/
@Override
public NewsTag insert(NewsTag newsTag) {
newsTag.setCreateTime(System.currentTimeMillis());
this.newsTagMapper.insert(newsTag);
return newsTag;
}
/**
*
*
* @param newsTag
* @return
*/
@Override
public NewsTag update(NewsTag newsTag) {
newsTag.setUpdateTime(System.currentTimeMillis());
this.newsTagMapper.updateByPrimaryKeySelective(newsTag);
return this.queryById(newsTag.getTagId());
}
/**
*
*
* @param tagId
* @return
*/
@Override
public boolean deleteById(Integer tagId) {
return this.newsTagMapper.deleteByPrimaryKey(tagId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.newsTagMapper::selectAll);
}
}

@ -0,0 +1,117 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.UserAdminMapper;
import com.hc.gpbusiness.model.UserAdmin;
import com.hc.gpbusiness.model.jwt.GenerateAuthToken;
import com.hc.gpbusiness.model.login.AccessEntity;
import com.hc.gpbusiness.model.login.AuthEntity;
import com.hc.gpbusiness.service.UserAdminService;
import com.hc.gpcore.enums.InfoEnum;
import com.hc.gpcore.exception.ResponseException;
import com.hc.gpcore.utils.tool.IdGenerator;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.Objects;
/**
* (UserAdmin)
*
* @author java
* @since 2020-07-29 16:23:13
*/
@Service("userAdminService")
public class UserAdminServiceImpl implements UserAdminService {
private final UserAdminMapper userAdminMapper;
private final GenerateAuthToken generateAuthToken;
public UserAdminServiceImpl(UserAdminMapper userAdminMapper, GenerateAuthToken generateAuthToken) {
this.userAdminMapper = userAdminMapper;
this.generateAuthToken = generateAuthToken;
}
/**
* ID
*
* @param userAdminId
* @return
*/
@Override
public UserAdmin queryById(Integer userAdminId) {
return this.userAdminMapper.selectByPrimaryKey(userAdminId);
}
/**
*
*
* @param userAdmin
* @return
*/
@Override
public UserAdmin insert(UserAdmin userAdmin) {
this.userAdminMapper.insert(userAdmin);
return userAdmin;
}
/**
*
*
* @param userAdmin
* @return
*/
@Override
public UserAdmin update(UserAdmin userAdmin) {
this.userAdminMapper.updateByPrimaryKeySelective(userAdmin);
return this.queryById(userAdmin.getUserAdminId());
}
/**
*
*
* @param userAdminId
* @return
*/
@Override
public boolean deleteById(Integer userAdminId) {
return this.userAdminMapper.deleteByPrimaryKey(userAdminId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.userAdminMapper::selectAll);
}
@Override
public AccessEntity userAdminLogin(AuthEntity authEntity) {
//依据用户名查询管理员
List<UserAdmin> userAdmins = userAdminMapper.selectAdminByAdminAccount(authEntity.getUserName());
if (CollectionUtils.isEmpty(userAdmins)) {
throw new ResponseException(InfoEnum.LOGIN_USER_NAME_ERROR);
}
UserAdmin userAdmin = userAdmins.get(0);
//密码错误
String password = IdGenerator.passwordToHash(authEntity.getPassword());
if (!Objects.equals(password, userAdmin.getAdminPass())) {
throw new ResponseException(InfoEnum.LOGIN_PASSWORD_ERROR);
}
//验证密码正确 生成token 存入redis并返回
//登录成功 生成token
return generateAuthToken.generateToken(authEntity, null, userAdmin);
}
}

@ -0,0 +1,85 @@
package com.hc.gpbusiness.service.impl;
import com.github.pagehelper.PageHelper;
import com.hc.gpbusiness.mapper.UserMapper;
import com.hc.gpbusiness.model.User;
import com.hc.gpbusiness.service.UserService;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageInfo;
/**
* (User)
*
* @author java
* @since 2020-07-29 16:23:12
*/
@Service("userService")
public class UserServiceImpl implements UserService {
private final UserMapper userMapper;
public UserServiceImpl(UserMapper userMapper) {
this.userMapper = userMapper;
}
/**
* ID
*
* @param userId
* @return
*/
@Override
public User queryById(Integer userId) {
return this.userMapper.selectByPrimaryKey(userId);
}
/**
*
*
* @param user
* @return
*/
@Override
public User insert(User user) {
user.setCreateTime(System.currentTimeMillis());
this.userMapper.insert(user);
return user;
}
/**
*
*
* @param user
* @return
*/
@Override
public User update(User user) {
user.setUpdateTime(System.currentTimeMillis());
this.userMapper.updateByPrimaryKeySelective(user);
return this.queryById(user.getUserId());
}
/**
*
*
* @param userId
* @return
*/
@Override
public boolean deleteById(Integer userId) {
return this.userMapper.deleteByPrimaryKey(userId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.userMapper::selectAll);
}
}

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.BannerMapper">
<resultMap type="com.hc.gpbusiness.model.Banner" id="BannerMap">
<result property="bannerId" column="banner_id" jdbcType="INTEGER"/>
<result property="bannerUrl" column="banner_url" jdbcType="VARCHAR"/>
<result property="bannerIndex" column="banner_index" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
banner_id,
banner_url,
banner_index,
create_time,
update_time
</sql>
</mapper>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.CourseChapterAnnexMapper">
<resultMap type="com.hc.gpbusiness.model.CourseChapterAnnex" id="CourseChapterAnnexMap">
<result property="courseChapterAnnexId" column="course_chapter_annex_id" jdbcType="INTEGER"/>
<result property="annexName" column="annex_name" jdbcType="VARCHAR"/>
<result property="courseChapterId" column="course_chapter_id" jdbcType="INTEGER"/>
<result property="annexIntroduction" column="annex_introduction" jdbcType="VARCHAR"/>
<result property="annexUrl" column="annex_url" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
course_chapter_annex_id,
annex_name,
course_chapter_id,
annex_introduction,
annex_url,
create_time,
update_time
</sql>
</mapper>

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.CourseChapterMapper">
<resultMap type="com.hc.gpbusiness.model.CourseChapter" id="CourseChapterMap">
<result property="courseChapterId" column="course_chapter_id" jdbcType="INTEGER"/>
<result property="chapterName" column="chapter_name" jdbcType="VARCHAR"/>
<result property="parentId" column="parent_id" jdbcType="INTEGER"/>
<result property="chapterLevel" column="chapter_level" jdbcType="INTEGER"/>
<result property="courseId" column="course_id" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
course_chapter_id,
chapter_name,
parent_id,
chapter_level,
course_id,
create_time,
update_time
</sql>
<select id="queryByCourseId" resultMap="CourseChapterMap">
SELECT
<include refid="Base_Column_List"/>
FROM course_chapter
WHERE course_id = #{courseId}
</select>
</mapper>

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.CourseChapterTagMapper">
<resultMap type="com.hc.gpbusiness.model.CourseChapterTag" id="CourseChapterTagMap">
<result property="tagId" column="tag_id" jdbcType="INTEGER"/>
<result property="tagName" column="tag_name" jdbcType="VARCHAR"/>
<result property="tagIndex" column="tag_index" jdbcType="INTEGER"/>
<result property="courseChapterId" column="course_chapter_id" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
tag_id,
tag_name,
tag_index,
course_chapter_id,
create_time,
update_time
</sql>
</mapper>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.CourseChapterTestMapper">
<resultMap type="com.hc.gpbusiness.model.CourseChapterTest" id="CourseChapterTestMap">
<result property="testId" column="test_id" jdbcType="INTEGER"/>
<result property="questionId" column="question_id" jdbcType="INTEGER"/>
<result property="chapterId" column="chapter_id" jdbcType="INTEGER"/>
<result property="courseId" column="course_id" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
test_id,
question_id,
chapter_id,
course_id
</sql>
</mapper>

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.CourseChapterVideoMapper">
<resultMap type="com.hc.gpbusiness.model.CourseChapterVideo" id="CourseChapterVideoMap">
<result property="videoId" column="video_id" jdbcType="INTEGER"/>
<result property="courseChapterId" column="course_chapter_id" jdbcType="INTEGER"/>
<result property="videoName" column="video_name" jdbcType="VARCHAR"/>
<result property="videoUrl" column="video_url" jdbcType="VARCHAR"/>
<result property="videoOriUrl" column="video_ori_url" jdbcType="VARCHAR"/>
<result property="isFree" column="is_free" jdbcType="INTEGER"/>
<result property="freeTime" column="free_time" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
video_id,
course_chapter_id,
video_name,
video_url,
video_ori_url,
is_free,
free_time,
create_time,
update_time
</sql>
<select id="queryByChapterId" resultMap="CourseChapterVideoMap">
SELECT
<include refid="Base_Column_List"/>
FROM course_chapter_video
WHERE course_chapter_id = #{chapterId}
</select>
</mapper>

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.CourseMapper">
<resultMap type="com.hc.gpbusiness.model.Course" id="CourseMap">
<result property="courseId" column="course_id" jdbcType="INTEGER"/>
<result property="courseName" column="course_name" jdbcType="VARCHAR"/>
<result property="courseLogo" column="course_logo" jdbcType="VARCHAR"/>
<result property="courseTeacherVisible" column="course_teacher_visible" jdbcType="INTEGER"/>
<result property="courseChapterVisible" column="course_chapter_visible" jdbcType="INTEGER"/>
<result property="courseDescVisible" column="course_desc_visible" jdbcType="INTEGER"/>
<result property="courseDesc" column="course_desc" jdbcType="VARCHAR"/>
<result property="courseHours" column="course_hours" jdbcType="FLOAT"/>
<result property="courseTeacher" column="course_teacher" jdbcType="VARCHAR"/>
<result property="isValid" column="is_valid" jdbcType="INTEGER"/>
<result property="gallery" column="gallery" jdbcType="VARCHAR"/>
<result property="moduleId" column="module_id" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
course_id,
course_name,
course_logo,
course_teacher_visible,
course_chapter_visible,
course_desc_visible,
course_desc,
course_hours,
course_teacher,
is_valid,
gallery,
module_id,
create_time,
update_time
</sql>
<select id="queryByModuleId" resultMap="CourseMap">
SELECT
<include refid="Base_Column_List"/>
FROM course
WHERE module_id = #{moduleId}
</select>
</mapper>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.CourseTagCollectionMapper">
<resultMap type="com.hc.gpbusiness.model.CourseTagCollection" id="CourseTagCollectionMap">
<result property="collectionId" column="collection_id" jdbcType="INTEGER"/>
<result property="tagId" column="tag_id" jdbcType="INTEGER"/>
<result property="courseId" column="course_id" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
collection_id,
tag_id,
course_id
</sql>
</mapper>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.CourseTagMapper">
<resultMap type="com.hc.gpbusiness.model.CourseTag" id="CourseTagMap">
<result property="tagId" column="tag_id" jdbcType="INTEGER"/>
<result property="tagName" column="tag_name" jdbcType="VARCHAR"/>
<result property="moduleId" column="module_id" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
tag_id,
tag_name,
module_id,
create_time,
update_time
</sql>
</mapper>

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.ModulesMapper">
<resultMap type="com.hc.gpbusiness.model.Modules" id="ModulesMap">
<result property="moduleId" column="module_id" jdbcType="INTEGER"/>
<result property="parentId" column="parent_id" jdbcType="INTEGER"/>
<result property="moduleName" column="module_name" jdbcType="VARCHAR"/>
<result property="moduleType" column="module_type" jdbcType="INTEGER"/>
<result property="moduleIndex" column="module_index" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
module_id,
parent_id,
module_name,
module_type,
module_index,
create_time,
update_time
</sql>
<select id="queryByParentId" resultType="com.hc.gpbusiness.dto.ModulesDto">
SELECT
<include refid="Base_Column_List"/>
FROM `modules`
WHERE parent_id = #{parentId}
</select>
</mapper>

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.NewsHistoryMapper">
<resultMap type="com.hc.gpbusiness.model.NewsHistory" id="NewsHistoryMap">
<result property="historyId" column="history_id" jdbcType="INTEGER"/>
<result property="userId" column="user_id" jdbcType="INTEGER"/>
<result property="opType" column="op_type" jdbcType="INTEGER"/>
<result property="opContent" column="op_content" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
history_id,
user_id,
op_type,
op_content,
create_time,
update_time
</sql>
</mapper>

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.NewsMapper">
<resultMap type="com.hc.gpbusiness.model.News" id="NewsMap">
<result property="newsId" column="news_id" jdbcType="INTEGER"/>
<result property="newsTitle" column="news_title" jdbcType="VARCHAR"/>
<result property="newsLogo" column="news_logo" jdbcType="VARCHAR"/>
<result property="newsContent" column="news_content" jdbcType="VARCHAR"/>
<result property="moduleId" column="module_id" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
news_id,
news_title,
news_logo,
news_content,
module_id,
create_time,
update_time
</sql>
<select id="queryNewsByModuleId" resultMap="NewsMap">
SELECT
<include refid="Base_Column_List"/>
FROM news
WHERE module_id = #{moduleId}
</select>
</mapper>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.NewsTagCollectionMapper">
<resultMap type="com.hc.gpbusiness.model.NewsTagCollection" id="NewsTagCollectionMap">
<result property="collectionId" column="collection_id" jdbcType="INTEGER"/>
<result property="tagId" column="tag_id" jdbcType="INTEGER"/>
<result property="newsId" column="news_id" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
collection_id,
tag_id,
news_id
</sql>
</mapper>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.NewsTagMapper">
<resultMap type="com.hc.gpbusiness.model.NewsTag" id="NewsTagMap">
<result property="tagId" column="tag_id" jdbcType="INTEGER"/>
<result property="tagName" column="tag_name" jdbcType="VARCHAR"/>
<result property="moduleId" column="module_id" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
tag_id,
tag_name,
module_id,
create_time,
update_time
</sql>
</mapper>

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.UserAdminMapper">
<resultMap type="com.hc.gpbusiness.model.UserAdmin" id="UserAdminMap">
<result property="userAdminId" column="user_admin_id" jdbcType="INTEGER"/>
<result property="adminName" column="admin_name" jdbcType="VARCHAR"/>
<result property="adminAccount" column="admin_account" jdbcType="VARCHAR"/>
<result property="adminPass" column="admin_pass" jdbcType="VARCHAR"/>
<result property="permissionLevel" column="permission_level" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
user_admin_id, admin_name, admin_account, admin_pass, permission_level
</sql>
<select id="selectAdminByAdminAccount" resultMap="UserAdminMap">
SELECT
<include refid="Base_Column_List"/>
FROM user_admin
WHERE admin_account = #{adminAccount,jdbcType=VARCHAR} order by user_admin_id desc
</select>
</mapper>

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.gpbusiness.mapper.UserMapper">
<resultMap type="com.hc.gpbusiness.model.User" id="UserMap">
<result property="userId" column="user_id" jdbcType="INTEGER"/>
<result property="cardId" column="card_id" jdbcType="VARCHAR"/>
<result property="userAccount" column="user_account" jdbcType="VARCHAR"/>
<result property="userPassword" column="user_password" jdbcType="VARCHAR"/>
<result property="userNick" column="user_nick" jdbcType="VARCHAR"/>
<result property="userLogo" column="user_logo" jdbcType="VARCHAR"/>
<result property="userMobile" column="user_mobile" jdbcType="VARCHAR"/>
<result property="userEmail" column="user_email" jdbcType="VARCHAR"/>
<result property="userGender" column="user_gender" jdbcType="VARCHAR"/>
<result property="userBirthday" column="user_birthday" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
user_id,
card_id,
user_account,
user_password,
user_nick,
user_logo,
user_mobile,
user_email,
user_gender,
user_birthday,
create_time,
update_time
</sql>
</mapper>

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!-- 核心配置文件 -->
<settings>
<setting name="useGeneratedKeys" value="true"/>
<!--驼峰式文件映射-->
<setting name="mapUnderscoreToCamelCase" value="true"/>
<!--sql log 日志打印-->
<!-- <setting name="logImpl" value="STDOUT_LOGGING" />-->
</settings>
</configuration>

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_X">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.2.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.37" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.20.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:23.0" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.0.18" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
<orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.29" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okhttp3:okhttp:3.14.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.1.2" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.4" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.4" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper:4.0.4" level="project" />
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.9" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.9" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.7" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
<orderEntry type="library" name="Maven: com.auth0:java-jwt:3.3.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.3.11" level="project" />
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.11" level="project" />
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.8.RELEASE" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
<orderEntry type="library" name="Maven: com.spring4all:swagger-spring-boot-starter:1.9.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.13" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
</component>
</module>

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.hc</groupId>
<artifactId>gpwebv2</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>gp-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>gp-core</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!--SpringBoot参数校验-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<!-- 七牛云 OSS 对象存储 -->
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
<version>${qiniu.version}</version>
</dependency>
<!-- 数据持久层框架 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis.spring.boot.version}</version>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>${tk.mybatis.mapper.version}</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.spring.boot.version}</version>
<exclusions>
<exclusion>
<artifactId>mybatis-spring-boot-starter</artifactId>
<groupId>org.mybatis.spring.boot</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- JWT -->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>${auth0.jwt.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
</dependencies>
</project>

@ -0,0 +1,34 @@
package com.hc.gpcore.enums;
import lombok.Getter;
/**
* @author JIA
*
*/
@Getter
public enum ErrorEnum {
/* 系统级别 */
ERROR_REQUEST(100,"请求失败"),
ERROR_BAD_REQUEST(400,"请求语法错误"),
ERROR_UNAUTHORIZED(401,"未授权"),
ERROR_FORBIDDEN(403,"服务器拒绝请求"),
ERROR_NOT_FOUND(404,"请求资源不存在"),
ERROR_METHOD_NOT_AllOWED(405,"指定的请求方法,被禁用"),
ERROR_REQUEST_TIMEOUT(408,"请求超时"),
ERROR_REQUEST_ENTITY_TOO_LARGE(413,"请求实体过大,超出处理能力"),
ERROR_REQUEST_URI_TOO_LONG(414,"请求URL太长,拒绝访问")
;
private final Integer key;
private final String msg;
ErrorEnum(Integer key, String msg) {
this.key = key;
this.msg = msg;
}
}

@ -0,0 +1,62 @@
package com.hc.gpcore.enums;
import lombok.Getter;
/**
* @author JIA
*
*/
@Getter
public enum InfoEnum {
NULL_PARAMETER(400, "请求参数错误"),
LOGIN_USER_NAME_ERROR(201, "无效的身份证号,请查证后再试"),
DISTRICT_ERROR(201,"该属地未开放继续教育,请查证后再试"),
DISTRICT_NO_ERROR(201,"您不属于此归属地,请前往指定区域报名入口"),
COMPANY_LOGIN_ERROR(201,"单位名称或手机号错误,请查证后再试"),
LOGIN_PASSWORD_ERROR(201, "密码错误,请重新输入"),
LOGIN_REGISTER_RE(201,"用户已存在,不可重复注册"),
TOKEN_EXPIRED(203, "token过期或token不存在"),
AUTHCODE_ERROR(204,"验证码输入错误"),
ORDERS_RE_ERROR(205,"订单已支付,请勿重复操作"),
DISTRICT_COURSE_RE_ERROR(206,"此地区已配置此课程,请不要重复操作"),
USER_COURSE_RE_ERROR(206,"此用户已拥有此课程,请不要重复操作"),
DISTRICT_CONFIG_RE(207,"此地区已配置规则,请不要重复操作"),
USER_CONFIG_RE(208,"用户配置已存在,请不要重复操作"),
USER_INVOICES_ERROR(210,"此订单已申请发票,请不要重复操作"),
USER_ORDER_REFUND(211,"此订单已申请退款,请不要重复操作"),
TOKEN_ERROR(209,"非法token,禁止进入系统"),
PAPER_ERROR(212,"此试卷已过期,请联系管理员重新设置"),
COURSE_RELATION_ERROR(213,"此课程已有关联,请不要重复操作"),
DISTRICT_COURSE_ERROR(214,"此地区暂无课程,请联系管理员")
;
private final Integer key;
private final String msg;
InfoEnum(Integer key, String msg) {
this.key = key;
this.msg = msg;
}
}

@ -0,0 +1,32 @@
package com.hc.gpcore.enums;
import lombok.Getter;
/**
* @author JIA
*
*/
@Getter
public enum SuccessEnum {
/* 系统级别 */
SUCCESS_REQUEST(200, "服务请求成功"),
SUCCESS_CREATED(201, "请求成功,服务器创建资源"),
SUCCESS_ACCEPTED(202, "请求成功,服务器尚未处理"),
SUCCESS_NON_AUTHORITATIVE(203,"请求成功,信息非授权"),
SUCCESS_NO_CONTENT(204,"请求成功,无内容"),
SUCCESS_RESET_CONTENT(205,"请求成功,内容重置"),
SUCCESS_PARTIAL_CONTENT(206,"请求成功,部分内容已处理")
;
private final Integer key;
private final String msg;
SuccessEnum(Integer key, String msg) {
this.key = key;
this.msg = msg;
}
}

@ -0,0 +1,32 @@
package com.hc.gpcore.exception;
import com.hc.gpcore.enums.InfoEnum;
/**
* @author JIA
*/
public class ResponseException extends RuntimeException {
private static final long serialVersionUID = 1L;
private Integer code;
public ResponseException(Integer code,String message){
super(message);
this.code = code;
}
public ResponseException(InfoEnum infoEnum){
super(infoEnum.getMsg());
this.code = infoEnum.getKey();
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save