Merge remote-tracking branch 'origin/wx-dev'
This commit is contained in:
commit
7a39eb3293
1
.gitignore
vendored
1
.gitignore
vendored
@ -29,3 +29,4 @@ build/
|
|||||||
|
|
||||||
### VS Code ###
|
### VS Code ###
|
||||||
.vscode/
|
.vscode/
|
||||||
|
/.mvn/
|
||||||
|
24
README.md
24
README.md
@ -1,4 +1,4 @@
|
|||||||
> 我们正在构建一个即严谨又活泼、专业又不失有趣的开源嵌入式知识平台。在这里我们可以畅所欲言、以平等、自由的身份获取或分享知识。在这里共同学习、交流、进步、成长。
|
> 我们正在构建一个即严谨又活泼、专业又不失有趣,为数百万人服务的开源嵌入式知识平台。在这里我们可以畅所欲言、以平等、自由的身份获取或分享知识。在这里共同学习、交流、进步、成长。
|
||||||
## 已完成
|
## 已完成
|
||||||
- [x] 首页
|
- [x] 首页
|
||||||
- [x] 会员登录/注册
|
- [x] 会员登录/注册
|
||||||
@ -20,7 +20,8 @@
|
|||||||
- [x] 我的草稿 (2020/03/16 00:20 更新)
|
- [x] 我的草稿 (2020/03/16 00:20 更新)
|
||||||
- [x] 分享功能
|
- [x] 分享功能
|
||||||
- [x] 分享链接 (2020/03/16 12:20 更新)
|
- [x] 分享链接 (2020/03/16 12:20 更新)
|
||||||
- [x] 分享至微信 (2020/03/16 12:20 更新)
|
- [x] 分享至微信 (2020/03/16 12:20 更新)
|
||||||
|
- [x] 作品集功能 (2020/04/14 21:20 更新)
|
||||||
## 待完成
|
## 待完成
|
||||||
- [ ] SEO 优化
|
- [ ] SEO 优化
|
||||||
- [ ] 关注功能
|
- [ ] 关注功能
|
||||||
@ -29,9 +30,26 @@
|
|||||||
- [ ] 关注主题
|
- [ ] 关注主题
|
||||||
- [ ] 关注标签
|
- [ ] 关注标签
|
||||||
- [ ] 数据统计
|
- [ ] 数据统计
|
||||||
- [ ] 作品集功能
|
- [ ] 专题面板
|
||||||
|
- [ ] 标签面板
|
||||||
|
- [ ] 作品集生成电子书
|
||||||
## 构想
|
## 构想
|
||||||
- [ ] 专业知识题库
|
- [ ] 专业知识题库
|
||||||
- [ ] 社区贡献系统
|
- [ ] 社区贡献系统
|
||||||
- [ ] 会员系统
|
- [ ] 会员系统
|
||||||
- [ ] 勋章系统
|
- [ ] 勋章系统
|
||||||
|
|
||||||
|
> 社区系统可能存在一些潜在的缺陷,大家如果有空的话可以帮助我们一起解决。
|
||||||
|
|
||||||
|
### 报告缺陷
|
||||||
|
|
||||||
|
如果你在使用社区时发现了如下类型的问题,请回帖进行反馈,并附上 bug 截图以及操作步骤:
|
||||||
|
|
||||||
|
* **功能性缺陷**:例如发布文章失败、创建作品集失败等
|
||||||
|
* **安全性漏洞**:例如 XSS/CSRF、盗用用户信息等
|
||||||
|
|
||||||
|
### 功能建议
|
||||||
|
|
||||||
|
欢迎对社区提出功能特性方面的建议,我们一起讨论,如果有可能我们会尽快实现。
|
||||||
|
|
||||||
|
在提功能建议前可以先看一下 `计划表`,避免重复提议
|
67
pom.xml
67
pom.xml
@ -5,15 +5,15 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.2.1.RELEASE</version>
|
<version>2.2.6.RELEASE</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.rymcu</groupId>
|
<groupId>com.rymcu</groupId>
|
||||||
<artifactId>vertical</artifactId>
|
<artifactId>forest</artifactId>
|
||||||
<version>0.0.1</version>
|
<version>0.0.1</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>vertical</name>
|
<name>forest</name>
|
||||||
<description>一个用 Java 实现的现代化社区(论坛 / BBS / 社交网络 / 博客)平台,“下一代的社区系统,为未来而构建”。</description>
|
<description>forest(森林) —— 一款现代化的知识社区后台项目,使用 SpringBoot + Shrio + MyBatis + JWT + Redis 实现。</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
@ -24,11 +24,6 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>redis.clients</groupId>
|
|
||||||
<artifactId>jedis</artifactId>
|
|
||||||
<version>2.9.3</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-mail</artifactId>
|
<artifactId>spring-boot-starter-mail</artifactId>
|
||||||
@ -68,6 +63,10 @@
|
|||||||
<groupId>org.junit.vintage</groupId>
|
<groupId>org.junit.vintage</groupId>
|
||||||
<artifactId>junit-vintage-engine</artifactId>
|
<artifactId>junit-vintage-engine</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.vaadin.external.google</groupId>
|
||||||
|
<artifactId>android-json</artifactId>
|
||||||
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -95,7 +94,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
<version>1.2.60</version>
|
<version>1.2.67</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- shiro权限控制框架 -->
|
<!-- shiro权限控制框架 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -108,6 +107,12 @@
|
|||||||
<groupId>org.crazycake</groupId>
|
<groupId>org.crazycake</groupId>
|
||||||
<artifactId>shiro-redis</artifactId>
|
<artifactId>shiro-redis</artifactId>
|
||||||
<version>3.2.3</version>
|
<version>3.2.3</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--apache相关依赖-->
|
<!--apache相关依赖-->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -146,16 +151,6 @@
|
|||||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
|
||||||
<version>2.9.2</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
|
||||||
<version>2.8.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||||
@ -168,13 +163,43 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||||
<version>2.2.1.RELEASE</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jodd</groupId>
|
<groupId>org.jodd</groupId>
|
||||||
<artifactId>jodd-http</artifactId>
|
<artifactId>jodd-http</artifactId>
|
||||||
<version>5.0.13</version>
|
<version>5.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.binarywang</groupId>
|
||||||
|
<artifactId>weixin-java-open</artifactId>
|
||||||
|
<version>3.9.0</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>commons-codec</groupId>
|
||||||
|
<artifactId>commons-codec</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.jedis-lock</groupId>
|
||||||
|
<artifactId>jedis-lock</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baidu.aip</groupId>
|
||||||
|
<artifactId>java-sdk</artifactId>
|
||||||
|
<version>4.11.3</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-simple</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.rymcu.vertical;
|
package com.rymcu.forest;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class VerticalApplication {
|
public class ForestApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(VerticalApplication.class, args);
|
SpringApplication.run(ForestApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical;
|
package com.rymcu.forest;
|
||||||
|
|
||||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||||
@ -7,7 +7,7 @@ public class ServletInitializer extends SpringBootServletInitializer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||||
return application.sources(VerticalApplication.class);
|
return application.sources(ForestApplication.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,10 +1,10 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
import com.alibaba.fastjson.support.spring.FastJsonJsonView;
|
import com.alibaba.fastjson.support.spring.FastJsonJsonView;
|
||||||
import com.rymcu.vertical.core.exception.ServiceException;
|
import com.rymcu.forest.core.exception.ServiceException;
|
||||||
import com.rymcu.vertical.core.result.GlobalResult;
|
import com.rymcu.forest.core.result.GlobalResult;
|
||||||
import com.rymcu.vertical.core.result.ResultCode;
|
import com.rymcu.forest.core.result.ResultCode;
|
||||||
import com.rymcu.vertical.web.api.exception.BaseApiException;
|
import com.rymcu.forest.web.api.exception.BaseApiException;
|
||||||
import org.apache.shiro.authz.UnauthenticatedException;
|
import org.apache.shiro.authz.UnauthenticatedException;
|
||||||
import org.apache.shiro.authz.UnauthorizedException;
|
import org.apache.shiro.authz.UnauthorizedException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -81,7 +81,7 @@ public class BaseExceptionHandler {
|
|||||||
}else {
|
}else {
|
||||||
ModelAndView mv = new ModelAndView();
|
ModelAndView mv = new ModelAndView();
|
||||||
FastJsonJsonView view = new FastJsonJsonView();
|
FastJsonJsonView view = new FastJsonJsonView();
|
||||||
Map<String, Object> attributes = new HashMap();
|
Map<String, Object> attributes = new HashMap(2);
|
||||||
if (ex instanceof BaseApiException){
|
if (ex instanceof BaseApiException){
|
||||||
attributes.put("code", "401");
|
attributes.put("code", "401");
|
||||||
attributes.put("message", "用户未登录");
|
attributes.put("message", "用户未登录");
|
||||||
@ -128,7 +128,7 @@ public class BaseExceptionHandler {
|
|||||||
|
|
||||||
private boolean isAjax(HttpServletRequest request) {
|
private boolean isAjax(HttpServletRequest request) {
|
||||||
String requestedWith = request.getHeader("x-requested-with");
|
String requestedWith = request.getHeader("x-requested-with");
|
||||||
if (requestedWith != null && requestedWith.equalsIgnoreCase("XMLHttpRequest")) {
|
if (requestedWith != null && "XMLHttpRequest".equalsIgnoreCase(requestedWith)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
import org.apache.shiro.web.servlet.ShiroHttpServletRequest;
|
import org.apache.shiro.web.servlet.ShiroHttpServletRequest;
|
||||||
import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
|
import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
|
||||||
@ -9,6 +9,9 @@ import javax.servlet.ServletRequest;
|
|||||||
import javax.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
public class BaseSessionManager extends DefaultWebSessionManager {
|
public class BaseSessionManager extends DefaultWebSessionManager {
|
||||||
private static final String AUTHORIZATION = "Authorization";
|
private static final String AUTHORIZATION = "Authorization";
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
import org.apache.shiro.mgt.SecurityManager;
|
import org.apache.shiro.mgt.SecurityManager;
|
||||||
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
@ -1,15 +1,15 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.constant.ShiroConstants;
|
import com.rymcu.forest.core.constant.ShiroConstants;
|
||||||
import com.rymcu.vertical.core.exception.CaptchaException;
|
import com.rymcu.forest.core.exception.CaptchaException;
|
||||||
import com.rymcu.vertical.entity.Permission;
|
import com.rymcu.forest.entity.Permission;
|
||||||
import com.rymcu.vertical.entity.Role;
|
import com.rymcu.forest.entity.Role;
|
||||||
import com.rymcu.vertical.entity.User;
|
import com.rymcu.forest.entity.User;
|
||||||
import com.rymcu.vertical.service.PermissionService;
|
import com.rymcu.forest.service.PermissionService;
|
||||||
import com.rymcu.vertical.service.RoleService;
|
import com.rymcu.forest.service.RoleService;
|
||||||
import com.rymcu.vertical.service.UserService;
|
import com.rymcu.forest.service.UserService;
|
||||||
import com.rymcu.vertical.util.Encodes;
|
import com.rymcu.forest.util.Encodes;
|
||||||
import com.rymcu.vertical.util.Utils;
|
import com.rymcu.forest.util.Utils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.ibatis.exceptions.TooManyResultsException;
|
import org.apache.ibatis.exceptions.TooManyResultsException;
|
||||||
import org.apache.shiro.authc.*;
|
import org.apache.shiro.authc.*;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
import com.github.pagehelper.PageInterceptor;
|
import com.github.pagehelper.PageInterceptor;
|
||||||
import org.apache.ibatis.plugin.Interceptor;
|
import org.apache.ibatis.plugin.Interceptor;
|
||||||
@ -13,7 +13,7 @@ import tk.mybatis.spring.mapper.MapperScannerConfigurer;
|
|||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import static com.rymcu.vertical.core.constant.ProjectConstant.*;
|
import static com.rymcu.forest.core.constant.ProjectConstant.*;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +45,7 @@ public class MybatisConfigurer {
|
|||||||
//添加XML目录
|
//添加XML目录
|
||||||
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
||||||
factory.setMapperLocations(resolver.getResources("classpath:mapper/**/*.xml"));
|
factory.setMapperLocations(resolver.getResources("classpath:mapper/**/*.xml"));
|
||||||
factory.setTypeHandlersPackage("com.rymcu.vertical.util.handlers");
|
factory.setTypeHandlersPackage("com.rymcu.forest.util.handlers");
|
||||||
return factory.getObject();
|
return factory.getObject();
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import redis.clients.jedis.JedisPoolConfig;
|
import redis.clients.jedis.JedisPoolConfig;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
|
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
|
||||||
import org.apache.shiro.mgt.SecurityManager;
|
import org.apache.shiro.mgt.SecurityManager;
|
@ -1,8 +1,8 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.rymcu.vertical.core.result.GlobalResultGenerator;
|
import com.rymcu.forest.core.result.GlobalResultGenerator;
|
||||||
import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
|
import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户和密码(包含验证码)令牌类
|
* 用户和密码(包含验证码)令牌类
|
@ -1,10 +1,10 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||||
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
||||||
import com.rymcu.vertical.jwt.aop.RestAuthTokenInterceptor;
|
import com.rymcu.forest.jwt.aop.RestAuthTokenInterceptor;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.config;
|
package com.rymcu.forest.config;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.constant;
|
package com.rymcu.forest.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息通知类型
|
* 消息通知类型
|
||||||
@ -12,4 +12,8 @@ public class NotificationConstant {
|
|||||||
|
|
||||||
public static String Comment = "2";
|
public static String Comment = "2";
|
||||||
|
|
||||||
|
public static String PostArticle = "3";
|
||||||
|
|
||||||
|
public static String UpdateArticle = "4";
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.constant;
|
package com.rymcu.forest.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目常量
|
* 项目常量
|
||||||
@ -8,7 +8,7 @@ public final class ProjectConstant {
|
|||||||
/**当前环境*/
|
/**当前环境*/
|
||||||
public static final String ENV = "dev";
|
public static final String ENV = "dev";
|
||||||
/**项目基础包名称,根据自己公司的项目修改*/
|
/**项目基础包名称,根据自己公司的项目修改*/
|
||||||
public static final String BASE_PACKAGE = "com.rymcu.vertical";
|
public static final String BASE_PACKAGE = "com.rymcu.forest";
|
||||||
/**DTO所在包*/
|
/**DTO所在包*/
|
||||||
public static final String DTO_PACKAGE = BASE_PACKAGE + ".dto";
|
public static final String DTO_PACKAGE = BASE_PACKAGE + ".dto";
|
||||||
/**Model所在包*/
|
/**Model所在包*/
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.constant;
|
package com.rymcu.forest.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shiro通用常量
|
* Shiro通用常量
|
@ -1,10 +1,11 @@
|
|||||||
package com.rymcu.vertical.core.exception;
|
package com.rymcu.forest.core.exception;
|
||||||
|
|
||||||
import org.apache.shiro.authc.AuthenticationException;
|
import org.apache.shiro.authc.AuthenticationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码错误异常类
|
* 验证码错误异常类
|
||||||
*
|
*
|
||||||
|
* @author ronger
|
||||||
*/
|
*/
|
||||||
public class CaptchaException extends AuthenticationException
|
public class CaptchaException extends AuthenticationException
|
||||||
{
|
{
|
@ -1,10 +1,11 @@
|
|||||||
package com.rymcu.vertical.core.exception;
|
package com.rymcu.forest.core.exception;
|
||||||
|
|
||||||
|
|
||||||
import com.rymcu.vertical.core.result.ResultCode;
|
import com.rymcu.forest.core.result.ResultCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务(业务)异常如“ 账号或密码错误 ”,该异常只做INFO级别的日志记录 @see WebMvcConfigurer
|
* 服务(业务)异常如“ 账号或密码错误 ”,该异常只做INFO级别的日志记录 @see WebMvcConfigurer
|
||||||
|
* @author ronger
|
||||||
*/
|
*/
|
||||||
public class ServiceException extends Exception {
|
public class ServiceException extends Exception {
|
||||||
private int code;
|
private int code;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.mapper;
|
package com.rymcu.forest.core.mapper;
|
||||||
|
|
||||||
import tk.mybatis.mapper.common.BaseMapper;
|
import tk.mybatis.mapper.common.BaseMapper;
|
||||||
import tk.mybatis.mapper.common.ConditionMapper;
|
import tk.mybatis.mapper.common.ConditionMapper;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.mapper;
|
package com.rymcu.forest.core.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.result;
|
package com.rymcu.forest.core.result;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.rymcu.vertical.core.result;
|
package com.rymcu.forest.core.result;
|
||||||
|
|
||||||
import com.rymcu.vertical.util.ErrorCode;
|
import com.rymcu.forest.util.ErrorCode;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.result;
|
package com.rymcu.forest.core.result;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.result;
|
package com.rymcu.forest.core.result;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应码枚举,参考HTTP状态码的语义
|
* 响应码枚举,参考HTTP状态码的语义
|
@ -1,8 +1,8 @@
|
|||||||
package com.rymcu.vertical.core.service;
|
package com.rymcu.forest.core.service;
|
||||||
|
|
||||||
|
|
||||||
import com.rymcu.vertical.core.exception.ServiceException;
|
import com.rymcu.forest.core.exception.ServiceException;
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import org.apache.ibatis.exceptions.TooManyResultsException;
|
import org.apache.ibatis.exceptions.TooManyResultsException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import tk.mybatis.mapper.entity.Condition;
|
import tk.mybatis.mapper.entity.Condition;
|
@ -1,6 +1,6 @@
|
|||||||
package com.rymcu.vertical.core.service;
|
package com.rymcu.forest.core.service;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.exception.ServiceException;
|
import com.rymcu.forest.core.exception.ServiceException;
|
||||||
import org.apache.ibatis.exceptions.TooManyResultsException;
|
import org.apache.ibatis.exceptions.TooManyResultsException;
|
||||||
import tk.mybatis.mapper.entity.Condition;
|
import tk.mybatis.mapper.entity.Condition;
|
||||||
|
|
@ -1,13 +1,13 @@
|
|||||||
package com.rymcu.vertical.core.service.log;
|
package com.rymcu.forest.core.service.log;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.service.log.constant.LoggerConstant;
|
import com.rymcu.forest.core.service.log.constant.LoggerConstant;
|
||||||
import com.rymcu.vertical.dto.TokenUser;
|
import com.rymcu.forest.dto.TokenUser;
|
||||||
import com.rymcu.vertical.entity.Visit;
|
import com.rymcu.forest.entity.Visit;
|
||||||
import com.rymcu.vertical.jwt.def.JwtConstants;
|
import com.rymcu.forest.jwt.def.JwtConstants;
|
||||||
import com.rymcu.vertical.service.ArticleService;
|
import com.rymcu.forest.service.ArticleService;
|
||||||
import com.rymcu.vertical.service.VisitService;
|
import com.rymcu.forest.service.VisitService;
|
||||||
import com.rymcu.vertical.util.UserUtils;
|
import com.rymcu.forest.util.UserUtils;
|
||||||
import com.rymcu.vertical.util.Utils;
|
import com.rymcu.forest.util.Utils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.annotation.AfterReturning;
|
import org.aspectj.lang.annotation.AfterReturning;
|
||||||
@ -42,7 +42,7 @@ public class VisitAspect {
|
|||||||
@Resource
|
@Resource
|
||||||
private VisitService visitService;
|
private VisitService visitService;
|
||||||
|
|
||||||
@Pointcut("@annotation(com.rymcu.vertical.core.service.log.annotation.VisitLogger)")
|
@Pointcut("@annotation(com.rymcu.forest.core.service.log.annotation.VisitLogger)")
|
||||||
public void pointCut() {}
|
public void pointCut() {}
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.service.log.annotation;
|
package com.rymcu.forest.core.service.log.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.service.log.constant;
|
package com.rymcu.forest.core.service.log.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ronger
|
* @author ronger
|
@ -1,6 +1,6 @@
|
|||||||
package com.rymcu.vertical.core.service.redis;
|
package com.rymcu.forest.core.service.redis;
|
||||||
|
|
||||||
import com.rymcu.vertical.entity.BaseDO;
|
import com.rymcu.forest.entity.BaseDO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.service.redis;
|
package com.rymcu.forest.core.service.redis;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.core.service.redis.impl;
|
package com.rymcu.forest.core.service.redis.impl;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
@ -1,11 +1,11 @@
|
|||||||
package com.rymcu.vertical.core.service.redis.impl;
|
package com.rymcu.forest.core.service.redis.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.TypeReference;
|
import com.alibaba.fastjson.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.JavaType;
|
import com.fasterxml.jackson.databind.JavaType;
|
||||||
import com.rymcu.vertical.config.RedisProperties;
|
import com.rymcu.forest.config.RedisProperties;
|
||||||
import com.rymcu.vertical.core.service.redis.RedisResult;
|
import com.rymcu.forest.core.service.redis.RedisResult;
|
||||||
import com.rymcu.vertical.core.service.redis.RedisService;
|
import com.rymcu.forest.core.service.redis.RedisService;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
17
src/main/java/com/rymcu/forest/dto/ChangeEmailDTO.java
Normal file
17
src/main/java/com/rymcu/forest/dto/ChangeEmailDTO.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ChangeEmailDTO {
|
||||||
|
|
||||||
|
private Integer idUser;
|
||||||
|
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -24,6 +24,8 @@ public class CommentDTO {
|
|||||||
private String commentOriginalAuthorThumbnailURL;
|
private String commentOriginalAuthorThumbnailURL;
|
||||||
/** 父评论作者昵称 */
|
/** 父评论作者昵称 */
|
||||||
private String commentOriginalAuthorNickname;
|
private String commentOriginalAuthorNickname;
|
||||||
|
/** 父评论作者昵称 */
|
||||||
|
private String commentOriginalContent;
|
||||||
/** 状态 */
|
/** 状态 */
|
||||||
private String commentStatus;
|
private String commentStatus;
|
||||||
/** 0:公开回帖,1:匿名回帖 */
|
/** 0:公开回帖,1:匿名回帖 */
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
15
src/main/java/com/rymcu/forest/dto/LinkToImageUrlDTO.java
Normal file
15
src/main/java/com/rymcu/forest/dto/LinkToImageUrlDTO.java
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LinkToImageUrlDTO {
|
||||||
|
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,7 +1,9 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ronger
|
* @author ronger
|
||||||
*/
|
*/
|
||||||
@ -20,4 +22,6 @@ public class PortfolioArticleDTO {
|
|||||||
|
|
||||||
private Integer sortNo;
|
private Integer sortNo;
|
||||||
|
|
||||||
|
private List<ArticleDTO> articles;
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
15
src/main/java/com/rymcu/forest/dto/UpdatePasswordDTO.java
Normal file
15
src/main/java/com/rymcu/forest/dto/UpdatePasswordDTO.java
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UpdatePasswordDTO {
|
||||||
|
|
||||||
|
private Integer idUser;
|
||||||
|
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto;
|
package com.rymcu.forest.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto.admin;
|
package com.rymcu.forest.dto.admin;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto.admin;
|
package com.rymcu.forest.dto.admin;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.rymcu.vertical.dto.admin;
|
package com.rymcu.forest.dto.admin;
|
||||||
|
|
||||||
import com.rymcu.vertical.dto.Author;
|
import com.rymcu.forest.dto.Author;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,6 +1,5 @@
|
|||||||
package com.rymcu.vertical.dto.admin;
|
package com.rymcu.forest.dto.admin;
|
||||||
|
|
||||||
import com.rymcu.vertical.dto.Author;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto.admin;
|
package com.rymcu.forest.dto.admin;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.dto.admin;
|
package com.rymcu.forest.dto.admin;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
17
src/main/java/com/rymcu/forest/dto/baidu/TagNlpDTO.java
Normal file
17
src/main/java/com/rymcu/forest/dto/baidu/TagNlpDTO.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package com.rymcu.forest.dto.baidu;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TagNlpDTO {
|
||||||
|
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
private String tag;
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
@ -1,7 +1,6 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.ibatis.type.JdbcType;
|
|
||||||
import tk.mybatis.mapper.annotation.ColumnType;
|
import tk.mybatis.mapper.annotation.ColumnType;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
@ -9,7 +8,6 @@ import javax.persistence.GeneratedValue;
|
|||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ronger
|
* @author ronger
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
28
src/main/java/com/rymcu/forest/entity/UserExtend.java
Normal file
28
src/main/java/com/rymcu/forest/entity/UserExtend.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Table(name = "vertical_user_extend")
|
||||||
|
public class UserExtend {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private Integer idUser;
|
||||||
|
|
||||||
|
private String github;
|
||||||
|
|
||||||
|
private String weibo;
|
||||||
|
|
||||||
|
private String weixin;
|
||||||
|
|
||||||
|
private String qq;
|
||||||
|
|
||||||
|
private String blog;
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.entity;
|
package com.rymcu.forest.entity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -1,13 +1,13 @@
|
|||||||
package com.rymcu.vertical.jwt.aop;
|
package com.rymcu.forest.jwt.aop;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.rymcu.vertical.jwt.def.JwtConstants;
|
import com.rymcu.forest.jwt.def.JwtConstants;
|
||||||
import com.rymcu.vertical.jwt.model.TokenModel;
|
import com.rymcu.forest.jwt.model.TokenModel;
|
||||||
import com.rymcu.vertical.jwt.service.TokenManager;
|
import com.rymcu.forest.jwt.service.TokenManager;
|
||||||
import com.rymcu.vertical.jwt.util.oConvertUtils;
|
import com.rymcu.forest.jwt.util.oConvertUtils;
|
||||||
import com.rymcu.vertical.web.api.exception.ErrorCode;
|
import com.rymcu.forest.web.api.exception.ErrorCode;
|
||||||
import com.rymcu.vertical.web.api.exception.BaseApiException;
|
import com.rymcu.forest.web.api.exception.BaseApiException;
|
||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
import io.jsonwebtoken.Jwts;
|
import io.jsonwebtoken.Jwts;
|
||||||
import io.jsonwebtoken.SignatureException;
|
import io.jsonwebtoken.SignatureException;
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.jwt.def;
|
package com.rymcu.forest.jwt.def;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ronger
|
* @author ronger
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.jwt.model;
|
package com.rymcu.forest.jwt.model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Token的Model类,可以增加字段提高安全性,例如时间戳、url签名
|
* Token的Model类,可以增加字段提高安全性,例如时间戳、url签名
|
@ -1,8 +1,8 @@
|
|||||||
package com.rymcu.vertical.jwt.service;
|
package com.rymcu.forest.jwt.service;
|
||||||
|
|
||||||
|
|
||||||
import com.rymcu.vertical.jwt.def.JwtConstants;
|
import com.rymcu.forest.jwt.def.JwtConstants;
|
||||||
import com.rymcu.vertical.jwt.model.TokenModel;
|
import com.rymcu.forest.jwt.model.TokenModel;
|
||||||
import io.jsonwebtoken.Jwts;
|
import io.jsonwebtoken.Jwts;
|
||||||
import io.jsonwebtoken.SignatureAlgorithm;
|
import io.jsonwebtoken.SignatureAlgorithm;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
@ -1,7 +1,7 @@
|
|||||||
package com.rymcu.vertical.jwt.service;
|
package com.rymcu.forest.jwt.service;
|
||||||
|
|
||||||
|
|
||||||
import com.rymcu.vertical.jwt.model.TokenModel;
|
import com.rymcu.forest.jwt.model.TokenModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对token进行操作的接口
|
* 对token进行操作的接口
|
@ -1,4 +1,4 @@
|
|||||||
package com.rymcu.vertical.jwt.util;
|
package com.rymcu.forest.jwt.util;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringEscapeUtils;
|
import org.apache.commons.lang.StringEscapeUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
@ -1,11 +1,11 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import com.rymcu.vertical.dto.ArticleDTO;
|
import com.rymcu.forest.dto.ArticleDTO;
|
||||||
import com.rymcu.vertical.dto.ArticleTagDTO;
|
import com.rymcu.forest.dto.ArticleTagDTO;
|
||||||
import com.rymcu.vertical.dto.PortfolioArticleDTO;
|
import com.rymcu.forest.dto.PortfolioArticleDTO;
|
||||||
import com.rymcu.vertical.entity.Article;
|
import com.rymcu.forest.entity.Article;
|
||||||
import com.rymcu.vertical.entity.ArticleContent;
|
import com.rymcu.forest.entity.ArticleContent;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -158,4 +158,22 @@ public interface ArticleMapper extends Mapper<Article> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer deleteLinkedPortfolioData(@Param("id") Integer id);
|
Integer deleteLinkedPortfolioData(@Param("id") Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新文章连接及预览内容
|
||||||
|
* @param idArticle
|
||||||
|
* @param articleLink
|
||||||
|
* @param articlePermalink
|
||||||
|
* @param articlePreviewContent
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer updateArticleLinkAndPreviewContent(@Param("idArticle") Integer idArticle, @Param("articleLink") String articleLink, @Param("articlePermalink") String articlePermalink, @Param("articlePreviewContent") String articlePreviewContent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据专题主键及当前文章排序号获取专题下文章大纲
|
||||||
|
* @param idPortfolio
|
||||||
|
* @param sortNo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ArticleDTO> selectPortfolioArticlesByIdPortfolioAndSortNo(@Param("idPortfolio") Integer idPortfolio, @Param("sortNo") Integer sortNo);
|
||||||
}
|
}
|
@ -1,9 +1,9 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import com.rymcu.vertical.dto.Author;
|
import com.rymcu.forest.dto.Author;
|
||||||
import com.rymcu.vertical.dto.CommentDTO;
|
import com.rymcu.forest.dto.CommentDTO;
|
||||||
import com.rymcu.vertical.entity.Comment;
|
import com.rymcu.forest.entity.Comment;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,7 +1,6 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.dto.admin.DashboardData;
|
import com.rymcu.forest.dto.admin.DashboardData;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
36
src/main/java/com/rymcu/forest/mapper/FollowMapper.java
Normal file
36
src/main/java/com/rymcu/forest/mapper/FollowMapper.java
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
|
import com.rymcu.forest.dto.UserDTO;
|
||||||
|
import com.rymcu.forest.entity.Follow;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
public interface FollowMapper extends Mapper<Follow> {
|
||||||
|
/**
|
||||||
|
* 判断是否关注
|
||||||
|
* @param followingId
|
||||||
|
* @param followerId
|
||||||
|
* @param followingType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean isFollow(@Param("followingId") Integer followingId, @Param("followerId") Integer followerId, @Param("followingType") String followingType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户粉丝
|
||||||
|
* @param idUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<UserDTO> selectUserFollowersByUser(@Param("idUser") Integer idUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户关注用户
|
||||||
|
* @param idUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<UserDTO> selectUserFollowingsByUser(@Param("idUser") Integer idUser);
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import com.rymcu.vertical.entity.Notification;
|
import com.rymcu.forest.entity.Notification;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,7 +1,7 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import com.rymcu.vertical.entity.Permission;
|
import com.rymcu.forest.entity.Permission;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,8 +1,8 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import com.rymcu.vertical.dto.PortfolioDTO;
|
import com.rymcu.forest.dto.PortfolioDTO;
|
||||||
import com.rymcu.vertical.entity.Portfolio;
|
import com.rymcu.forest.entity.Portfolio;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,8 +1,7 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import com.rymcu.vertical.entity.Role;
|
import com.rymcu.forest.entity.Role;
|
||||||
import com.rymcu.vertical.entity.User;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
10
src/main/java/com/rymcu/forest/mapper/SpecialDayMapper.java
Normal file
10
src/main/java/com/rymcu/forest/mapper/SpecialDayMapper.java
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
|
import com.rymcu.forest.entity.SpecialDay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
public interface SpecialDayMapper extends Mapper<SpecialDay> {
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import com.rymcu.vertical.dto.LabelModel;
|
import com.rymcu.forest.dto.LabelModel;
|
||||||
import com.rymcu.vertical.entity.Tag;
|
import com.rymcu.forest.entity.Tag;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,10 +1,10 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import com.rymcu.vertical.dto.admin.TagDTO;
|
import com.rymcu.forest.dto.admin.TagDTO;
|
||||||
import com.rymcu.vertical.dto.admin.TopicDTO;
|
import com.rymcu.forest.dto.admin.TopicDTO;
|
||||||
import com.rymcu.vertical.entity.Tag;
|
import com.rymcu.forest.entity.Tag;
|
||||||
import com.rymcu.vertical.entity.Topic;
|
import com.rymcu.forest.entity.Topic;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
17
src/main/java/com/rymcu/forest/mapper/UserExtendMapper.java
Normal file
17
src/main/java/com/rymcu/forest/mapper/UserExtendMapper.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
|
import com.rymcu.forest.entity.UserExtend;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
public interface UserExtendMapper extends Mapper<UserExtend> {
|
||||||
|
/**
|
||||||
|
* 获取用户扩展信息
|
||||||
|
* @param nickname
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
UserExtend selectUserExtendByNickname(@Param("nickname") String nickname);
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
package com.rymcu.vertical.mapper;
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.mapper.Mapper;
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
import com.rymcu.vertical.dto.Author;
|
import com.rymcu.forest.dto.Author;
|
||||||
import com.rymcu.vertical.dto.UserDTO;
|
import com.rymcu.forest.dto.UserDTO;
|
||||||
import com.rymcu.vertical.dto.UserInfoDTO;
|
import com.rymcu.forest.dto.UserInfoDTO;
|
||||||
import com.rymcu.vertical.entity.User;
|
import com.rymcu.forest.entity.User;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -120,4 +120,20 @@ public interface UserMapper extends Mapper<User> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer updateLastLoginTime(@Param("idUser") Integer idUser);
|
Integer updateLastLoginTime(@Param("idUser") Integer idUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更换邮箱
|
||||||
|
* @param idUser
|
||||||
|
* @param email
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer updateEmail(@Param("idUser") Integer idUser, @Param("email") String email);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新密码
|
||||||
|
* @param idUser
|
||||||
|
* @param password
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer updatePasswordById(@Param("idUser") Integer idUser, @Param("password") String password);
|
||||||
}
|
}
|
10
src/main/java/com/rymcu/forest/mapper/VisitMapper.java
Normal file
10
src/main/java/com/rymcu/forest/mapper/VisitMapper.java
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
|
import com.rymcu.forest.entity.Visit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
public interface VisitMapper extends Mapper<Visit> {
|
||||||
|
}
|
10
src/main/java/com/rymcu/forest/mapper/WxUserMapper.java
Normal file
10
src/main/java/com/rymcu/forest/mapper/WxUserMapper.java
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package com.rymcu.forest.mapper;
|
||||||
|
|
||||||
|
import com.rymcu.forest.core.mapper.Mapper;
|
||||||
|
import com.rymcu.forest.entity.WxUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
|
public interface WxUserMapper extends Mapper<WxUser> {
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
package com.rymcu.vertical.service;
|
package com.rymcu.forest.service;
|
||||||
|
|
||||||
import com.rymcu.vertical.core.service.Service;
|
import com.rymcu.forest.core.service.Service;
|
||||||
import com.rymcu.vertical.dto.ArticleDTO;
|
import com.rymcu.forest.dto.ArticleDTO;
|
||||||
import com.rymcu.vertical.dto.ArticleSearchDTO;
|
import com.rymcu.forest.dto.ArticleSearchDTO;
|
||||||
import com.rymcu.vertical.entity.Article;
|
import com.rymcu.forest.entity.Article;
|
||||||
import com.rymcu.vertical.web.api.exception.BaseApiException;
|
import com.rymcu.forest.web.api.exception.BaseApiException;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user