代码优化&官网

This commit is contained in:
linfeng 2022-10-13 14:50:59 +08:00
parent 8e4e7c4dd3
commit 9da979a0e6
4 changed files with 18 additions and 13 deletions

View File

@ -1,10 +1,12 @@
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">linfeng-community 开源版</h1> <h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">linfeng-community 开源版</h1>
<h4 align="center">基于SpringBoot2+MybatisPlus+Shiro+Quartz+jwt+Redis+Vue+Uniapp的前后端分离的社交论坛问答发帖/BBS项目</h4> <h4 align="center">基于SpringBoot2+MybatisPlus+Shiro+Quartz+jwt+Redis+Vue+Uniapp的前后端分离的社交论坛问答发帖/BBS项目</h4>
[H5端演示](https://www.linfeng.tech) | [后台演示](https://dev.linfeng.tech) | [群聊](https://gitee.com/virus010101/linfeng-community/raw/master/images/qrcode.jpg) | [文档](https://www.kancloud.cn/linfengkj/linfeng_community/2754703) | [版本区别](http://pic.linfeng.tech/test/20220906/be9dfe9085024347a82d531d4c96cc51.png) | [Github](https://github.com/virus010101/linfeng-community) [H5端演示](https://www.linfeng.tech) | [后台演示](https://dev.linfeng.tech) | [群聊](https://gitee.com/virus010101/linfeng-community/raw/master/images/qrcode.jpg) | [文档](https://www.kancloud.cn/linfengkj/linfeng_community/2754703) | [版本区别](http://pic.linfeng.tech/test/20220906/be9dfe9085024347a82d531d4c96cc51.png) | [Github](https://github.com/virus010101/linfeng-community) | [官网](https://net.linfeng.tech)
#### 1.介绍 #### 1.介绍
**官网**[https://net.linfeng.tech]
林风社交论坛uniapp**小程序/H5/APP版本**基于SpringBoot2+MybatisPlus+Shiro+Quartz+jwt+Redis+Vue+Uniapp的前后端分离的社交论坛问答发帖/BBS项目。 项目分为Uniapp用户端**兼容H5、微信小程序、APP端**和Vue后台管理端包括完整的权限处理 基于以下技术栈开发SpringBoot、MybatisPlus、Shiro、Quartz、jwt、Redis、Vue、Uniapp、MySQL5.7。 林风社交论坛uniapp**小程序/H5/APP版本**基于SpringBoot2+MybatisPlus+Shiro+Quartz+jwt+Redis+Vue+Uniapp的前后端分离的社交论坛问答发帖/BBS项目。 项目分为Uniapp用户端**兼容H5、微信小程序、APP端**和Vue后台管理端包括完整的权限处理 基于以下技术栈开发SpringBoot、MybatisPlus、Shiro、Quartz、jwt、Redis、Vue、Uniapp、MySQL5.7。
功能:图文帖,短视频,圈子,私聊,微信支付(小程序/H5/app付费贴积分签到钱包充值积分余额兑换话题标签抽奖大转盘手机号邮箱登录虚拟用户发帖举报第三方广告会员模块 等完整功能,直接看演示更直观↓↓↓↓↓↓ 功能:图文帖,短视频,圈子,私聊,微信支付(小程序/H5/app付费贴积分签到钱包充值积分余额兑换话题标签抽奖大转盘手机号邮箱登录虚拟用户发帖举报第三方广告会员模块 等完整功能,直接看演示更直观↓↓↓↓↓↓
@ -15,6 +17,8 @@
代码三端开源,包括用户端也发布了开源版(**SQL文件在群文件中** 代码三端开源,包括用户端也发布了开源版(**SQL文件在群文件中**
#### 2.软件演示 #### 2.软件演示
##### 2.1移动端H5演示版本演示站为标准版手机扫码浏览/输入手机号登录)或者 https://www.linfeng.tech 小程序效果演示和h5一致除了登录不一样 ##### 2.1移动端H5演示版本演示站为标准版手机扫码浏览/输入手机号登录)或者 https://www.linfeng.tech 小程序效果演示和h5一致除了登录不一样
@ -115,6 +119,8 @@ https://github.com/virus010101/linfeng-community
#### 4.必看说明 #### 4.必看说明
**官网**[https://net.linfeng.tech]
1.**后台前端的代码**在 **src\main\resources\static\linfeng-community-vue** 目录下! 1.**后台前端的代码**在 **src\main\resources\static\linfeng-community-vue** 目录下!
2.**用户端的前端代码**在 **src\main\resources\static\linfeng-community-uniapp-ky** 目录下! 2.**用户端的前端代码**在 **src\main\resources\static\linfeng-community-uniapp-ky** 目录下!
@ -127,6 +133,8 @@ http://pic.linfeng.tech/test/20220906/be9dfe9085024347a82d531d4c96cc51.png
http://pic.linfeng.tech/test/20220727/e472fbef0a8f412b912bea6fa5317acf.png http://pic.linfeng.tech/test/20220727/e472fbef0a8f412b912bea6fa5317acf.png
了解更多请查看官网
4.SQL文件开源的在QQ群开源不易**请左上角star后备注gitee的用户名加QQ群640700429获取** 4.SQL文件开源的在QQ群开源不易**请左上角star后备注gitee的用户名加QQ群640700429获取**
<img src="https://gitee.com/virus010101/linfeng-community/raw/master/images/qrcode.jpg" style="zoom:25%;" /> <img src="https://gitee.com/virus010101/linfeng-community/raw/master/images/qrcode.jpg" style="zoom:25%;" />

View File

@ -19,6 +19,8 @@ import io.linfeng.modules.admin.entity.AppUserEntity;
import io.linfeng.modules.app.form.AddThumbsForm; import io.linfeng.modules.app.form.AddThumbsForm;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -50,7 +52,7 @@ public class CommentThumbsServiceImpl extends ServiceImpl<CommentThumbsDao, Comm
.eq(CommentThumbsEntity::getCId, id) .eq(CommentThumbsEntity::getCId, id)
.eq(CommentThumbsEntity::getUid, uid)); .eq(CommentThumbsEntity::getUid, uid));
return one!=null; return Optional.ofNullable(one).isPresent();
} }
@Override @Override

View File

@ -61,17 +61,13 @@ public class FollowServiceImpl extends ServiceImpl<FollowDao, FollowEntity> impl
queryWrapper.eq(FollowEntity::getUid,uid); queryWrapper.eq(FollowEntity::getUid,uid);
queryWrapper.eq(FollowEntity::getFollowUid,id); queryWrapper.eq(FollowEntity::getFollowUid,id);
Integer num = baseMapper.selectCount(queryWrapper); Integer num = baseMapper.selectCount(queryWrapper);
if(num==0){ return num!=0;
return false;
}
return true;
} }
@Override @Override
public List<Integer> getFollowUid(AppUserEntity user) { public List<Integer> getFollowUid(AppUserEntity user) {
List<FollowEntity> list = this.lambdaQuery().eq(FollowEntity::getUid, user.getUid()).list(); List<FollowEntity> list = this.lambdaQuery().eq(FollowEntity::getUid, user.getUid()).list();
List<Integer> collect = list.stream().map(FollowEntity::getFollowUid).collect(Collectors.toList()); return list.stream().map(FollowEntity::getFollowUid).collect(Collectors.toList());
return collect;
} }
@Override @Override
@ -102,15 +98,13 @@ public class FollowServiceImpl extends ServiceImpl<FollowDao, FollowEntity> impl
if(list.isEmpty()){ if(list.isEmpty()){
return new ArrayList<>(); return new ArrayList<>();
} }
List<Integer> collect = list.stream().map(FollowEntity::getUid).collect(Collectors.toList()); return list.stream().map(FollowEntity::getUid).collect(Collectors.toList());
return collect;
} }
@Override @Override
public List<Integer> getFollowUids(AppUserEntity user) { public List<Integer> getFollowUids(AppUserEntity user) {
List<FollowEntity> list = this.lambdaQuery().eq(FollowEntity::getUid, user.getUid()).list(); List<FollowEntity> list = this.lambdaQuery().eq(FollowEntity::getUid, user.getUid()).list();
List<Integer> collect = list.stream().map(FollowEntity::getFollowUid).collect(Collectors.toList()); return list.stream().map(FollowEntity::getFollowUid).collect(Collectors.toList());
return collect;
} }

View File

@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -57,7 +58,7 @@ public class PostCollectionServiceImpl extends ServiceImpl<PostCollectionDao, Po
new LambdaQueryWrapper<PostCollectionEntity>() new LambdaQueryWrapper<PostCollectionEntity>()
.eq(PostCollectionEntity::getPostId, postId) .eq(PostCollectionEntity::getPostId, postId)
.eq(PostCollectionEntity::getUid, uid)); .eq(PostCollectionEntity::getUid, uid));
return entity != null; return Optional.ofNullable(entity).isPresent();
} }
@Override @Override