From 2e6f528a79dd0422c25a386ed2fa5417ff6375d8 Mon Sep 17 00:00:00 2001 From: tamguo Date: Tue, 13 Nov 2018 15:46:36 +0800 Subject: [PATCH] reconsitution --- tamguo-bms/.classpath | 2 +- .../org.eclipse.core.resources.prefs | 6 + .../.settings/org.eclipse.jdt.core.prefs | 6 +- tamguo-bms/pom.xml | 159 ++++++++++++++++++ .../src/main/java/com/tamguo/Application.java | 36 ++++ .../config/dao/MyMetaObjectHandler.java | 23 +++ .../tamguo/config/dao/MybatisPlusConfig.java | 93 ++++++++++ .../tamguo/config/web/ErrorConfigurar.java | 21 +++ .../tamguo/config/web/ThymeleafConfig.java | 40 +++++ .../java/com/tamguo/config/web/WebConfig.java | 18 ++ .../src/main/resources/application.properties | 62 +++++++ .../src/main/resources/ehcache-shiro.xml | 11 ++ tamguo-bms/src/main/resources/redis.xml | 9 + .../modules/book/dao/BookCategoryMapper.java | 8 + .../tamguo/modules/book/dao/BookMapper.java | 8 + .../modules/book/dao/DocumentMapper.java | 8 + .../book/model/BookCategoryEntity.java | 112 ++++++++++++ .../tamguo/modules/book/model/BookEntity.java | 84 +++++++++ .../modules/book/model/DocumentEntity.java | 63 +++++++ .../modules/book/service/BookService.java | 8 + .../book/service/impl/BookServiceImpl.java | 13 ++ .../modules/tiku/dao/ChapterMapper.java | 2 +- .../{BookMapper.java => KnowPointMapper.java} | 6 +- .../tamguo/modules/tiku/model/AdEntity.java | 2 +- .../modules/tiku/model/ChapterEntity.java | 2 +- .../modules/tiku/model/CourseEntity.java | 2 +- .../{BookEntity.java => KnowPointEntity.java} | 4 +- .../tamguo/modules/tiku/model/MenuEntity.java | 2 +- .../modules/tiku/model/PaperEntity.java | 2 +- .../tiku/model/QuestionAnswerEntity.java | 2 +- .../modules/tiku/model/QuestionEntity.java | 2 +- .../modules/tiku/model/SchoolEntity.java | 2 +- .../modules/tiku/model/SubjectEntity.java | 2 +- ...ookService.java => IKnowPointService.java} | 10 +- .../tiku/service/impl/ChapterServiceImpl.java | 8 +- ...iceImpl.java => KnowPointServiceImpl.java} | 42 ++--- .../resources/mappers/tiku/BookMapper.xml | 10 +- ...ntroller.java => KnowPointController.java} | 42 ++--- .../src/main/resources/application.properties | 2 +- .../modules/tiku/{book => knowpoint}/add.html | 5 +- .../tiku/{book => knowpoint}/index.html | 7 +- .../tiku/{book => knowpoint}/list.html | 16 +- .../tiku/{book => knowpoint}/update.html | 23 ++- .../com/tamguo/web/tiku/CourseController.java | 20 +-- ...ntroller.java => KnowPointController.java} | 26 +-- .../tamguo/web/tiku/SubjectController.java | 10 +- .../src/main/resources/application.properties | 8 +- .../src/main/resources/templates/chapter.html | 2 +- .../templates/{book.html => knowpoint.html} | 2 +- 49 files changed, 916 insertions(+), 137 deletions(-) create mode 100644 tamguo-bms/.settings/org.eclipse.core.resources.prefs create mode 100644 tamguo-bms/src/main/java/com/tamguo/Application.java create mode 100644 tamguo-bms/src/main/java/com/tamguo/config/dao/MyMetaObjectHandler.java create mode 100644 tamguo-bms/src/main/java/com/tamguo/config/dao/MybatisPlusConfig.java create mode 100644 tamguo-bms/src/main/java/com/tamguo/config/web/ErrorConfigurar.java create mode 100644 tamguo-bms/src/main/java/com/tamguo/config/web/ThymeleafConfig.java create mode 100644 tamguo-bms/src/main/java/com/tamguo/config/web/WebConfig.java create mode 100644 tamguo-bms/src/main/resources/application.properties create mode 100644 tamguo-bms/src/main/resources/ehcache-shiro.xml create mode 100644 tamguo-bms/src/main/resources/redis.xml create mode 100644 tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/BookCategoryMapper.java create mode 100644 tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/BookMapper.java create mode 100644 tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/DocumentMapper.java create mode 100644 tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/BookCategoryEntity.java create mode 100644 tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/BookEntity.java create mode 100644 tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/DocumentEntity.java create mode 100644 tamguo-modules-core/src/main/java/com/tamguo/modules/book/service/BookService.java create mode 100644 tamguo-modules-core/src/main/java/com/tamguo/modules/book/service/impl/BookServiceImpl.java rename tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/{BookMapper.java => KnowPointMapper.java} (53%) rename tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/{BookEntity.java => KnowPointEntity.java} (93%) rename tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/{IBookService.java => IKnowPointService.java} (55%) rename tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/{BookServiceImpl.java => KnowPointServiceImpl.java} (71%) rename tamguo-oms/src/main/java/com/tamguo/modules/tiku/web/{BookController.java => KnowPointController.java} (71%) rename tamguo-oms/src/main/resources/templates/modules/tiku/{book => knowpoint}/add.html (94%) rename tamguo-oms/src/main/resources/templates/modules/tiku/{book => knowpoint}/index.html (91%) rename tamguo-oms/src/main/resources/templates/modules/tiku/{book => knowpoint}/list.html (87%) rename tamguo-oms/src/main/resources/templates/modules/tiku/{book => knowpoint}/update.html (87%) rename tamguo-tms/src/main/java/com/tamguo/web/tiku/{BookController.java => KnowPointController.java} (67%) rename tamguo-tms/src/main/resources/templates/{book.html => knowpoint.html} (95%) diff --git a/tamguo-bms/.classpath b/tamguo-bms/.classpath index d58ab93..16c89cc 100644 --- a/tamguo-bms/.classpath +++ b/tamguo-bms/.classpath @@ -22,7 +22,7 @@ - + diff --git a/tamguo-bms/.settings/org.eclipse.core.resources.prefs b/tamguo-bms/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..04cfa2c --- /dev/null +++ b/tamguo-bms/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/tamguo-bms/.settings/org.eclipse.jdt.core.prefs b/tamguo-bms/.settings/org.eclipse.jdt.core.prefs index 8626026..d59e09c 100644 --- a/tamguo-bms/.settings/org.eclipse.jdt.core.prefs +++ b/tamguo-bms/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/tamguo-bms/pom.xml b/tamguo-bms/pom.xml index 702843b..01e4712 100644 --- a/tamguo-bms/pom.xml +++ b/tamguo-bms/pom.xml @@ -3,4 +3,163 @@ com.tamguo tamguo-bms 1.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.0.3.RELEASE + + + + + UTF-8 + 1.8 + 2.1.9 + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-jdbc + + + + com.baomidou + mybatis-plus-boot-starter + ${mybatis-plus-boot-starter.version} + + + tomcat-jdbc + org.apache.tomcat + + + + + + net.sourceforge.nekohtml + nekohtml + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-starter-redis + 1.3.8.RELEASE + + + org.springframework.session + spring-session-data-redis + + + com.github.theborakompanioni + thymeleaf-extras-shiro + 1.2.1 + + + com.alibaba + fastjson + 1.2.32 + + + org.apache.shiro + shiro-spring + 1.2.5 + + + org.apache.shiro + shiro-ehcache + 1.2.5 + + + cn.songxinqiang + com.baidu.ueditor + 1.1.2-edit-1.0 + + + commons-codec + commons-codec + + + commons-fileupload + commons-fileupload + 1.3.1 + + + commons-io + commons-io + + + com.alibaba + druid + 1.0.18 + + + mysql + mysql-connector-java + + + org.apache.commons + commons-lang3 + + + com.aliyun + aliyun-java-sdk-dysmsapi + 1.0.0 + + + com.aliyun + aliyun-java-sdk-core + 3.2.8 + + + org.apache.commons + commons-email + 1.5 + + + + com.bladejava + blade-patchca + 1.0.5 + + + + com.tamguo + tamguo-modules-core + 1.0.0 + + + + + + + org.springframework.cloud + spring-cloud-dependencies + Camden.SR6 + pom + import + + + + + + bms + + + org.springframework.boot + spring-boot-maven-plugin + + + \ No newline at end of file diff --git a/tamguo-bms/src/main/java/com/tamguo/Application.java b/tamguo-bms/src/main/java/com/tamguo/Application.java new file mode 100644 index 0000000..d1d90b8 --- /dev/null +++ b/tamguo-bms/src/main/java/com/tamguo/Application.java @@ -0,0 +1,36 @@ +package com.tamguo; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.http.HttpMessageConverters; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; + +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.alibaba.fastjson.support.config.FastJsonConfig; +import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; + +@SpringBootApplication +@ComponentScan("com.tamguo") +public class Application { + + public static void main(String[] args) { + new SpringApplicationBuilder(Application.class).run(args); + } + + /** + * FastJson替代Jackson + * @return + */ + @Bean + public HttpMessageConverters fastJsonHttpMessageConverters() { + FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter(); + FastJsonConfig fastJsonConfig = new FastJsonConfig(); + fastJsonConfig.setDateFormat("yyyy-MM-dd HH:mm:ss"); + fastJsonConfig.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect); + fastConverter.setFastJsonConfig(fastJsonConfig); + FastJsonHttpMessageConverter converter = fastConverter; + return new HttpMessageConverters(converter); + } + +} diff --git a/tamguo-bms/src/main/java/com/tamguo/config/dao/MyMetaObjectHandler.java b/tamguo-bms/src/main/java/com/tamguo/config/dao/MyMetaObjectHandler.java new file mode 100644 index 0000000..9b0c21d --- /dev/null +++ b/tamguo-bms/src/main/java/com/tamguo/config/dao/MyMetaObjectHandler.java @@ -0,0 +1,23 @@ +package com.tamguo.config.dao; + +import com.baomidou.mybatisplus.mapper.MetaObjectHandler; +import org.apache.ibatis.reflection.MetaObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 注入公共字段自动填充,任选注入方式即可 + */ +//@Component +public class MyMetaObjectHandler extends MetaObjectHandler { + + protected final static Logger logger = LoggerFactory.getLogger(MyMetaObjectHandler.class); + + @Override + public void insertFill(MetaObject metaObject) { + } + + @Override + public void updateFill(MetaObject metaObject) { + } +} diff --git a/tamguo-bms/src/main/java/com/tamguo/config/dao/MybatisPlusConfig.java b/tamguo-bms/src/main/java/com/tamguo/config/dao/MybatisPlusConfig.java new file mode 100644 index 0000000..47d0386 --- /dev/null +++ b/tamguo-bms/src/main/java/com/tamguo/config/dao/MybatisPlusConfig.java @@ -0,0 +1,93 @@ +package com.tamguo.config.dao; + +import java.util.ArrayList; +import java.util.List; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import com.baomidou.mybatisplus.mapper.ISqlInjector; +import com.baomidou.mybatisplus.mapper.LogicSqlInjector; +import com.baomidou.mybatisplus.mapper.MetaObjectHandler; +import com.baomidou.mybatisplus.plugins.PaginationInterceptor; +import com.baomidou.mybatisplus.plugins.PerformanceInterceptor; +import com.baomidou.mybatisplus.plugins.parser.ISqlParser; +import com.baomidou.mybatisplus.plugins.parser.tenant.TenantHandler; +import com.baomidou.mybatisplus.plugins.parser.tenant.TenantSqlParser; + +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.LongValue; + +@Configuration +@MapperScan("com.tamguo.modules.*.dao*") +public class MybatisPlusConfig { + + @Bean + public PerformanceInterceptor performanceInterceptor() { + return new PerformanceInterceptor(); + } + + /** + * mybatis-plus分页插件
+ * 文档:http://mp.baomidou.com
+ */ + @Bean + public PaginationInterceptor paginationInterceptor() { + PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); + paginationInterceptor.setLocalPage(true);// 开启 PageHelper 的支持 + /* + * 【测试多租户】 SQL 解析处理拦截器
+ * 这里固定写成住户 1 实际情况你可以从cookie读取,因此数据看不到 【 麻花藤 】 这条记录( 注意观察 SQL )
+ */ + List sqlParserList = new ArrayList<>(); + TenantSqlParser tenantSqlParser = new TenantSqlParser(); + tenantSqlParser.setTenantHandler(new TenantHandler() { + @Override + public Expression getTenantId() { + return new LongValue(1L); + } + + @Override + public String getTenantIdColumn() { + return "course_id"; + } + + @Override + public boolean doTableFilter(String tableName) { + // 这里可以判断是否过滤表 + return true; + } + }); + + + sqlParserList.add(tenantSqlParser); + paginationInterceptor.setSqlParserList(sqlParserList); + // 以下过滤方式与 @SqlParser(filter = true) 注解等效 +// paginationInterceptor.setSqlParserFilter(new ISqlParserFilter() { +// @Override +// public boolean doFilter(MetaObject metaObject) { +// MappedStatement ms = PluginUtils.getMappedStatement(metaObject); +// // 过滤自定义查询此时无租户信息约束【 麻花藤 】出现 +// if ("com.baomidou.springboot.mapper.UserMapper.selectListBySQL".equals(ms.getId())) { +// return true; +// } +// return false; +// } +// }); + return paginationInterceptor; + } + + @Bean + public MetaObjectHandler metaObjectHandler(){ + return new MyMetaObjectHandler(); + } + + /** + * 注入sql注入器 + */ + @Bean + public ISqlInjector sqlInjector(){ + return new LogicSqlInjector(); + } +} diff --git a/tamguo-bms/src/main/java/com/tamguo/config/web/ErrorConfigurar.java b/tamguo-bms/src/main/java/com/tamguo/config/web/ErrorConfigurar.java new file mode 100644 index 0000000..9267271 --- /dev/null +++ b/tamguo-bms/src/main/java/com/tamguo/config/web/ErrorConfigurar.java @@ -0,0 +1,21 @@ +package com.tamguo.config.web; + +import org.springframework.boot.web.server.ErrorPage; +import org.springframework.boot.web.server.ErrorPageRegistrar; +import org.springframework.boot.web.server.ErrorPageRegistry; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Component; + +@Component +public class ErrorConfigurar implements ErrorPageRegistrar { + + @Override + public void registerErrorPages(ErrorPageRegistry registry) { + ErrorPage[] errorPages=new ErrorPage[2]; + errorPages[0]=new ErrorPage(HttpStatus.NOT_FOUND,"/error404"); + errorPages[1]=new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR,"/error500"); + + registry.addErrorPages(errorPages); + } + +} diff --git a/tamguo-bms/src/main/java/com/tamguo/config/web/ThymeleafConfig.java b/tamguo-bms/src/main/java/com/tamguo/config/web/ThymeleafConfig.java new file mode 100644 index 0000000..72756bd --- /dev/null +++ b/tamguo-bms/src/main/java/com/tamguo/config/web/ThymeleafConfig.java @@ -0,0 +1,40 @@ +package com.tamguo.config.web; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Resource; + +import org.springframework.context.EnvironmentAware; +import org.springframework.core.env.Environment; +import org.springframework.stereotype.Component; +import org.thymeleaf.spring5.view.ThymeleafViewResolver; + +import com.tamguo.common.utils.SystemConstant; + +@Component +public class ThymeleafConfig implements EnvironmentAware{ + + @Resource + private Environment env; + + @Resource + private void configureThymeleafStaticVars(ThymeleafViewResolver viewResolver) { + if(viewResolver != null) { + Map vars = new HashMap<>(); + vars.put("domainName", env.getProperty("domain.name")); + vars.put("adminDomain", env.getProperty("admin.domain.name")); + vars.put("PAPER_TYPE_ZHENTI", SystemConstant.ZHENGTI_PAPER_ID); + vars.put("PAPER_TYPE_MONI", SystemConstant.MONI_PAPER_ID); + vars.put("PAPER_TYPE_YATI", SystemConstant.YATI_PAPER_ID); + vars.put("PAPER_TYPE_MINGXIAO", SystemConstant.MINGXIAO_PAPER_ID); + vars.put("BEIJING_AREA_ID", SystemConstant.BEIJING_AREA_ID); + viewResolver.setStaticVariables(vars); + } + } + + @Override + public void setEnvironment(Environment environment) { + env = environment; + } + +} diff --git a/tamguo-bms/src/main/java/com/tamguo/config/web/WebConfig.java b/tamguo-bms/src/main/java/com/tamguo/config/web/WebConfig.java new file mode 100644 index 0000000..9c46b03 --- /dev/null +++ b/tamguo-bms/src/main/java/com/tamguo/config/web/WebConfig.java @@ -0,0 +1,18 @@ +package com.tamguo.config.web; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebConfig implements WebMvcConfigurer { + + @Value("${file.storage.path}") + private String fileStoragePath; + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/files/**").addResourceLocations("file:"+fileStoragePath); + } +} diff --git a/tamguo-bms/src/main/resources/application.properties b/tamguo-bms/src/main/resources/application.properties new file mode 100644 index 0000000..804550b --- /dev/null +++ b/tamguo-bms/src/main/resources/application.properties @@ -0,0 +1,62 @@ +domain.name=http://localhost:8083/ +admin.domain.name=http://localhost:8083/ +server.port=8083 +jasypt.encryptor.password=tamguo + +spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 +spring.datasource.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.filters=stat,wall,log4j +spring.datasource.initialSize=5 +spring.datasource.maxActive=20 +spring.datasource.maxPoolPreparedStatementPerConnectionSize=20 +spring.datasource.maxWait=60000 +spring.datasource.minEvictableIdleTimeMillis=300000 +spring.datasource.minIdle=5 +spring.datasource.password=123456 +spring.datasource.poolPreparedStatements=true +spring.datasource.testOnBorrow=false +spring.datasource.testOnReturn=false +spring.datasource.testWhileIdle=true +spring.datasource.timeBetweenEvictionRunsMillis=60000 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/tamguo_20181110?useUnicode=true&characterEncoding=UTF-8&useSSL=false +spring.datasource.username=root +spring.datasource.validationQuery=SELECT 1 FROM DUAL + +mybatis-plus.mapper-locations=classpath:/mappers/*Mapper.xml +mybatis-plus.typeAliasesPackage=com.tamguo.modules.*.model +mybatis-plus.typeEnumsPackage=com.tamguo.modules.*.model.enums +mybatis-plus.global-config.id-type=5 +mybatis-plus.global-config.field-strategy=2 +mybatis-plus.global-config.db-column-underline=true +mybatis-plus.global-config.refresh-mapper=true +mybatis-plus.global-config.key-generator=com.baomidou.mybatisplus.incrementer.H2KeyGenerator +mybatis-plus.global-config.logic-delete-value=0 +mybatis-plus.global-config.logic-not-delete-value=1 +mybatis-plus.global-config.sql-injector=com.baomidou.mybatisplus.mapper.LogicSqlInjector +mybatis-plus.global-config.meta-object-handler=com.tamguo.config.dao.MyMetaObjectHandler +mybatis-plus.global-config.sql-parser-cache=true +mybatis-plus.configuration.map-underscore-to-camel-case=true +mybatis-plus.configuration.cache-enabled=false + +spring.thymeleaf.prefix=classpath:/templates/ +spring.thymeleaf.suffix=.html +spring.thymeleaf.mode=LEGACYHTML5 +spring.thymeleaf.encoding=UTF-8 +spring.thymeleaf.content-type=text/html +spring.thymeleaf.cache=false + +redis.hostname=127.0.0.1 +redis.port=6379 +redis.password= + +logging.level.root=INFO +logging.level.org.springframework.web=INFO +logging.file=/home/webdata/log/tamguo.log +logging.pattern.console=%d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n +logging.pattern.file=%d{yyyy/MM/dd-HH:mm} [%thread] %-5level %logger- %msg%n + +server.compression.enabled=true +server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain + +file.storage.path=/home/webdata/files/ \ No newline at end of file diff --git a/tamguo-bms/src/main/resources/ehcache-shiro.xml b/tamguo-bms/src/main/resources/ehcache-shiro.xml new file mode 100644 index 0000000..03ae4ff --- /dev/null +++ b/tamguo-bms/src/main/resources/ehcache-shiro.xml @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/tamguo-bms/src/main/resources/redis.xml b/tamguo-bms/src/main/resources/redis.xml new file mode 100644 index 0000000..ed04f74 --- /dev/null +++ b/tamguo-bms/src/main/resources/redis.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/BookCategoryMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/BookCategoryMapper.java new file mode 100644 index 0000000..2753713 --- /dev/null +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/BookCategoryMapper.java @@ -0,0 +1,8 @@ +package com.tamguo.modules.book.dao; + +import com.baomidou.mybatisplus.mapper.BaseMapper; +import com.tamguo.modules.book.model.BookCategoryEntity; + +public interface BookCategoryMapper extends BaseMapper{ + +} diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/BookMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/BookMapper.java new file mode 100644 index 0000000..c37a06a --- /dev/null +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/BookMapper.java @@ -0,0 +1,8 @@ +package com.tamguo.modules.book.dao; + +import com.baomidou.mybatisplus.mapper.BaseMapper; +import com.tamguo.modules.book.model.BookEntity; + +public interface BookMapper extends BaseMapper { + +} diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/DocumentMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/DocumentMapper.java new file mode 100644 index 0000000..6034e36 --- /dev/null +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/dao/DocumentMapper.java @@ -0,0 +1,8 @@ +package com.tamguo.modules.book.dao; + +import com.baomidou.mybatisplus.mapper.BaseMapper; +import com.tamguo.modules.book.model.DocumentEntity; + +public interface DocumentMapper extends BaseMapper{ + +} diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/BookCategoryEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/BookCategoryEntity.java new file mode 100644 index 0000000..0fe793a --- /dev/null +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/BookCategoryEntity.java @@ -0,0 +1,112 @@ +package com.tamguo.modules.book.model; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotations.TableId; +import com.baomidou.mybatisplus.annotations.TableName; + +@TableName(value="b_book_category") +public class BookCategoryEntity { + + @TableId + private String id; + private String parentCode; + private String parentCodes; + private String treeSort; + private String treeSorts; + private String treeLeaf; + private String treeLevel; + private String treeNames; + private String name; + private String seoTitle; + private String seoKeywords; + private String seoDescription; + private Date createDate; + private Date updateDate; + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getParentCode() { + return parentCode; + } + public void setParentCode(String parentCode) { + this.parentCode = parentCode; + } + public String getParentCodes() { + return parentCodes; + } + public void setParentCodes(String parentCodes) { + this.parentCodes = parentCodes; + } + public String getTreeSort() { + return treeSort; + } + public void setTreeSort(String treeSort) { + this.treeSort = treeSort; + } + public String getTreeSorts() { + return treeSorts; + } + public void setTreeSorts(String treeSorts) { + this.treeSorts = treeSorts; + } + public String getTreeLeaf() { + return treeLeaf; + } + public void setTreeLeaf(String treeLeaf) { + this.treeLeaf = treeLeaf; + } + public String getTreeLevel() { + return treeLevel; + } + public void setTreeLevel(String treeLevel) { + this.treeLevel = treeLevel; + } + public String getTreeNames() { + return treeNames; + } + public void setTreeNames(String treeNames) { + this.treeNames = treeNames; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getSeoTitle() { + return seoTitle; + } + public void setSeoTitle(String seoTitle) { + this.seoTitle = seoTitle; + } + public String getSeoKeywords() { + return seoKeywords; + } + public void setSeoKeywords(String seoKeywords) { + this.seoKeywords = seoKeywords; + } + public String getSeoDescription() { + return seoDescription; + } + public void setSeoDescription(String seoDescription) { + this.seoDescription = seoDescription; + } + public Date getCreateDate() { + return createDate; + } + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + public Date getUpdateDate() { + return updateDate; + } + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + +} diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/BookEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/BookEntity.java new file mode 100644 index 0000000..840a120 --- /dev/null +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/BookEntity.java @@ -0,0 +1,84 @@ +package com.tamguo.modules.book.model; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotations.TableId; +import com.baomidou.mybatisplus.annotations.TableName; + +@TableName(value="b_book") +public class BookEntity { + + @TableId + private String id; + private String categoryId; + private String bookImage; + private String owner; + private String name; + private String seoTitle; + private String seoKeywords; + private String seoDescription; + private Date createDate; + private Date updateDate; + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getCategoryId() { + return categoryId; + } + public void setCategoryId(String categoryId) { + this.categoryId = categoryId; + } + public String getOwner() { + return owner; + } + public void setOwner(String owner) { + this.owner = owner; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getSeoTitle() { + return seoTitle; + } + public void setSeoTitle(String seoTitle) { + this.seoTitle = seoTitle; + } + public String getSeoKeywords() { + return seoKeywords; + } + public void setSeoKeywords(String seoKeywords) { + this.seoKeywords = seoKeywords; + } + public String getSeoDescription() { + return seoDescription; + } + public void setSeoDescription(String seoDescription) { + this.seoDescription = seoDescription; + } + public Date getCreateDate() { + return createDate; + } + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + public Date getUpdateDate() { + return updateDate; + } + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + public String getBookImage() { + return bookImage; + } + public void setBookImage(String bookImage) { + this.bookImage = bookImage; + } + +} diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/DocumentEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/DocumentEntity.java new file mode 100644 index 0000000..db6a518 --- /dev/null +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/model/DocumentEntity.java @@ -0,0 +1,63 @@ +package com.tamguo.modules.book.model; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotations.TableId; +import com.baomidou.mybatisplus.annotations.TableName; + +@TableName(value="b_document") +public class DocumentEntity { + + @TableId + private String id; + private String bookId; + private String owner; + private String name; + private String status; + private Date createDate; + private Date updateDate; + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getBookId() { + return bookId; + } + public void setBookId(String bookId) { + this.bookId = bookId; + } + public String getOwner() { + return owner; + } + public void setOwner(String owner) { + this.owner = owner; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + public Date getCreateDate() { + return createDate; + } + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + public Date getUpdateDate() { + return updateDate; + } + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + +} diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/book/service/BookService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/service/BookService.java new file mode 100644 index 0000000..7693909 --- /dev/null +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/service/BookService.java @@ -0,0 +1,8 @@ +package com.tamguo.modules.book.service; + +import com.baomidou.mybatisplus.service.IService; +import com.tamguo.modules.book.model.BookEntity; + +public interface BookService extends IService{ + +} diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/book/service/impl/BookServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/service/impl/BookServiceImpl.java new file mode 100644 index 0000000..92b46fb --- /dev/null +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/book/service/impl/BookServiceImpl.java @@ -0,0 +1,13 @@ +package com.tamguo.modules.book.service.impl; + +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import com.tamguo.modules.book.dao.BookMapper; +import com.tamguo.modules.book.model.BookEntity; +import com.tamguo.modules.book.service.BookService; + +@Service(value="bbookServiceImpl") +public class BookServiceImpl extends ServiceImpl implements BookService{ + +} diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/ChapterMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/ChapterMapper.java index aa67b54..f25bf36 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/ChapterMapper.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/ChapterMapper.java @@ -8,7 +8,7 @@ import com.tamguo.modules.tiku.model.ChapterEntity; public interface ChapterMapper extends SuperMapper{ - @Select("select * from tiku_chapter where parent_code = #{parentCode} and id = (select min(id) from tiku_chapter where id > #{id})") + @Select("select * from t_chapter where parent_code = #{parentCode} and id = (select min(id) from t_chapter where id > #{id})") ChapterEntity selectNextChapter(@Param(value="parentCode")String parentCode , @Param(value="id")String id); } diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/BookMapper.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/KnowPointMapper.java similarity index 53% rename from tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/BookMapper.java rename to tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/KnowPointMapper.java index 7b10109..ac940d2 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/BookMapper.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/dao/KnowPointMapper.java @@ -4,10 +4,10 @@ import java.util.List; import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.plugins.pagination.Pagination; -import com.tamguo.modules.tiku.model.BookEntity; +import com.tamguo.modules.tiku.model.KnowPointEntity; import com.tamguo.modules.tiku.model.condition.BookCondition; -public interface BookMapper extends BaseMapper{ +public interface KnowPointMapper extends BaseMapper{ - List listData(Pagination page , BookCondition condition); + List listData(Pagination page , BookCondition condition); } diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/AdEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/AdEntity.java index 60d1746..eac3d81 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/AdEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/AdEntity.java @@ -11,7 +11,7 @@ import com.tamguo.config.dao.SuperEntity; * The persistent class for the tiku_ad database table. * */ -@TableName(value="tiku_ad") +@TableName(value="t_ad") public class AdEntity extends SuperEntity implements Serializable { private static final long serialVersionUID = 1L; diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/ChapterEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/ChapterEntity.java index db1499c..9e7d0e3 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/ChapterEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/ChapterEntity.java @@ -16,7 +16,7 @@ import java.util.List; * The persistent class for the tiku_chapter database table. * */ -@TableName(value="tiku_chapter") +@TableName(value="t_chapter") public class ChapterEntity extends SuperEntity implements Serializable { private static final long serialVersionUID = 1L; diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/CourseEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/CourseEntity.java index c19cbd5..7b05b35 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/CourseEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/CourseEntity.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.FieldFill; import com.tamguo.modules.tiku.model.enums.CourseStatusEnum; -@TableName(value="tiku_course") +@TableName(value="t_course") public class CourseEntity { @TableId diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/BookEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/KnowPointEntity.java similarity index 93% rename from tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/BookEntity.java rename to tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/KnowPointEntity.java index b43d078..d3ec257 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/BookEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/KnowPointEntity.java @@ -9,8 +9,8 @@ import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.FieldFill; import com.tamguo.modules.tiku.model.enums.BookStatusEnum; -@TableName(value="tiku_book") -public class BookEntity { +@TableName(value="t_know_point") +public class KnowPointEntity { @TableId private String id; diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/MenuEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/MenuEntity.java index 8977658..70bdf99 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/MenuEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/MenuEntity.java @@ -12,7 +12,7 @@ import java.util.List; * The persistent class for the tiku_subject database table. * */ -@TableName(value="tiku_menu") +@TableName(value="t_menu") public class MenuEntity extends SuperEntity implements Serializable { private static final long serialVersionUID = 1L; diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/PaperEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/PaperEntity.java index e1a4785..d62566a 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/PaperEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/PaperEntity.java @@ -13,7 +13,7 @@ import com.tamguo.config.dao.SuperEntity; * The persistent class for the tiku_chapter database table. * */ -@TableName(value="tiku_paper") +@TableName(value="t_paper") public class PaperEntity extends SuperEntity implements Serializable { private static final long serialVersionUID = 1L; diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/QuestionAnswerEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/QuestionAnswerEntity.java index d6f5a3e..df1ab6c 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/QuestionAnswerEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/QuestionAnswerEntity.java @@ -5,7 +5,7 @@ import java.util.Date; import com.baomidou.mybatisplus.annotations.TableName; import com.tamguo.config.dao.SuperEntity; -@TableName(value="tiku_question_answer") +@TableName(value="t_question_answer") public class QuestionAnswerEntity extends SuperEntity implements Serializable{ private static final long serialVersionUID = 1L; diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/QuestionEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/QuestionEntity.java index 523caee..92bcc11 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/QuestionEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/QuestionEntity.java @@ -9,7 +9,7 @@ import com.tamguo.config.dao.SuperEntity; * The persistent class for the tiku_question database table. * */ -@TableName(value="tiku_question") +@TableName(value="t_question") public class QuestionEntity extends SuperEntity implements Serializable { private static final long serialVersionUID = 1L; diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/SchoolEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/SchoolEntity.java index 9cb872b..3cf3337 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/SchoolEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/SchoolEntity.java @@ -12,7 +12,7 @@ import com.tamguo.config.dao.SuperEntity; * The persistent class for the tiku_chapter database table. * */ -@TableName(value="tiku_school") +@TableName(value="t_school") public class SchoolEntity extends SuperEntity implements Serializable { private static final long serialVersionUID = 1L; diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/SubjectEntity.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/SubjectEntity.java index 5d28480..804e902 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/SubjectEntity.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/model/SubjectEntity.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.FieldFill; import com.tamguo.modules.tiku.model.enums.SubjectStatusEnum; -@TableName(value="tiku_subject") +@TableName(value="t_subject") public class SubjectEntity { @TableId diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/IBookService.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/IKnowPointService.java similarity index 55% rename from tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/IBookService.java rename to tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/IKnowPointService.java index 9f49788..5a6806e 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/IBookService.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/IKnowPointService.java @@ -3,16 +3,16 @@ package com.tamguo.modules.tiku.service; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.plugins.Page; import com.baomidou.mybatisplus.service.IService; -import com.tamguo.modules.tiku.model.BookEntity; +import com.tamguo.modules.tiku.model.KnowPointEntity; import com.tamguo.modules.tiku.model.condition.BookCondition; -public interface IBookService extends IService{ +public interface IKnowPointService extends IService{ - Page listData(BookCondition condition); + Page listData(BookCondition condition); - void save(BookEntity book); + void save(KnowPointEntity book); - void update(BookEntity book); + void update(KnowPointEntity book); void delete(String id); diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/ChapterServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/ChapterServiceImpl.java index 23b0486..0661670 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/ChapterServiceImpl.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/ChapterServiceImpl.java @@ -14,10 +14,10 @@ import com.baomidou.mybatisplus.mapper.Condition; import com.baomidou.mybatisplus.plugins.Page; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.tamguo.common.utils.SystemConstant; -import com.tamguo.modules.tiku.dao.BookMapper; +import com.tamguo.modules.tiku.dao.KnowPointMapper; import com.tamguo.modules.tiku.dao.ChapterMapper; import com.tamguo.modules.tiku.dao.CourseMapper; -import com.tamguo.modules.tiku.model.BookEntity; +import com.tamguo.modules.tiku.model.KnowPointEntity; import com.tamguo.modules.tiku.model.ChapterEntity; import com.tamguo.modules.tiku.model.condition.ChapterCondition; import com.tamguo.modules.tiku.model.enums.ChapterStatusEnum; @@ -31,7 +31,7 @@ public class ChapterServiceImpl extends ServiceImpl findCourseChapter(String courseId) { - List bookList = bookMapper.selectList(Condition.create().eq("course_id", courseId)); + List bookList = bookMapper.selectList(Condition.create().eq("course_id", courseId)); if(bookList.size() == 0) { return null; } diff --git a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/BookServiceImpl.java b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/KnowPointServiceImpl.java similarity index 71% rename from tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/BookServiceImpl.java rename to tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/KnowPointServiceImpl.java index 44acc9f..e25f77f 100644 --- a/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/BookServiceImpl.java +++ b/tamguo-modules-core/src/main/java/com/tamguo/modules/tiku/service/impl/KnowPointServiceImpl.java @@ -11,23 +11,23 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.Condition; import com.baomidou.mybatisplus.plugins.Page; import com.baomidou.mybatisplus.service.impl.ServiceImpl; -import com.tamguo.modules.tiku.dao.BookMapper; +import com.tamguo.modules.tiku.dao.KnowPointMapper; import com.tamguo.modules.tiku.dao.CourseMapper; import com.tamguo.modules.tiku.dao.SubjectMapper; -import com.tamguo.modules.tiku.model.BookEntity; +import com.tamguo.modules.tiku.model.KnowPointEntity; import com.tamguo.modules.tiku.model.CourseEntity; import com.tamguo.modules.tiku.model.SubjectEntity; import com.tamguo.modules.tiku.model.condition.BookCondition; import com.tamguo.modules.tiku.model.enums.BookStatusEnum; import com.tamguo.modules.tiku.model.enums.CourseStatusEnum; import com.tamguo.modules.tiku.model.enums.SubjectStatusEnum; -import com.tamguo.modules.tiku.service.IBookService; +import com.tamguo.modules.tiku.service.IKnowPointService; @Service -public class BookServiceImpl extends ServiceImpl implements IBookService{ +public class KnowPointServiceImpl extends ServiceImpl implements IKnowPointService{ @Autowired - BookMapper bookMapper; + KnowPointMapper knowPointMapper; @Autowired CourseMapper courseMapper; @Autowired @@ -35,26 +35,26 @@ public class BookServiceImpl extends ServiceImpl impleme @Transactional(readOnly=false) @Override - public Page listData(BookCondition condition) { - Page page = new Page<>(condition.getPageNo() , condition.getPageSize()); - return page.setRecords(bookMapper.listData(page, condition)); + public Page listData(BookCondition condition) { + Page page = new Page<>(condition.getPageNo() , condition.getPageSize()); + return page.setRecords(knowPointMapper.listData(page, condition)); } @Transactional(readOnly=false) @Override - public void save(BookEntity book) { + public void save(KnowPointEntity book) { CourseEntity course = courseMapper.selectById(book.getCourseId()); book.setStatus(BookStatusEnum.NORMAL); book.setSubjectId(course.getSubjectId()); - bookMapper.insert(book); + knowPointMapper.insert(book); } @Transactional(readOnly=false) @Override - public void update(BookEntity book) { + public void update(KnowPointEntity book) { CourseEntity course = courseMapper.selectById(book.getCourseId()); - BookEntity entity = bookMapper.selectById(book.getId()); + KnowPointEntity entity = knowPointMapper.selectById(book.getId()); entity.setName(book.getName()); entity.setPointNum(book.getPointNum()); @@ -64,31 +64,31 @@ public class BookServiceImpl extends ServiceImpl impleme entity.setSort(book.getSort()); entity.setCourseId(course.getId()); - bookMapper.updateById(entity); + knowPointMapper.updateById(entity); } @Transactional(readOnly=false) @Override public void delete(String id) { - BookEntity book = bookMapper.selectById(id); + KnowPointEntity book = knowPointMapper.selectById(id); book.setStatus(BookStatusEnum.DELETE); - bookMapper.updateById(book); + knowPointMapper.updateById(book); } @Transactional(readOnly=false) @Override public void enable(String id) { - BookEntity book = bookMapper.selectById(id); + KnowPointEntity book = knowPointMapper.selectById(id); book.setStatus(BookStatusEnum.NORMAL); - bookMapper.updateById(book); + knowPointMapper.updateById(book); } @Transactional(readOnly=false) @Override public void disabled(String id) { - BookEntity book = bookMapper.selectById(id); + KnowPointEntity book = knowPointMapper.selectById(id); book.setStatus(BookStatusEnum.DISABLED); - bookMapper.updateById(book); + knowPointMapper.updateById(book); } @Transactional(readOnly=false) @@ -97,11 +97,11 @@ public class BookServiceImpl extends ServiceImpl impleme public JSONArray treeData() { List subjectList = subjectMapper.selectList(Condition.create().eq("status", SubjectStatusEnum.NORMAL.getValue())); List courseList = courseMapper.selectList(Condition.create().eq("status", CourseStatusEnum.NORMAL.getValue())); - List bookList = bookMapper.selectList(Condition.create().eq("status", BookStatusEnum.NORMAL.getValue())); + List bookList = knowPointMapper.selectList(Condition.create().eq("status", BookStatusEnum.NORMAL.getValue())); return transform(subjectList, courseList , bookList); } - private JSONArray transform(List subjectList , List courseList , List bookList) { + private JSONArray transform(List subjectList , List courseList , List bookList) { JSONArray entitys = new JSONArray(); for(int i=0 ; i - + - SELECT b.id, b.subject_id, @@ -20,9 +20,9 @@ s.name AS subject_name, c.name AS course_name FROM - tiku_book b - LEFT JOIN tiku_subject s ON s.id = b.subject_id - LEFT JOIN tiku_course c ON c.id = b.course_id + t_know_point b + LEFT JOIN t_subject s ON s.id = b.subject_id + LEFT JOIN t_course c ON c.id = b.course_id WHERE 1 = 1 diff --git a/tamguo-oms/src/main/java/com/tamguo/modules/tiku/web/BookController.java b/tamguo-oms/src/main/java/com/tamguo/modules/tiku/web/KnowPointController.java similarity index 71% rename from tamguo-oms/src/main/java/com/tamguo/modules/tiku/web/BookController.java rename to tamguo-oms/src/main/java/com/tamguo/modules/tiku/web/KnowPointController.java index df57f74..a5f2db6 100644 --- a/tamguo-oms/src/main/java/com/tamguo/modules/tiku/web/BookController.java +++ b/tamguo-oms/src/main/java/com/tamguo/modules/tiku/web/KnowPointController.java @@ -12,38 +12,38 @@ import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.plugins.Page; import com.tamguo.common.utils.ExceptionSupport; import com.tamguo.common.utils.Result; -import com.tamguo.modules.tiku.model.BookEntity; +import com.tamguo.modules.tiku.model.KnowPointEntity; import com.tamguo.modules.tiku.model.CourseEntity; import com.tamguo.modules.tiku.model.condition.BookCondition; -import com.tamguo.modules.tiku.service.IBookService; +import com.tamguo.modules.tiku.service.IKnowPointService; import com.tamguo.modules.tiku.service.ICourseService; @Controller -@RequestMapping(path="tiku/book") -public class BookController { +@RequestMapping(path="tiku/knowpoint") +public class KnowPointController { /** 书籍*/ - private final String BOOK_LIST_PAGE = "modules/tiku/book/list"; - private final String BOOK_UPDATE_PAGE = "modules/tiku/book/update"; + private final String KNOWPOINT_LIST_PAGE = "modules/tiku/knowpoint/list"; + private final String KNOWPOINT_UPDATE_PAGE = "modules/tiku/knowpoint/update"; @Autowired - private IBookService iBookService; + private IKnowPointService iKnowPointService; @Autowired private ICourseService iCourseService; @RequestMapping(path="list") public ModelAndView index(ModelAndView model) { - model.setViewName(BOOK_LIST_PAGE); + model.setViewName(KNOWPOINT_LIST_PAGE); return model; } @RequestMapping(path="update") public ModelAndView update(String id, ModelAndView model) { - model.setViewName(BOOK_UPDATE_PAGE); - BookEntity book = iBookService.selectById(id); - CourseEntity course = iCourseService.selectById(book.getCourseId()); - model.addObject("book", book); + model.setViewName(KNOWPOINT_UPDATE_PAGE); + KnowPointEntity knowpoint = iKnowPointService.selectById(id); + CourseEntity course = iCourseService.selectById(knowpoint.getCourseId()); + model.addObject("knowpoint", knowpoint); model.addObject("course", course); return model; } @@ -51,15 +51,15 @@ public class BookController { @RequestMapping(path="listData",method=RequestMethod.POST) @ResponseBody public Map listData(BookCondition condition) { - Page page = iBookService.listData(condition); + Page page = iKnowPointService.listData(condition); return Result.jqGridResult(page.getRecords(), page.getTotal(), page.getSize(), page.getCurrent(), page.getPages()); } @RequestMapping(path="save",method=RequestMethod.POST) @ResponseBody - public Result save(BookEntity book) { + public Result save(KnowPointEntity book) { try { - iBookService.save(book); + iKnowPointService.save(book); return Result.result(0, null, "保存书籍【"+book.getName()+"】成功"); } catch (Exception e) { return ExceptionSupport.resolverResult("保存书籍", this.getClass(), e); @@ -68,9 +68,9 @@ public class BookController { @RequestMapping(path="update",method=RequestMethod.POST) @ResponseBody - public Result update(BookEntity book) { + public Result update(KnowPointEntity book) { try { - iBookService.update(book); + iKnowPointService.update(book); return Result.result(0, null, "修改书籍【"+book.getName()+"】成功"); } catch (Exception e) { return ExceptionSupport.resolverResult("修改书籍", this.getClass(), e); @@ -81,7 +81,7 @@ public class BookController { @ResponseBody public Result delete(String id) { try { - iBookService.delete(id); + iKnowPointService.delete(id); return Result.result(0, null, "删除书籍成功"); } catch (Exception e) { return ExceptionSupport.resolverResult("删除书籍", this.getClass(), e); @@ -92,7 +92,7 @@ public class BookController { @ResponseBody public Result enable(String id) { try { - iBookService.enable(id); + iKnowPointService.enable(id); return Result.result(0, null, "激活书籍成功"); } catch (Exception e) { return ExceptionSupport.resolverResult("激活书籍", this.getClass(), e); @@ -103,7 +103,7 @@ public class BookController { @ResponseBody public Result disabled(String id) { try { - iBookService.disabled(id); + iKnowPointService.disabled(id); return Result.result(0, null, "停用书籍成功"); } catch (Exception e) { return ExceptionSupport.resolverResult("停用书籍", this.getClass(), e); @@ -113,6 +113,6 @@ public class BookController { @RequestMapping(path="treeData",method=RequestMethod.POST) @ResponseBody public JSONArray treeData() { - return iBookService.treeData(); + return iKnowPointService.treeData(); } } diff --git a/tamguo-oms/src/main/resources/application.properties b/tamguo-oms/src/main/resources/application.properties index a192994..c389bd4 100644 --- a/tamguo-oms/src/main/resources/application.properties +++ b/tamguo-oms/src/main/resources/application.properties @@ -20,7 +20,7 @@ spring.datasource.testOnReturn=false spring.datasource.testWhileIdle=true spring.datasource.timeBetweenEvictionRunsMillis=60000 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/tamguo?useUnicode=true&characterEncoding=UTF-8&useSSL=false +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/tamguo_20181110?useUnicode=true&characterEncoding=UTF-8&useSSL=false spring.datasource.username=root spring.datasource.validationQuery=SELECT 1 FROM DUAL diff --git a/tamguo-oms/src/main/resources/templates/modules/tiku/book/add.html b/tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/add.html similarity index 94% rename from tamguo-oms/src/main/resources/templates/modules/tiku/book/add.html rename to tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/add.html index cf76249..044923c 100644 --- a/tamguo-oms/src/main/resources/templates/modules/tiku/book/add.html +++ b/tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/add.html @@ -1,6 +1,5 @@ 书籍管理 - JeeSite Demo @@ -26,7 +25,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/> -
+
基本信息
diff --git a/tamguo-oms/src/main/resources/templates/modules/tiku/book/index.html b/tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/index.html similarity index 91% rename from tamguo-oms/src/main/resources/templates/modules/tiku/book/index.html rename to tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/index.html index c30b778..2540059 100644 --- a/tamguo-oms/src/main/resources/templates/modules/tiku/book/index.html +++ b/tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/index.html @@ -1,10 +1,9 @@ -书籍管理 - JeeSite Demo +书籍管理 - Tamguo OMS @@ -41,7 +40,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
+ th:src="${setting.domain + 'tiku/knowpoint/list'}">
diff --git a/tamguo-oms/src/main/resources/templates/modules/tiku/book/list.html b/tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/list.html similarity index 87% rename from tamguo-oms/src/main/resources/templates/modules/tiku/book/list.html rename to tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/list.html index 49c848c..59eb7e7 100644 --- a/tamguo-oms/src/main/resources/templates/modules/tiku/book/list.html +++ b/tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/list.html @@ -3,7 +3,7 @@ content="IE=edge"> -书籍管理 - JeeSite Demo +书籍管理 - Tamguo OMS @@ -25,7 +25,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
- +
@@ -171,7 +171,7 @@ $('#dataGrid').dataGrid({ searchForm: $("#searchForm"), columnModel: [ {header:'书籍编号', name:'id', index:'u.id', width:300, align:"center", frozen:true, formatter: function(val, obj, row, act){ - return ''+(val||row.id)+''; + return ''+(val||row.id)+''; }}, {header:'分类', name:'subjectName', index:'u.courseName', width:100, align:"center"}, {header:'科目', name:'courseName', index:'u.courseName', width:100, align:"center"}, @@ -189,14 +189,14 @@ $('#dataGrid').dataGrid({ }}, {header:'操作', name:'actions', width:160, sortable:false, title:false, formatter: function(val, obj, row, act){ var actions = []; - actions.push(' '); + actions.push(' '); if (row.status == "normal"){ - actions.push(' '); + actions.push(' '); } if (row.status == "disabled"){ - actions.push(' '); + actions.push(' '); } - actions.push(' '); + actions.push(' '); return actions.join(''); }} ], diff --git a/tamguo-oms/src/main/resources/templates/modules/tiku/book/update.html b/tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/update.html similarity index 87% rename from tamguo-oms/src/main/resources/templates/modules/tiku/book/update.html rename to tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/update.html index 8c9cbf0..0c4250e 100644 --- a/tamguo-oms/src/main/resources/templates/modules/tiku/book/update.html +++ b/tamguo-oms/src/main/resources/templates/modules/tiku/knowpoint/update.html @@ -1,9 +1,8 @@ + -书籍管理 - JeeSite Demo +书籍管理 - Tamguo @@ -26,8 +25,8 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
- - + +
基本信息
@@ -36,7 +35,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
- +
@@ -45,7 +44,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
- +
@@ -149,7 +148,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
- +
@@ -160,7 +159,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
- +
@@ -169,7 +168,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
- +
@@ -180,7 +179,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
- +
diff --git a/tamguo-tms/src/main/java/com/tamguo/web/tiku/CourseController.java b/tamguo-tms/src/main/java/com/tamguo/web/tiku/CourseController.java index 37d7d8c..bc6a36c 100644 --- a/tamguo-tms/src/main/java/com/tamguo/web/tiku/CourseController.java +++ b/tamguo-tms/src/main/java/com/tamguo/web/tiku/CourseController.java @@ -15,11 +15,11 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import com.baomidou.mybatisplus.mapper.Condition; -import com.tamguo.modules.tiku.model.BookEntity; +import com.tamguo.modules.tiku.model.KnowPointEntity; import com.tamguo.modules.tiku.model.ChapterEntity; import com.tamguo.modules.tiku.model.CourseEntity; import com.tamguo.modules.tiku.model.SubjectEntity; -import com.tamguo.modules.tiku.service.IBookService; +import com.tamguo.modules.tiku.service.IKnowPointService; import com.tamguo.modules.tiku.service.IChapterService; import com.tamguo.modules.tiku.service.ICourseService; import com.tamguo.modules.tiku.service.ISubjectService; @@ -42,7 +42,7 @@ public class CourseController { @Autowired ISubjectService iSubjectService; @Autowired - IBookService iBookService; + IKnowPointService knowPointService; @SuppressWarnings("unchecked") @RequestMapping(value = {"course/{uid}.html"}, method = RequestMethod.GET) @@ -50,12 +50,12 @@ public class CourseController { // request url logger.info("request url :{}" , request.getRequestURI()); CourseEntity course = iCourseService.selectById(uid); - List bookList = iBookService.selectList(Condition.create().eq("course_id", uid)); + List knowPointList = knowPointService.selectList(Condition.create().eq("course_id", uid)); List chapterList = null; - BookEntity book = null; - if(bookList.size() > 0) { - book = bookList.get(0); - chapterList = iChapterService.findChapterTree(book.getId()); + KnowPointEntity knowPoint = null; + if(knowPointList.size() > 0) { + knowPoint = knowPointList.get(0); + chapterList = iChapterService.findChapterTree(knowPoint.getId()); } SubjectEntity subject = iSubjectService.selectById(course.getSubjectId()); List courseList = iCourseService.selectList(Condition.create().eq("subject_id", course.getSubjectId()).orderAsc(Arrays.asList("sort"))); @@ -64,8 +64,8 @@ public class CourseController { model.addObject("courseList", courseList); model.addObject("course", course); model.addObject("subject", subject); - model.addObject("bookList", bookList); - model.addObject("book" , book); + model.addObject("knowPointList", knowPointList); + model.addObject("knowPoint" , knowPoint); if(BrowserUtils.isMobile(request.getHeader("user-agent"))) { model.setViewName("mobile/chapter"); }else { diff --git a/tamguo-tms/src/main/java/com/tamguo/web/tiku/BookController.java b/tamguo-tms/src/main/java/com/tamguo/web/tiku/KnowPointController.java similarity index 67% rename from tamguo-tms/src/main/java/com/tamguo/web/tiku/BookController.java rename to tamguo-tms/src/main/java/com/tamguo/web/tiku/KnowPointController.java index 63fa131..5767a38 100644 --- a/tamguo-tms/src/main/java/com/tamguo/web/tiku/BookController.java +++ b/tamguo-tms/src/main/java/com/tamguo/web/tiku/KnowPointController.java @@ -15,21 +15,21 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; import com.baomidou.mybatisplus.mapper.Condition; -import com.tamguo.modules.tiku.model.BookEntity; +import com.tamguo.modules.tiku.model.KnowPointEntity; import com.tamguo.modules.tiku.model.ChapterEntity; import com.tamguo.modules.tiku.model.CourseEntity; import com.tamguo.modules.tiku.model.SubjectEntity; -import com.tamguo.modules.tiku.service.IBookService; +import com.tamguo.modules.tiku.service.IKnowPointService; import com.tamguo.modules.tiku.service.IChapterService; import com.tamguo.modules.tiku.service.ICourseService; import com.tamguo.modules.tiku.service.ISubjectService; @Controller -public class BookController { +public class KnowPointController { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired - IBookService iBookService; + IKnowPointService iKnowPointService; @Autowired IChapterService iChapterService; @Autowired @@ -38,23 +38,23 @@ public class BookController { ICourseService iCourseService; @SuppressWarnings("unchecked") - @RequestMapping(value = {"book/{uid}.html"}, method = RequestMethod.GET) + @RequestMapping(value = {"knowpoint/{uid}.html"}, method = RequestMethod.GET) public ModelAndView index(@PathVariable String uid , ModelAndView model , HttpServletRequest request) { // request url logger.info("request url :{} " , request.getRequestURI()); - BookEntity book = iBookService.selectById(uid); - SubjectEntity subject = iSubjectService.selectById(book.getSubjectId()); + KnowPointEntity knowpoint = iKnowPointService.selectById(uid); + SubjectEntity subject = iSubjectService.selectById(knowpoint.getSubjectId()); List courseList = iCourseService.selectList(Condition.create().eq("subject_id", subject.getId()).orderAsc(Arrays.asList("sort"))); - List bookList = iBookService.selectList(Condition.create().eq("course_id", book.getCourseId())); - CourseEntity course = iCourseService.selectById(book.getCourseId()); - List chapterList = iChapterService.findChapterTree(book.getId()); - model.addObject("book", book); + List knowPointList = iKnowPointService.selectList(Condition.create().eq("course_id", knowpoint.getCourseId())); + CourseEntity course = iCourseService.selectById(knowpoint.getCourseId()); + List chapterList = iChapterService.findChapterTree(knowpoint.getId()); + model.addObject("knowpoint", knowpoint); model.addObject("subject", subject); model.addObject("course", course); model.addObject("chapterList" , chapterList); model.addObject("courseList", courseList); - model.addObject("bookList", bookList); - model.setViewName("book"); + model.addObject("knowPointList", knowPointList); + model.setViewName("knowpoint"); return model; } diff --git a/tamguo-tms/src/main/java/com/tamguo/web/tiku/SubjectController.java b/tamguo-tms/src/main/java/com/tamguo/web/tiku/SubjectController.java index fadd964..3a600eb 100644 --- a/tamguo-tms/src/main/java/com/tamguo/web/tiku/SubjectController.java +++ b/tamguo-tms/src/main/java/com/tamguo/web/tiku/SubjectController.java @@ -20,12 +20,12 @@ import com.baomidou.mybatisplus.mapper.Condition; import com.baomidou.mybatisplus.plugins.Page; import com.tamguo.common.utils.Result; import com.tamguo.modules.sys.service.ISysAreaService; -import com.tamguo.modules.tiku.model.BookEntity; +import com.tamguo.modules.tiku.model.KnowPointEntity; import com.tamguo.modules.tiku.model.ChapterEntity; import com.tamguo.modules.tiku.model.CourseEntity; import com.tamguo.modules.tiku.model.PaperEntity; import com.tamguo.modules.tiku.model.SubjectEntity; -import com.tamguo.modules.tiku.service.IBookService; +import com.tamguo.modules.tiku.service.IKnowPointService; import com.tamguo.modules.tiku.service.IChapterService; import com.tamguo.modules.tiku.service.ICourseService; import com.tamguo.modules.tiku.service.IPaperService; @@ -52,7 +52,7 @@ public class SubjectController { @Autowired private ICourseService iCourseService; @Autowired - private IBookService iBookService; + private IKnowPointService iBookService; @Autowired private IPaperService iPaperService; @@ -66,10 +66,10 @@ public class SubjectController { // 获取第一个科目 CourseEntity course = courseList.get(0); // 获取第一本书 - List bookList = iBookService.selectList(Condition.create().eq("course_id", course.getId())); + List bookList = iBookService.selectList(Condition.create().eq("course_id", course.getId())); List chapterList = null; if(bookList.size() > 0) { - BookEntity book = bookList.get(0); + KnowPointEntity book = bookList.get(0); chapterList = iChapterService.selectList(Condition.create().eq("book_id", book.getId())); } // 获取最新的试卷 diff --git a/tamguo-tms/src/main/resources/application.properties b/tamguo-tms/src/main/resources/application.properties index 1c869ee..6f48bab 100644 --- a/tamguo-tms/src/main/resources/application.properties +++ b/tamguo-tms/src/main/resources/application.properties @@ -1,5 +1,5 @@ -domain.name=https://www.tamguo.com/ -admin.domain.name=https://www.tamguo.com/ +domain.name=http://localhost:8081/ +admin.domain.name=http://localhost:8081/ server.port=8081 jasypt.encryptor.password=tamguo @@ -12,14 +12,14 @@ spring.datasource.maxPoolPreparedStatementPerConnectionSize=20 spring.datasource.maxWait=60000 spring.datasource.minEvictableIdleTimeMillis=300000 spring.datasource.minIdle=5 -spring.datasource.password=tanguo520pig +spring.datasource.password=123456 spring.datasource.poolPreparedStatements=true spring.datasource.testOnBorrow=false spring.datasource.testOnReturn=false spring.datasource.testWhileIdle=true spring.datasource.timeBetweenEvictionRunsMillis=60000 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/tamguo?useUnicode=true&characterEncoding=UTF-8&useSSL=false +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/tamguo_20181110?useUnicode=true&characterEncoding=UTF-8&useSSL=false spring.datasource.username=root spring.datasource.validationQuery=SELECT 1 FROM DUAL diff --git a/tamguo-tms/src/main/resources/templates/chapter.html b/tamguo-tms/src/main/resources/templates/chapter.html index 39156c5..472dd0d 100644 --- a/tamguo-tms/src/main/resources/templates/chapter.html +++ b/tamguo-tms/src/main/resources/templates/chapter.html @@ -67,7 +67,7 @@ diff --git a/tamguo-tms/src/main/resources/templates/book.html b/tamguo-tms/src/main/resources/templates/knowpoint.html similarity index 95% rename from tamguo-tms/src/main/resources/templates/book.html rename to tamguo-tms/src/main/resources/templates/knowpoint.html index 1ccabc6..c21a9cc 100644 --- a/tamguo-tms/src/main/resources/templates/book.html +++ b/tamguo-tms/src/main/resources/templates/knowpoint.html @@ -67,7 +67,7 @@