diff --git a/src/main/java/io/linfeng/modules/admin/service/impl/CategoryServiceImpl.java b/src/main/java/io/linfeng/modules/admin/service/impl/CategoryServiceImpl.java index d14bc11..6c62580 100644 --- a/src/main/java/io/linfeng/modules/admin/service/impl/CategoryServiceImpl.java +++ b/src/main/java/io/linfeng/modules/admin/service/impl/CategoryServiceImpl.java @@ -64,7 +64,10 @@ public class CategoryServiceImpl extends ServiceImpl 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 1) { throw new LinfengException("分类名不能重复"); } - this.updateById(category); + boolean update = this.updateById(category); + if(!update){ + throw new LinfengException("分类更新失败"); + } } diff --git a/src/main/java/io/linfeng/modules/app/param/AddPostDeleteForm.java b/src/main/java/io/linfeng/modules/app/param/AddPostDeleteForm.java deleted file mode 100644 index b42256d..0000000 --- a/src/main/java/io/linfeng/modules/app/param/AddPostDeleteForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/ChatListForm.java b/src/main/java/io/linfeng/modules/app/param/ChatListForm.java deleted file mode 100644 index 67aa18b..0000000 --- a/src/main/java/io/linfeng/modules/app/param/ChatListForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/ChatSendForm.java b/src/main/java/io/linfeng/modules/app/param/ChatSendForm.java deleted file mode 100644 index 066da64..0000000 --- a/src/main/java/io/linfeng/modules/app/param/ChatSendForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/DelCommentForm.java b/src/main/java/io/linfeng/modules/app/param/DelCommentForm.java deleted file mode 100644 index cefc047..0000000 --- a/src/main/java/io/linfeng/modules/app/param/DelCommentForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/DiscussAddForm.java b/src/main/java/io/linfeng/modules/app/param/DiscussAddForm.java deleted file mode 100644 index 572ba3f..0000000 --- a/src/main/java/io/linfeng/modules/app/param/DiscussAddForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/DiscussListForm.java b/src/main/java/io/linfeng/modules/app/param/DiscussListForm.java deleted file mode 100644 index 8ffc6db..0000000 --- a/src/main/java/io/linfeng/modules/app/param/DiscussListForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/LinkListForm.java b/src/main/java/io/linfeng/modules/app/param/LinkListForm.java deleted file mode 100644 index f0b1557..0000000 --- a/src/main/java/io/linfeng/modules/app/param/LinkListForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/LoginForm.java b/src/main/java/io/linfeng/modules/app/param/LoginForm.java deleted file mode 100644 index 6685e79..0000000 --- a/src/main/java/io/linfeng/modules/app/param/LoginForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/RegisterForm.java b/src/main/java/io/linfeng/modules/app/param/RegisterForm.java deleted file mode 100644 index 8857efa..0000000 --- a/src/main/java/io/linfeng/modules/app/param/RegisterForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/SetAdminForm.java b/src/main/java/io/linfeng/modules/app/param/SetAdminForm.java deleted file mode 100644 index 175774b..0000000 --- a/src/main/java/io/linfeng/modules/app/param/SetAdminForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/UpdateChatStatusForm.java b/src/main/java/io/linfeng/modules/app/param/UpdateChatStatusForm.java deleted file mode 100644 index 7c71c17..0000000 --- a/src/main/java/io/linfeng/modules/app/param/UpdateChatStatusForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/param/UpdateSystemNoticeStatusForm.java b/src/main/java/io/linfeng/modules/app/param/UpdateSystemNoticeStatusForm.java deleted file mode 100644 index 8cf39d0..0000000 --- a/src/main/java/io/linfeng/modules/app/param/UpdateSystemNoticeStatusForm.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/io/linfeng/modules/app/service/impl/CommentThumbsServiceImpl.java b/src/main/java/io/linfeng/modules/app/service/impl/CommentThumbsServiceImpl.java index 52f6a33..0da1f88 100644 --- a/src/main/java/io/linfeng/modules/app/service/impl/CommentThumbsServiceImpl.java +++ b/src/main/java/io/linfeng/modules/app/service/impl/CommentThumbsServiceImpl.java @@ -48,17 +48,17 @@ public class CommentThumbsServiceImpl extends ServiceImpl() + 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`运行到浏览器` 运行到微信小程序需要注意,先在`mainfest.json`—>`微信小程序配置`,设置小程序APPID, 然后再`运行`—>`运行到小程序模拟器`—>`微信开发者工具` -启动后台前端vue项目,在后台管理系统配置小程序AppID和密钥才能在uniapp用户端实现微信登录。 -在后台管理系统还需要配置云存储信息,才能在uniapp用户端实现图片的上传。 +启动后台前端vue项目,在后台管理系统的配置中心配置小程序AppID和密钥,才能在uniapp用户端实现微信登录。 +在后台管理系统还需要配置阿里云或者七牛云云存储信息,才能在uniapp用户端实现图片的上传。 注意:开源版适配H5和微信小程序端。 diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/error/error.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/error/error.vue index 7e0ea4f..64d3564 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/pages/error/error.vue +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/error/error.vue @@ -3,7 +3,13 @@ 页面迷路啦~ 请确认访问地址是否有误 返回首页 + + 前往官网演示 + + 前往官网 + +