Merge branch 'master' of https://gitee.com/virus010101/linfeng-community
This commit is contained in:
commit
30b87af016
@ -64,7 +64,10 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryDao, CategoryEntity
|
||||
if (count > 0) {
|
||||
throw new LinfengException("分类名不能重复");
|
||||
}
|
||||
this.save(category);
|
||||
boolean save = this.save(category);
|
||||
if(!save){
|
||||
throw new LinfengException("分类保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,6 +89,7 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryDao, CategoryEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateCategory(CategoryEntity category) {
|
||||
Integer count = this.lambdaQuery()
|
||||
.eq(CategoryEntity::getCateName, category.getCateName())
|
||||
@ -93,7 +97,10 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryDao, CategoryEntity
|
||||
if (count > 1) {
|
||||
throw new LinfengException("分类名不能重复");
|
||||
}
|
||||
this.updateById(category);
|
||||
boolean update = this.updateById(category);
|
||||
if(!update){
|
||||
throw new LinfengException("分类更新失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "关注")
|
||||
public class AddPostDeleteForm {
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Integer id;
|
||||
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "私聊列表请求体")
|
||||
public class ChatListForm {
|
||||
|
||||
@ApiModelProperty(value = "接收用户uid")
|
||||
private Integer uid;
|
||||
|
||||
@ApiModelProperty(value = "page")
|
||||
private Integer page;
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "私聊消息请求体")
|
||||
public class ChatSendForm {
|
||||
|
||||
@ApiModelProperty(value = "接收用户uid")
|
||||
private Integer uid;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 100, message = "消息不能超过100个字符")
|
||||
@ApiModelProperty(value = "content")
|
||||
private String content;
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "用户删除自己评论")
|
||||
public class DelCommentForm {
|
||||
|
||||
@ApiModelProperty(value = "用户评论id")
|
||||
private Integer id;
|
||||
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "话题添加请求")
|
||||
public class DiscussAddForm {
|
||||
|
||||
@ApiModelProperty(value = "介绍")
|
||||
@NotBlank
|
||||
@Length(max = 50, message = "描述不能超过50个字符")
|
||||
private String introduce;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
@Length(max = 15, message = "标题不能超过15个字符")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "圈子id")
|
||||
private Integer topicId;
|
||||
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "话题列表请求")
|
||||
public class DiscussListForm {
|
||||
|
||||
@ApiModelProperty(value = "page")
|
||||
private Integer page;
|
||||
|
||||
@ApiModelProperty(value = "topicId")
|
||||
private Integer topicId;
|
||||
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "轮播图列表请求体")
|
||||
public class LinkListForm {
|
||||
|
||||
@ApiModelProperty(value = "type")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "page")
|
||||
private Integer page;
|
||||
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 登录表单
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "登录表单")
|
||||
public class LoginForm {
|
||||
@ApiModelProperty(value = "手机号",required = true)
|
||||
@NotBlank(message="手机号不能为空")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "密码",required = true)
|
||||
@NotBlank(message="密码不能为空")
|
||||
private String password;
|
||||
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 注册表单
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "注册表单")
|
||||
public class RegisterForm {
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@NotBlank(message="手机号不能为空")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "密码")
|
||||
@NotBlank(message="密码不能为空")
|
||||
private String password;
|
||||
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "设置管理员请求")
|
||||
public class SetAdminForm {
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Integer uid;
|
||||
|
||||
@ApiModelProperty(value = "topicId")
|
||||
private Integer topicId;
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "更新私聊消息状态请求体")
|
||||
public class UpdateChatStatusForm {
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Integer uid;
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
/**
|
||||
* -----------------------------------
|
||||
* 林风社交论坛开源版本请务必保留此注释头信息
|
||||
* 开源地址: https://gitee.com/virus010101/linfeng-community
|
||||
* 演示站点:https://www.linfeng.tech
|
||||
* 可正常分享和学习源码,不得用于非法牟利!
|
||||
* 商业版购买联系技术客服 QQ: 3582996245
|
||||
* Copyright (c) 2021-2023 linfeng all rights reserved.
|
||||
* 版权所有,侵权必究!
|
||||
* -----------------------------------
|
||||
*/
|
||||
package io.linfeng.modules.app.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "更新系统通知消息状态请求体")
|
||||
public class UpdateSystemNoticeStatusForm {
|
||||
|
||||
@ApiModelProperty(value = "帖子id")
|
||||
private Integer id;
|
||||
|
||||
}
|
@ -48,17 +48,17 @@ public class CommentThumbsServiceImpl extends ServiceImpl<CommentThumbsDao, Comm
|
||||
|
||||
/**
|
||||
* 是否点赞
|
||||
* @param uid
|
||||
* @param id
|
||||
* @param uid 用户id
|
||||
* @param id 评论id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean isThumbs(Integer uid, Long id) {
|
||||
CommentThumbsEntity one = baseMapper.selectOne(new LambdaQueryWrapper<CommentThumbsEntity>()
|
||||
CommentThumbsEntity commentThumbs = this.lambdaQuery()
|
||||
.eq(CommentThumbsEntity::getCId, id)
|
||||
.eq(CommentThumbsEntity::getUid, uid));
|
||||
|
||||
return Optional.ofNullable(one).isPresent();
|
||||
.eq(CommentThumbsEntity::getUid, uid)
|
||||
.one();
|
||||
return Optional.ofNullable(commentThumbs).isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -70,8 +70,8 @@ public class CommentThumbsServiceImpl extends ServiceImpl<CommentThumbsDao, Comm
|
||||
|
||||
/**
|
||||
* 点赞
|
||||
* @param request
|
||||
* @param user
|
||||
* @param request 请求体
|
||||
* @param user 用户实体
|
||||
*/
|
||||
@Override
|
||||
public void addThumbs(AddThumbsForm request, AppUserEntity user) {
|
||||
@ -93,8 +93,8 @@ public class CommentThumbsServiceImpl extends ServiceImpl<CommentThumbsDao, Comm
|
||||
|
||||
/**
|
||||
* 取消点赞
|
||||
* @param request
|
||||
* @param user
|
||||
* @param request 请求体
|
||||
* @param user 用户实体
|
||||
*/
|
||||
@Override
|
||||
public void cancelThumbs(AddThumbsForm request, AppUserEntity user) {
|
||||
|
@ -7,8 +7,8 @@
|
||||
运行到H5端请执行`运行`—>`运行到浏览器`
|
||||
运行到微信小程序需要注意,先在`mainfest.json`—>`微信小程序配置`,设置小程序APPID,
|
||||
然后再`运行`—>`运行到小程序模拟器`—>`微信开发者工具`
|
||||
启动后台前端vue项目,在后台管理系统配置小程序AppID和密钥才能在uniapp用户端实现微信登录。
|
||||
在后台管理系统还需要配置云存储信息,才能在uniapp用户端实现图片的上传。
|
||||
启动后台前端vue项目,在后台管理系统的配置中心配置小程序AppID和密钥,才能在uniapp用户端实现微信登录。
|
||||
在后台管理系统还需要配置阿里云或者七牛云云存储信息,才能在uniapp用户端实现图片的上传。
|
||||
注意:开源版适配H5和微信小程序端。
|
||||
|
||||
|
||||
|
@ -3,7 +3,13 @@
|
||||
<text class="title">页面迷路啦~</text>
|
||||
<text class="info">请确认访问地址是否有误</text>
|
||||
<u-button type="primary" class="btn-home" @click="goHome">返回首页</u-button>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<u-button type="success" @click="goWebsite">前往官网演示</u-button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<u-button type="success" @click="goWebsite">前往官网</u-button>
|
||||
<!-- #endif -->
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user