新增移动端接口

master
mayongjian 2 years ago
parent b44e606632
commit fa8dcc7aa4

@ -2,7 +2,7 @@
<img alt="logo" src="https://image.mayongjian.cn/2024/07/03/1de3ee08e0a34ab6bf9a163d380fb596.png" style="width: 100px">
</p>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">HongShu v1.0</h1>
<h4 align="center">基于SpringBoot+Vue前后端分离仿小红书项目</h4>
<h4 align="center">基于 SpringBoot + Vue 前后端分离仿小红书项目</h4>
<p align="center">
<a href="https://gitee.com/Maverick_Ma/hongshu/stargazers">
<img src="https://gitee.com/Maverick_Ma/hongshu/badge/star.svg?theme=dark"></a>
@ -14,26 +14,24 @@
## 平台简介
* 前端采用Vue、Element UI。
* 后端采用Spring Boot、Spring Security、Redis & Jwt。
* 前端采用Vue3、Element Plus、Ts、Vite。
* 后端采用Spring Boot、Spring Security、WebSocket、Redis、ElasticSearch & Jwt。
* 移动端采用uniapp
* 权限认证使用Jwt支持多终端认证系统。
* 支持加载动态权限菜单,多方式轻松权限控制。
* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev)
* 单应用版本 [HongShu](https://gitee.com/Maverick_Ma/hongshu)
* 微服务版本,请移步 [HongShu-Cloud](https://gitee.com/Maverick_Ma/hongshu-cloud)
* 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?source=5176.11533457&userCode=ojvsntx1)
* 腾讯云优惠券:[点我领取](https://curl.qcloud.com/efTJbNyi)
* 单应用: [HongShu](https://gitee.com/Maverick_Ma/hongshu)
* 网页端,请移步: [HongShu-Web](https://gitee.com/Maverick_Ma/hongshu-web)
* 管理端,请移步: [HongShu-Admin](https://gitee.com/Maverick_Ma/hongshu-admin)
* 移动端,请移步: [HongShu-App](https://gitee.com/Maverick_Ma/hongshu-app)
## 用户端内置功能
1. 瀑布流展示笔记,懒加载笔记图片
2. 笔记分类查询,使用 ElasticSearch 做关键词搜索查询笔记
3. 关键词使用 ElasticSearch 做高亮查询
4. 动态展示,展示个人和好友动态
5. 支持私信聊天,关注用户,评论笔记,点赞笔记和点赞图片功能,收藏笔记功能
6. 使用 WebSocket 消息通知,用户发送的消息会实时通知,消息页面会实时收到当前用户未读消息数量
7. 双token登陆使用 Redis 做对象缓存
8. 发布和修改笔记功能使用七牛云oss对象存储图片
9. 个人信息展示,展示当前用户发布的笔记和点赞收藏的笔记
1. 笔记:瀑布流按分类展示笔记,懒加载笔记图片
2. 搜索:使用 ElasticSearch 做关键词搜索高亮查询
3. 动态:展示个人和好友动态
4. 消息:使用 WebSocket 做私信聊天和消息通知,用户发送消息实时通知、消息页面实时展示当前未读消息数量提醒
5. 发布发布和修改笔记功能使用七牛云oss对象存储图片
6. 用户信息:展示当前用户发布、点赞和收藏的笔记
7. 双 Token 登录机制、无感刷新,使用 Redis 做对象缓存
## 管理端内置功能
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
@ -54,30 +52,32 @@
16. 在线构建器拖动表单元素生成相应的HTML代码。
17. 连接池监视监视当前系统数据库连接池状态可进行分析SQL找出系统性能瓶颈。
## 2.0版本实现功能⚠️
1. 添加移动端版本
2. 重构实现 SpringCloud 微服务架构版本
## 2.0版本实现功能
1. 添加移动端
2. 重构实现 SpringCloud 微服务架构
3. 加入商城购物功能
4. 加入协同过滤算法优化首页推荐功能
4. 加入推荐算法,优化内容推荐和用户推荐功能
5. 使用 MQ+Redis 优化点赞、收藏、浏览功能
6. 支持七牛云、阿里、腾讯、Minio等多种oss对象存储方式
7. 笔记内容支持视频和live图
- 如遇到项目问题、部署需求可联系微信coder_xiaomage
### ⚠️如有【项目问题】或【部署需求】可联系微信coder_xiaomage
## 演示站2.0版)
- web端 ➡️ [点我进入](http://47.95.205.22)
- 管理端 ➡️ [点我进入](http://47.95.205.22/admin/)
- app端 ➡️ [点我进入](http://47.95.205.22/app/)
* 由于服务器资源有限,加载可能缓慢。
* 同时也感谢小伙伴们打赏支持❤️
<img src="doc/images/pay.png" style="width: 50px heihgt: 50px"/>
* 文档及资料会暂时放到我的个人博客:[点我进入](https://mayongjian.cn)
- web端 ➡️ [点我体验](http://47.95.205.22)
- admin端 ➡️ [点我体验](http://47.95.205.22/admin/)
- app端 ➡️ [点我体验](http://47.95.205.22/app/)
- 文档及资料会暂时放到我的个人博客:[点我进入](https://mayongjian.cn)
* 由于服务器资源有限,首次加载可能缓慢一些
* 同时为优化服务器也感谢小伙伴们打赏支持❤️。
<img src="doc/images/reward.png" style="width: 50px heihgt: 50px"/>
## 视频演示
[点击查看](https://www.bilibili.com/video/BV1QP8dekEGq/?spm_id_from=333.999.list.card_archive.click&vd_source=ec9224821314432ac6e12dc7d500d74b)
➡️ [点击查看](https://www.bilibili.com/video/BV1QP8dekEGq/?spm_id_from=333.999.list.card_archive.click&vd_source=ec9224821314432ac6e12dc7d500d74b)
## 演示图
* web端
### - web端
<table>
<tr>
<td><img src="doc/images/web/web-login.png"/></td>
@ -97,7 +97,7 @@
</tr>
</table>
* 管理端:
### - admin端:
<table>
<tr>
<td><img src="doc/images/admin/admin-login.png"/></td>
@ -117,26 +117,26 @@
</tr>
</table>
* app端
### - app端
<table>
<tr>
<td><img src="doc/images/app/app-login.png"/></td>
<td><img src="doc/images/app/app-index.png"/></td>
<td><img src="doc/images/app/app-trend.png"/></td>
</tr>
<tr>
<td><img src="doc/images/app/app-trend.png"/></td>
<td><img src="doc/images/app/app-message.png"/></td>
<td><img src="doc/images/app/app-user.png"/></td>
</tr>
<tr>
<td><img src="doc/images/app/app-user.png"/></td>
<td><img src="doc/images/app/app-follow.png"/></td>
<td><img src="doc/images/app/app-search.png"/></td>
</tr>
<tr>
<td><img src="doc/images/app/app-hot.png"/></td>
<td><img src="doc/images/app/app-main.png"/></td>
<td><img src="doc/images/app/app-push.png"/></td>
</tr>
<tr>
<td><img src="doc/images/app/app-comment.png"/></td>
<td><img src="doc/images/app/app-like.png"/></td>
<td><img src="doc/images/app/app-search.png"/></td>
<td><img src="doc/images/app/app-push.png"/></td>
</tr>
</table>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 706 KiB

After

Width:  |  Height:  |  Size: 939 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 KiB

After

Width:  |  Height:  |  Size: 986 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

Before

Width:  |  Height:  |  Size: 731 KiB

After

Width:  |  Height:  |  Size: 731 KiB

@ -7,12 +7,11 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class HongshuApplication {
public static void main(String[] args) {
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(HongshuApplication.class, args);
}
}

@ -6,13 +6,11 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
/**
* web
*
* @author hongshu
* @author: hongshu
*/
public class HongshuServletInitializer extends SpringBootServletInitializer
{
public class HongshuServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
{
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(HongshuApplication.class);
}
}

@ -0,0 +1,86 @@
package com.hongshu.web.controller.app;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hongshu.common.enums.Result;
import com.hongshu.common.validator.ValidatorUtils;
import com.hongshu.common.validator.group.AddGroup;
import com.hongshu.common.validator.group.UpdateGroup;
import com.hongshu.web.domain.dto.AlbumDTO;
import com.hongshu.web.domain.entity.WebAlbum;
import com.hongshu.web.domain.vo.AlbumVo;
import com.hongshu.web.service.IWebAlbumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
*
*
* @author: hongshu
*/
@RequestMapping("/app/album")
@RestController
public class AppAlbumController {
@Autowired
private IWebAlbumService albumService;
/**
* ID
*
* @param currentPage
* @param pageSize
* @param userId ID
*/
@GetMapping("getAlbumByUserId/{currentPage}/{pageSize}")
public Result<?> getAlbumByUserId(@PathVariable long currentPage, @PathVariable long pageSize, String userId) {
Page<WebAlbum> page = albumService.getAlbumByUserId(currentPage, pageSize, userId);
return Result.ok(page);
}
/**
*
*
* @param albumDTO
*/
@PostMapping("saveAlbum")
public Result<?> saveAlbumByDTO(@RequestBody AlbumDTO albumDTO) {
ValidatorUtils.validateEntity(albumDTO, AddGroup.class);
albumService.saveAlbum(albumDTO);
return Result.ok();
}
/**
* ID
*
* @param albumId ID
*/
@GetMapping("getAlbumById")
public Result<?> getAlbumById(String albumId) {
AlbumVo albumVo = albumService.getAlbumById(albumId);
return Result.ok(albumVo);
}
/**
*
*
* @param albumId ID
*/
@GetMapping("deleteAlbum")
public Result<?> deleteAlbum(String albumId) {
albumService.deleteAlbum(albumId);
return Result.ok();
}
/**
*
*
* @param albumDTO
*/
@PostMapping("updateAlbum")
public Result<?> updateAlbum(@RequestBody AlbumDTO albumDTO) {
ValidatorUtils.validateEntity(albumDTO, UpdateGroup.class);
albumService.updateAlbum(albumDTO);
return Result.ok();
}
}

@ -0,0 +1,140 @@
package com.hongshu.web.controller.app;
import com.hongshu.common.enums.Result;
import com.hongshu.common.enums.ResultCodeEnum;
import com.hongshu.common.utils.JwtUtils;
import com.hongshu.common.validator.myVaildator.noLogin.NoLoginIntercept;
import com.hongshu.web.domain.dto.AuthUserDTO;
import com.hongshu.web.domain.entity.WebUser;
import com.hongshu.web.service.IWebAuthUserService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
*
*
* @author: hongshu
*/
@RestController
@RequestMapping("/app/auth")
@Slf4j
public class AppAuthController {
@Autowired
private IWebAuthUserService authUserService;
/**
*
*
* @param authUserDTO
*/
@ApiOperation("用户登录")
@PostMapping("login")
@NoLoginIntercept
public Result<?> login(@RequestBody AuthUserDTO authUserDTO) {
Map<String, Object> map = authUserService.login(authUserDTO);
return Result.ok(map);
}
/**
*
*
* @param authUserDTO
*/
@ApiOperation("验证码登录")
@PostMapping("loginByCode")
@NoLoginIntercept
public Result<?> loginByCode(@RequestBody AuthUserDTO authUserDTO) {
Map<String, Object> map = authUserService.loginByCode(authUserDTO);
return Result.ok(map);
}
/**
* token
*
* @param accessToken accessToken
*/
@ApiOperation("根据token获取当前用户")
@GetMapping("getUserInfoByToken")
public Result<?> getUserInfoByToken(String accessToken) {
boolean checkToken = JwtUtils.checkToken(accessToken);
if (!checkToken) {
// accessToken过期刷新accessToken
return Result.build(ResultCodeEnum.TOKEN_EXIST.getCode(), ResultCodeEnum.TOKEN_EXIST.getMessage());
}
WebUser user = authUserService.getUserInfoByToken(accessToken);
return Result.ok(user);
}
/**
*
*
* @param authUserDTO
*/
@ApiOperation("用户注册")
@PostMapping("register")
@NoLoginIntercept
public Result<?> register(@RequestBody AuthUserDTO authUserDTO) {
WebUser user = authUserService.register(authUserDTO);
return Result.ok(user);
}
/**
*
*
* @param authUserDTO
*/
@ApiOperation("用户是否注册")
@PostMapping("isRegister")
public Result<?> isRegister(@RequestBody AuthUserDTO authUserDTO) {
boolean flag = authUserService.isRegister(authUserDTO);
return Result.ok(flag);
}
/**
* 退
*
* @param userId ID
*/
@ApiOperation("退出登录")
@GetMapping("loginOut")
public Result<?> loginOut(String userId) {
authUserService.loginOut(userId);
return Result.ok();
}
/**
*
*
* @param authUserDTO
*/
@ApiOperation("修改密码")
@PostMapping("updatePassword")
public Result<?> updatePassword(@RequestBody AuthUserDTO authUserDTO) {
Boolean flag = authUserService.updatePassword(authUserDTO);
return Result.ok(flag);
}
/**
* token
*
* @param refreshToken refreshToken
*/
@ApiOperation("刷新token")
@GetMapping("refreshToken")
@NoLoginIntercept
public Result<?> refreshToken(String refreshToken) {
boolean checkToken = JwtUtils.checkToken(refreshToken);
if (!checkToken) {
//refreshToken过期跳转登录界面
return Result.build(ResultCodeEnum.TOKEN_FAIL.getCode(), ResultCodeEnum.TOKEN_FAIL.getMessage());
}
Map<String, Object> map = authUserService.refreshToken(refreshToken);
return Result.ok(map);
}
}

@ -0,0 +1,56 @@
package com.hongshu.web.controller.app;
import com.hongshu.common.enums.Result;
import com.hongshu.web.domain.dto.BrowseRecordDTO;
import com.hongshu.web.domain.vo.NoteSearchVo;
import com.hongshu.web.service.IWebBrowseRecordService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
*
*
* @author: hongshu
*/
@RestController
@RequestMapping("/app/browseRecord")
@Api(tags = "浏览记录")
public class AppBrowseRecordController {
@Autowired
private IWebBrowseRecordService browseRecordService;
/**
*
*/
@RequestMapping("getAllBrowseRecordByUser/{page}/{limit}")
public Result<?> getAllBrowseRecordByUser(@PathVariable("page") long page, @PathVariable("limit") long limit, String uid) {
List<NoteSearchVo> browseRecordVoList = browseRecordService.getAllBrowseRecordByUser(page, limit, uid);
return Result.ok(browseRecordVoList);
}
/**
*
*/
@RequestMapping("addBrowseRecord")
public Result<?> addBrowseRecord(@RequestBody BrowseRecordDTO browseRecordDTO) {
browseRecordService.addBrowseRecord(browseRecordDTO);
return Result.ok(null);
}
/**
*
*/
@RequestMapping("delRecord/{uid}")
public Result<?> delRecord(@RequestBody List<String> idList, @PathVariable String uid) {
browseRecordService.delRecord(uid, idList);
return Result.ok(null);
}
}

@ -0,0 +1,36 @@
package com.hongshu.web.controller.app;
import com.hongshu.common.enums.Result;
import com.hongshu.common.validator.myVaildator.noLogin.NoLoginIntercept;
import com.hongshu.web.domain.vo.CategoryVo;
import com.hongshu.web.service.IWebCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
*
*
* @author: hongshu
*/
@RequestMapping("/app/category")
@RestController
public class AppCategoryController {
@Autowired
private IWebCategoryService categoryService;
/**
*
*/
@GetMapping("getCategoryTreeData")
@NoLoginIntercept
public Result<?> getCategoryTreeData() {
List<CategoryVo> categoryList = categoryService.getCategoryTreeData();
return Result.ok(categoryList);
}
}

@ -0,0 +1,117 @@
package com.hongshu.web.controller.app;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hongshu.common.enums.Result;
import com.hongshu.common.validator.myVaildator.noLogin.NoLoginIntercept;
import com.hongshu.web.domain.entity.WebChat;
import com.hongshu.web.domain.vo.ChatUserRelationVo;
import com.hongshu.web.service.IWebChatService;
import com.hongshu.web.websocket.im.CountMessage;
import com.hongshu.web.websocket.im.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
*
* @author: hongshu
*/
@RequestMapping("/app/im/chat")
@RestController
public class AppChatController {
@Autowired
private IWebChatService chatService;
/**
*
*
* @param message
*/
@PostMapping("sendMsg")
@NoLoginIntercept
public Result<?> sendMsg(@RequestBody Message message) {
chatService.sendMsg(message);
return Result.ok();
}
/**
*
*
* @param currentPage
* @param pageSize
* @param acceptUid ID
*/
@GetMapping("getAllChatRecord/{currentPage}/{pageSize}")
public Result<?> getAllChatRecord(@PathVariable long currentPage, @PathVariable long pageSize, String acceptUid) {
Page<WebChat> page = chatService.getAllChatRecord(currentPage, pageSize, acceptUid);
return Result.ok(page);
}
/**
*
*/
@GetMapping("getChatUserList")
public Result<?> getChatUserList() {
List<ChatUserRelationVo> list = chatService.getChatUserList();
return Result.ok(list);
}
/**
*
*/
@GetMapping("getCountMessage")
public Result<?> getCountMessage() {
CountMessage countMessage = chatService.getCountMessage();
return Result.ok(countMessage);
}
/**
*
*/
@GetMapping("deleteMsg")
public String deleteMsg() {
return null;
}
/**
*
*/
@GetMapping("deleteAllChatRecord")
public String deleteAllChatRecord() {
return null;
}
/**
*
*/
@GetMapping("deleteChatUser")
public String deleteChatUser() {
return null;
}
/**
*
*
* @param sendUid ID
* @param type
*/
@GetMapping("clearMessageCount")
public Result<?> clearMessageCount(String sendUid, Integer type) {
chatService.clearMessageCount(sendUid, type);
return Result.ok();
}
/**
*
*
* @param sendUid ID
*/
@RequestMapping("closeChat/{sendUid}")
public boolean closeChat(@PathVariable("sendUid") String sendUid) {
return chatService.closeChat(sendUid);
}
}

@ -0,0 +1,135 @@
package com.hongshu.web.controller.app;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hongshu.common.enums.Result;
import com.hongshu.common.validator.ValidatorUtils;
import com.hongshu.common.validator.group.AddGroup;
import com.hongshu.web.domain.dto.CommentDTO;
import com.hongshu.web.domain.vo.CommentVo;
import com.hongshu.web.service.IWebCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
*
*
* @author: hongshu
*/
@RequestMapping("/app/comment")
@RestController
public class AppCommentController {
@Autowired
private IWebCommentService commentService;
/**
*
*
* @param currentPage
* @param pageSize
* @param noteId ID
*/
@GetMapping("getOneCommentByNoteId/{currentPage}/{pageSize}")
public Result<?> getOneCommentByNoteId(@PathVariable long currentPage, @PathVariable long pageSize, String noteId) {
Page<CommentVo> pageInfo = commentService.getOneCommentByNoteId(currentPage, pageSize, noteId);
return Result.ok(pageInfo);
}
/**
*
*
* @param commentId ID
*/
@GetMapping("getCommentById")
public Result<?> getCommentById(String commentId) {
return Result.ok(commentService.getCommentById(commentId));
}
/**
*
*
* @param commentDTO
*/
@PostMapping("saveCommentByDTO")
public Result<?> saveCommentByDTO(@RequestBody CommentDTO commentDTO) {
ValidatorUtils.validateEntity(commentDTO, AddGroup.class);
CommentVo commentVo = commentService.saveCommentByDTO(commentDTO);
return Result.ok(commentVo);
}
/**
* ID
*
* @param commentIds ID
*/
@PostMapping("syncCommentByIds")
public Result<?> syncCommentByIds(@RequestBody List<String> commentIds) {
commentService.syncCommentByIds(commentIds);
return Result.ok();
}
/**
* ID
*
* @param currentPage
* @param pageSize
* @param oneCommentId ID
*/
@GetMapping("getTwoCommentByOneCommentId/{currentPage}/{pageSize}")
public Result<?> getTwoCommentByOneCommentId(@PathVariable long currentPage, @PathVariable long pageSize, String oneCommentId) {
IPage<CommentVo> pageInfo = commentService.getTwoCommentByOneCommentId(currentPage, pageSize, oneCommentId);
return Result.ok(pageInfo);
}
/**
*
*
* @param currentPage
* @param pageSize
*/
@GetMapping("getNoticeComment/{currentPage}/{pageSize}")
public Result<?> getNoticeComment(@PathVariable long currentPage, @PathVariable long pageSize) {
IPage<CommentVo> pageInfo = commentService.getNoticeComment(currentPage, pageSize);
return Result.ok(pageInfo);
}
/**
*
*
* @param currentPage
* @param pageSize
* @param noteId ID
*/
@GetMapping("getCommentWithCommentByNoteId/{currentPage}/{pageSize}")
public Result<?> getCommentWithCommentByNoteId(@PathVariable long currentPage, @PathVariable long pageSize, String noteId) {
Page<CommentVo> pageInfo = commentService.getCommentWithCommentByNoteId(currentPage, pageSize, noteId);
return Result.ok(pageInfo);
}
/**
*
*
* @param commentId ID
*/
@GetMapping("scrollComment")
public Result<?> scrollComment(String commentId) {
Map<String, Object> resMap = commentService.scrollComment(commentId);
return Result.ok(resMap);
}
/**
*
*
* @param commentId ID
*/
@GetMapping("deleteCommentById")
public Result<?> deleteCommentById(String commentId) {
commentService.deleteCommentById(commentId);
return Result.ok();
}
}

@ -0,0 +1,151 @@
package com.hongshu.web.controller.app;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hongshu.common.enums.Result;
import com.hongshu.common.validator.myVaildator.noLogin.NoLoginIntercept;
import com.hongshu.web.domain.dto.EsNoteDTO;
import com.hongshu.web.domain.entity.WebCategory;
import com.hongshu.web.domain.entity.WebUser;
import com.hongshu.web.domain.vo.NoteSearchVo;
import com.hongshu.web.service.IWebEsNoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* ES
*
* @author: hongshu
*/
@RestController
@RequestMapping("/app/es/note")
public class AppEsNoteController {
@Autowired
private IWebEsNoteService esNoteService;
/**
*
*
* @param currentPage
* @param pageSize
* @param esNoteDTO
*/
@NoLoginIntercept
@PostMapping("getNoteByDTO/{currentPage}/{pageSize}")
public Result<?> getNoteByDTO(@PathVariable long currentPage, @PathVariable long pageSize, @RequestBody EsNoteDTO esNoteDTO) {
Page<NoteSearchVo> page = esNoteService.getNoteByDTO(currentPage, pageSize, esNoteDTO);
return Result.ok(page);
}
/**
*
*
* @param esNoteDTO
*/
@NoLoginIntercept
@PostMapping("getCategoryAgg")
public Result<?> getCategoryAgg(@RequestBody EsNoteDTO esNoteDTO) {
List<WebCategory> categoryList = esNoteService.getCategoryAgg(esNoteDTO);
return Result.ok(categoryList);
}
/**
*
*
* @param currentPage
* @param pageSize
*/
@NoLoginIntercept
@GetMapping("getRecommendNote/{currentPage}/{pageSize}")
public Result<?> getRecommendNote(@PathVariable long currentPage, @PathVariable long pageSize) {
Page<NoteSearchVo> page = esNoteService.getRecommendNote(currentPage, pageSize);
return Result.ok(page);
}
/**
*
*
* @param currentPage
* @param pageSize
*/
@NoLoginIntercept
@GetMapping("getRecommendUser/{currentPage}/{pageSize}")
public Result<?> getRecommendUser(@PathVariable long currentPage, @PathVariable long pageSize) {
Page<WebUser> page = esNoteService.getRecommendUser(currentPage, pageSize);
return Result.ok(page);
}
/**
*
*
* @param currentPage
* @param pageSize
*/
@NoLoginIntercept
@GetMapping("getHotNote/{currentPage}/{pageSize}")
public Result<?> getHotNote(@PathVariable long currentPage, @PathVariable long pageSize) {
Page<NoteSearchVo> page = esNoteService.getHotNote(currentPage, pageSize);
return Result.ok(page);
}
/**
*
*
* @param noteSearchVo
*/
@PostMapping("addNote")
public void addNote(@RequestBody NoteSearchVo noteSearchVo) {
esNoteService.addNote(noteSearchVo);
}
/**
*
*
* @param noteSearchVo
*/
@PostMapping("updateNote")
public void updateNote(@RequestBody NoteSearchVo noteSearchVo) {
esNoteService.updateNote(noteSearchVo);
}
/**
* es
*
* @param noteId ID
*/
@RequestMapping("deleteNote/{noteId}")
public void deleteNote(@PathVariable String noteId) {
esNoteService.deleteNote(noteId);
}
/**
*
*/
@PostMapping("addNoteBulkData")
@NoLoginIntercept
public void addNoteBulkData() {
esNoteService.addNoteBulkData();
}
/**
*
*/
@DeleteMapping("delNoteBulkData")
@NoLoginIntercept
public void delNoteBulkData() {
esNoteService.delNoteBulkData();
}
/**
*
*/
@PostMapping("refreshNoteData")
@NoLoginIntercept
public Result<?> refreshNoteData() {
esNoteService.refreshNoteData();
return Result.ok();
}
}

@ -0,0 +1,66 @@
package com.hongshu.web.controller.app;
import com.hongshu.common.enums.Result;
import com.hongshu.common.validator.myVaildator.noLogin.NoLoginIntercept;
import com.hongshu.web.domain.dto.EsRecordDTO;
import com.hongshu.web.service.IWebEsRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* ES
*
* @author: hongshu
*/
@RequestMapping("/app/es/record")
@RestController
public class AppEsRecordController {
@Autowired
private IWebEsRecordService esRecordService;
/**
*
*/
@GetMapping("getRecordByKeyWord")
public Result<?> getRecordByKeyWord(EsRecordDTO esRecordDTO) {
return Result.ok(esRecordService.getRecordByKeyWord(esRecordDTO));
}
/**
*
*/
@NoLoginIntercept
@GetMapping("getHotRecord")
public Result<?> getHotRecord() {
return Result.ok(esRecordService.getHotRecord());
}
/**
*
*/
@PostMapping("addRecord")
public Result<?> addRecord(@RequestBody EsRecordDTO esRecordDTO) {
esRecordService.addRecord(esRecordDTO);
return Result.ok();
}
/**
*
*/
@PostMapping("clearRecord")
public Result<?> clearRecordByUser(@RequestBody EsRecordDTO esRecordDTO) {
esRecordService.clearRecordByUser(esRecordDTO);
return Result.ok();
}
/**
*
*/
@PostMapping("clearAllRecord")
public Result<?> clearAllRecord() {
esRecordService.clearAllRecord();
return Result.ok();
}
}

@ -0,0 +1,97 @@
package com.hongshu.web.controller.app;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hongshu.common.enums.Result;
import com.hongshu.web.domain.vo.FollowerVo;
import com.hongshu.web.domain.vo.TrendVo;
import com.hongshu.web.service.IWebFollowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
*
*
* @author: hongshu
*/
@RequestMapping("/app/follower")
@RestController
public class AppFollowerController {
@Autowired
IWebFollowerService followerService;
/**
*
*
* @param currentPage
* @param pageSize
*/
@GetMapping("getFollowTrend/{currentPage}/{pageSize}")
public Result<?> getFollowTrend(@PathVariable long currentPage, @PathVariable long pageSize) {
Page<TrendVo> pageInfo = followerService.getFollowTrend(currentPage, pageSize);
return Result.ok(pageInfo);
}
/**
*
*
* @param currentPage
* @param pageSize
*/
@GetMapping("getFollowList/{currentPage}/{pageSize}")
public Result<?> getFollowList(@PathVariable long currentPage, @PathVariable long pageSize) {
Page<TrendVo> pageInfo = followerService.getFollowList(currentPage, pageSize);
return Result.ok(pageInfo);
}
/**
*
*
* @param currentPage
* @param pageSize
* @param type
*/
@GetMapping("getFriend/{currentPage}/{pageSize}")
public Result<?> getFriend(@PathVariable long currentPage, @PathVariable long pageSize, String uid, Integer type) {
Page<FollowerVo> pageInfo = followerService.getFriend(currentPage, pageSize, uid, type);
return Result.ok(pageInfo);
}
/**
*
*
* @param followerId ID
*/
@GetMapping("followById")
public Result<?> followById(String followerId) {
followerService.followById(followerId);
return Result.ok();
}
/**
*
*
* @param followerId ID
*/
@GetMapping("isFollow")
public Result<?> isFollow(String followerId) {
boolean flag = followerService.isFollow(followerId);
return Result.ok(flag);
}
/**
*
*
* @param currentPage
* @param pageSize
*/
@GetMapping("getNoticeFollower/{currentPage}/{pageSize}")
public Result<?> getNoticeFollower(@PathVariable long currentPage, @PathVariable long pageSize) {
Page<FollowerVo> pageInfo = followerService.getNoticeFollower(currentPage, pageSize);
return Result.ok(pageInfo);
}
}

@ -0,0 +1,60 @@
package com.hongshu.web.controller.app;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hongshu.common.enums.Result;
import com.hongshu.common.validator.ValidatorUtils;
import com.hongshu.common.validator.group.AddGroup;
import com.hongshu.web.domain.dto.LikeOrCollectionDTO;
import com.hongshu.web.domain.vo.LikeOrCollectionVo;
import com.hongshu.web.service.IWebLikeOrCollectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* /
*
* @author: hongshu
*/
@RequestMapping("/app/likeOrCollection")
@RestController
public class AppLikeOrCollectionController {
@Autowired
IWebLikeOrCollectionService likeOrCollectionService;
/**
*
*
* @param likeOrCollectionDTO
*/
@PostMapping("likeOrCollectionByDTO")
public Result<?> likeOrCollectionByDTO(@RequestBody LikeOrCollectionDTO likeOrCollectionDTO) {
ValidatorUtils.validateEntity(likeOrCollectionDTO, AddGroup.class);
likeOrCollectionService.likeOrCollectionByDTO(likeOrCollectionDTO);
return Result.ok();
}
/**
*
*
* @param likeOrCollectionDTO
*/
@PostMapping("isLikeOrCollection")
public Result<?> isLikeOrCollection(@RequestBody LikeOrCollectionDTO likeOrCollectionDTO) {
boolean flag = likeOrCollectionService.isLikeOrCollection(likeOrCollectionDTO);
return Result.ok(flag);
}
/**
*
*
* @param currentPage
* @param pageSize
*/
@GetMapping("getNoticeLikeOrCollection/{currentPage}/{pageSize}")
public Result<?> getNoticeLikeOrCollection(@PathVariable long currentPage, @PathVariable long pageSize) {
Page<LikeOrCollectionVo> pageInfo = likeOrCollectionService.getNoticeLikeOrCollection(currentPage, pageSize);
return Result.ok(pageInfo);
}
}

@ -0,0 +1,96 @@
package com.hongshu.web.controller.app;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hongshu.common.enums.Result;
import com.hongshu.common.validator.myVaildator.noLogin.NoLoginIntercept;
import com.hongshu.web.domain.vo.NoteVo;
import com.hongshu.web.service.IWebNoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
*
*
* @author: hongshu
*/
@RequestMapping("/app/note")
@RestController
public class AppNoteController {
@Autowired
private IWebNoteService noteService;
/**
*
*
* @param noteId ID
*/
@GetMapping("getNoteById")
@NoLoginIntercept
public Result<?> getNoteById(String noteId) {
NoteVo noteVo = noteService.getNoteById(noteId);
return Result.ok(noteVo);
}
/**
*
*
* @param noteData
* @param files
*/
@PostMapping("saveNoteByDTO")
public Result<?> saveNoteByDTO(@RequestParam("noteData") String noteData, @RequestParam("uploadFiles") MultipartFile[] files) {
noteService.saveNoteByDTO(noteData, files);
return Result.ok();
}
/**
*
*
* @param noteIds ID
*/
@PostMapping("deleteNoteByIds")
public Result<?> deleteNoteByIds(@RequestBody List<String> noteIds) {
noteService.deleteNoteByIds(noteIds);
return Result.ok();
}
/**
*
*
* @param noteData
* @param files
*/
@PostMapping("updateNoteByDTO")
public Result<?> updateNoteByDTO(@RequestParam("noteData") String noteData, @RequestParam("uploadFiles") MultipartFile[] files) {
noteService.updateNoteByDTO(noteData, files);
return Result.ok();
}
/**
*
*
* @param currentPage
* @param pageSize
*/
@GetMapping("getHotPage/{currentPage}/{pageSize}")
public Result<?> getHotPage(@PathVariable long currentPage, @PathVariable long pageSize) {
Page<NoteVo> pageInfo = noteService.getHotPage(currentPage, pageSize);
return Result.ok(pageInfo);
}
/**
*
*
* @param noteId ID
*/
@GetMapping("pinnedNote")
public Result<?> pinnedNote(String noteId) {
boolean flag = noteService.pinnedNote(noteId);
return Result.ok(flag);
}
}

@ -0,0 +1,76 @@
package com.hongshu.web.controller.app;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hongshu.common.enums.Result;
import com.hongshu.web.domain.entity.WebTag;
import com.hongshu.web.domain.vo.NoteVo;
import com.hongshu.web.domain.vo.TagVo;
import com.hongshu.web.service.IWebTagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
*
*
* @author: hongshu
*/
@RequestMapping("/app/tag")
@RestController
public class AppTagController {
@Autowired
private IWebTagService tagService;
/**
*
*/
@GetMapping("getHotTagList")
public Result<?> getHotTagList() {
List<TagVo> voList = tagService.getHotTagList();
return Result.ok(voList);
}
/**
*
*
* @param currentPage
* @param pageSize
* @param keyword
*/
@GetMapping("getTagByKeyword/{currentPage}/{pageSize}")
public Result<?> getTagByKeyword(@PathVariable long currentPage, @PathVariable long pageSize, String keyword) {
Page<WebTag> page = tagService.getTagByKeyword(currentPage, pageSize, keyword);
return Result.ok(page);
}
/**
*
*
* @param tagId ID
*/
@GetMapping("getTagById")
public Result<?> getTagById(String tagId) {
WebTag tag = tagService.getById(tagId);
return Result.ok(tag);
}
/**
* ID
*
* @param currentPage
* @param pageSize
* @param tagId id
* @param type
*/
@GetMapping("getNoteByTagId/{currentPage}/{pageSize}")
public Result<?> getNoteByTagId(@PathVariable long currentPage, @PathVariable long pageSize, String tagId, Integer type) {
Page<NoteVo> imgDetailVoList = tagService.getNoteByTagId(currentPage, pageSize, tagId, type);
return Result.ok(imgDetailVoList);
}
}

@ -0,0 +1,113 @@
package com.hongshu.web.controller.app;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageInfo;
import com.hongshu.common.constant.HttpStatus;
import com.hongshu.common.core.page.TableDataInfo;
import com.hongshu.common.enums.Result;
import com.hongshu.web.domain.entity.WebUser;
import com.hongshu.web.domain.vo.NoteSearchVo;
import com.hongshu.web.service.IWebUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import static com.hongshu.common.utils.PageUtils.startPage;
/**
*
*
* @author: hongshu
*/
@RequestMapping("/app/user")
@RestController
public class AppUserController {
@Autowired
private IWebUserService userService;
/**
*
*
* @param currentPage
* @param pageSize
* @param userId ID
* @param type
*/
@GetMapping("getTrendByUser/{currentPage}/{pageSize}")
public Result<?> getTrendByUser(@PathVariable long currentPage, @PathVariable long pageSize, String userId, Integer type) {
Page<NoteSearchVo> pageInfo = userService.getTrendByUser(currentPage, pageSize, userId, type);
return Result.ok(pageInfo);
}
/**
*
*
* @param userId ID
*/
@GetMapping("getUserById")
public Result<?> getUserById(String userId) {
WebUser user = userService.getUserById(userId);
return Result.ok(user);
}
/**
*
*
* @param user
*/
@PostMapping("updateUser")
public Result<?> updateUser(@RequestBody WebUser user) {
WebUser updateUser = userService.updateUser(user);
return Result.ok(updateUser);
}
/**
*
*
* @param keyword
*/
@GetMapping("getUserByKeyword/{currentPage}/{pageSize}")
public Result<?> getUserByKeyword(@PathVariable long currentPage, @PathVariable long pageSize, String keyword) {
Page<WebUser> pageInfo = userService.getUserByKeyword(currentPage, pageSize, keyword);
return Result.ok(pageInfo);
}
/**
*
*
* @param keyword
*/
@GetMapping("saveUserSearchRecord")
public Result<?> saveUserSearchRecord(String keyword) {
userService.saveUserSearchRecord(keyword);
return Result.ok();
}
/**
*
*
* @param user
*/
@GetMapping("getUserList")
public TableDataInfo getUserList(WebUser user) {
startPage();
List<WebUser> userList = userService.getUserList(user);
return getDataTable(userList);
}
/**
*
*/
@SuppressWarnings({"rawtypes", "unchecked"})
protected TableDataInfo getDataTable(List<?> list) {
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setMsg("查询成功");
rspData.setRows(list);
rspData.setTotal(new PageInfo(list).getTotal());
return rspData;
}
}

@ -24,7 +24,7 @@ import java.util.concurrent.TimeUnit;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
public class CaptchaController {

@ -25,7 +25,7 @@ import java.util.List;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/common")

@ -24,7 +24,7 @@ import com.hongshu.system.domain.SysCache;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/monitor/cache")

@ -10,7 +10,7 @@ import com.hongshu.framework.web.domain.Server;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/monitor/server")

@ -23,7 +23,7 @@ import com.hongshu.system.service.ISysLogininforService;
/**
* 访
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/monitor/logininfor")

@ -22,7 +22,7 @@ import com.hongshu.system.service.ISysOperLogService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/monitor/operlog")

@ -26,7 +26,7 @@ import com.hongshu.system.service.ISysUserOnlineService;
/**
* 线
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/monitor/online")

@ -25,7 +25,7 @@ import com.hongshu.system.service.ISysConfigService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/config")

@ -25,7 +25,7 @@ import com.hongshu.system.service.ISysDeptService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/dept")

@ -28,7 +28,7 @@ import com.hongshu.system.service.ISysDictTypeService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/dict/data")

@ -25,7 +25,7 @@ import com.hongshu.system.service.ISysDictTypeService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/dict/type")

@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RestController;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
public class SysIndexController {

@ -20,7 +20,7 @@ import com.hongshu.system.service.ISysMenuService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
public class SysLoginController

@ -24,7 +24,7 @@ import com.hongshu.system.service.ISysMenuService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/menu")

@ -23,7 +23,7 @@ import com.hongshu.system.service.ISysNoticeService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/notice")

@ -25,7 +25,7 @@ import com.hongshu.system.service.ISysPostService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/post")

@ -20,7 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/user/profile")

@ -14,7 +14,7 @@ import com.hongshu.system.service.ISysConfigService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
public class SysRegisterController extends BaseController

@ -34,7 +34,7 @@ import com.hongshu.system.service.ISysUserService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/role")

@ -35,7 +35,7 @@ import com.hongshu.system.service.ISysUserService;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/system/user")

@ -19,7 +19,7 @@ import java.util.Map;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/album")

@ -19,7 +19,7 @@ import java.util.Map;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/comment")

@ -23,7 +23,7 @@ import java.util.Map;
/**
* 访
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/loginInfo")

@ -23,7 +23,7 @@ import java.util.Map;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/member")

@ -17,7 +17,7 @@ import java.util.List;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/navbar")

@ -23,7 +23,7 @@ import java.util.Map;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/note")

@ -22,7 +22,7 @@ import java.util.Map;
/**
*
*
* @author hongshu
* @author: hongshu
*/
@RestController
@RequestMapping("/tag")

@ -25,7 +25,7 @@ import io.swagger.annotations.ApiOperation;
/**
* swagger
*
* @author hongshu
* @author: hongshu
*/
@Api("用户信息管理")
@RestController

@ -2,11 +2,10 @@ package com.hongshu.web.controller.web;
import com.hongshu.common.enums.Result;
import com.hongshu.common.validator.myVaildator.noLogin.NoLoginIntercept;
import com.hongshu.web.domain.dto.EsRecordDTO;
import com.hongshu.web.service.IWebEsRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
* ES
@ -22,12 +21,10 @@ public class WebEsRecordController {
/**
*
*
* @param keyword
*/
@GetMapping("getRecordByKeyWord")
public Result<?> getRecordByKeyWord(String keyword) {
return Result.ok(esRecordService.getRecordByKeyWord(keyword));
public Result<?> getRecordByKeyWord(EsRecordDTO esRecordDTO) {
return Result.ok(esRecordService.getRecordByKeyWord(esRecordDTO));
}
/**
@ -41,12 +38,10 @@ public class WebEsRecordController {
/**
*
*
* @param keyword
*/
@GetMapping("addRecord")
public Result<?> addRecord(String keyword) {
esRecordService.addRecord(keyword);
@PostMapping("addRecord")
public Result<?> addRecord(@RequestBody EsRecordDTO esRecordDTO) {
esRecordService.addRecord(esRecordDTO);
return Result.ok();
}
}

@ -44,8 +44,8 @@ public class WebFollowerController {
* @param type
*/
@GetMapping("getFriend/{currentPage}/{pageSize}")
public Result<?> getFriend(@PathVariable long currentPage, @PathVariable long pageSize, Integer type) {
Page<FollowerVo> pageInfo = followerService.getFriend(currentPage, pageSize, type);
public Result<?> getFriend(@PathVariable long currentPage, @PathVariable long pageSize, String uid, Integer type) {
Page<FollowerVo> pageInfo = followerService.getFriend(currentPage, pageSize, uid, type);
return Result.ok(pageInfo);
}

@ -21,7 +21,7 @@ import java.util.List;
/**
* Swagger2
*
* @author hongshu
* @author: hongshu
*/
@Configuration
public class SwaggerConfig {
@ -109,7 +109,7 @@ public class SwaggerConfig {
// 用ApiInfoBuilder进行定制
return new ApiInfoBuilder()
// 设置标题
.title("标题:若依管理系统_接口文档")
.title("标题:红薯管理系统_接口文档")
// 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// 作者信息

@ -149,19 +149,25 @@ xss:
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
# ES配置
es:
url: localhost
port: 9200
username:
password:
# OSS类型 0本地、1七牛云
oss:
type: 1 # 0是本地存储1是七牛云存储
type: 1
# 七牛云配置
qiNiuYun:
domain:
accessKey:
secretKey:
bucketName:
domain:
accessKey:
secretKey:
bucketName:
# 下载路径
file:
upload:
path: /data/docker/nginx/html/data
path: D:/hongshu/uploadPath

@ -1 +0,0 @@
restart.include.json=/com.alibaba.fastjson2.*.jar

@ -1,61 +0,0 @@
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
master:
url: jdbc:mysql://localhost:3306/hongshu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: Myj950501
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: hongshu
login-password: 123456
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true

@ -1,167 +0,0 @@
# 项目相关配置
hongshu:
# 名称
name: hongshu
# 版本
version: 3.8.7
# 版权年份
copyrightYear: 2024
# 文件路径 示例( Windows配置D:/hongshu/uploadPathLinux配置 /home/hongshu/uploadPath
profile: D:/hongshu/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证
captchaType: math
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8080
servlet:
# 应用的访问路径
context-path: /
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# 连接数满后的排队数默认为100
accept-count: 1000
threads:
# tomcat最大线程数默认为200
max: 800
# Tomcat启动初始化的线程数默认值10
min-spare: 100
# 日志配置
logging:
level:
com.hongshu: debug
org.springframework: warn
# 用户配置
user:
password:
# 密码最大错误次数
maxRetryCount: 5
# 密码锁定时间默认10分钟
lockTime: 10
# Spring配置
spring:
# 资源信息
messages:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: druid
# 文件上传
servlet:
multipart:
# 单个文件大小
max-file-size: 10MB
# 设置总上传的文件大小
max-request-size: 20MB
# 服务模块
devtools:
restart:
# 热部署开关
enabled: true
# redis 配置
redis:
# 地址
host: localhost
# 端口默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
password: Myj950501
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# token配置
token:
# 令牌自定义标识
header: Authorization
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期默认30分钟
expireTime: 30
# MyBatis配置
mybatis:
# 搜索指定包别名
typeAliasesPackage: com.hongshu.**.domain
# 配置mapper的扫描找到所有的mapper.xml映射文件
mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml
#mybatis-plus
mybatis-plus:
mapper-locations: classpath*:mapper/**/*.xml
# config-location: classpath:mybatis/mybatis-config.xml
#实体扫描多个package用逗号或者分号分隔
typeAliasesPackage: com.hongshu.**.domain
global-config:
#数据库相关配置
db-config:
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
id-type: AUTO
logic-delete-value: -1
logic-not-delete-value: 0
banner: false
#原生配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
# PageHelper分页插件
pagehelper:
helperDialect: mysql
supportMethodsArguments: true
params: count=countSql
# Swagger配置
swagger:
# 是否开启swagger
enabled: true
# 请求前缀
pathMapping: /dev-api
# 防止XSS攻击
xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
excludes: /system/notice
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
es:
url: localhost
port: 9200
oss:
type: 1 # 0是本地存储1是七牛云存储
qiNiuYun:
domain: https://image.mayongjian.cn
accessKey: DtBEKv-uwl79DhgdGRWDTxX0qrVw2oLb25BuNpTv
secretKey: JV6AM6iMR6ovouNEwoSQvLpsRWLhwOjBmnj2SyxP
bucketName: xiaomage-blog
file:
upload:
path: /data/docker/nginx/html/data

@ -1,8 +0,0 @@
Application Version: ${hongshu.version}
Spring Boot Version: ${spring-boot.version}
__ __
/ /_ ____ ____ ____ ______/ /_ __ __
/ __ \/ __ \/ __ \/ __ `/ ___/ __ \/ / / /
/ / / / /_/ / / / / /_/ (__ ) / / / /_/ /
/_/ /_/\____/_/ /_/\__, /____/_/ /_/\__,_/
/____/

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

Loading…
Cancel
Save