Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
safe-campus-bbs
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
万成波
safe-campus-bbs
Commits
79fc45f3
Commit
79fc45f3
authored
Sep 01, 2025
by
万成波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态
parent
64f2e23e
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
117 additions
and
28 deletions
+117
-28
safe-campus-bbs-ui/.env.development
safe-campus-bbs-ui/.env.development
+1
-1
safe-campus-moment/src/main/java/com/tangguo/controller/BbsGradeController.java
.../main/java/com/tangguo/controller/BbsGradeController.java
+5
-5
safe-campus-moment/src/main/java/com/tangguo/controller/BbsMomentCommentController.java
...va/com/tangguo/controller/BbsMomentCommentController.java
+3
-3
safe-campus-moment/src/main/java/com/tangguo/controller/BbsMomentController.java
...main/java/com/tangguo/controller/BbsMomentController.java
+16
-3
safe-campus-moment/src/main/java/com/tangguo/controller/BbsSensitiveWordController.java
...va/com/tangguo/controller/BbsSensitiveWordController.java
+7
-7
safe-campus-moment/src/main/java/com/tangguo/controller/BbsTopicController.java
.../main/java/com/tangguo/controller/BbsTopicController.java
+6
-6
safe-campus-moment/src/main/java/com/tangguo/domain/BbsMoment.java
...us-moment/src/main/java/com/tangguo/domain/BbsMoment.java
+10
-0
safe-campus-moment/src/main/java/com/tangguo/mapper/BbsMomentMapper.java
...ent/src/main/java/com/tangguo/mapper/BbsMomentMapper.java
+6
-0
safe-campus-moment/src/main/java/com/tangguo/service/impl/BbsMomentServiceImpl.java
...n/java/com/tangguo/service/impl/BbsMomentServiceImpl.java
+4
-3
safe-campus-moment/src/main/resources/mapper/BbsMomentAttachmentsMapper.xml
.../src/main/resources/mapper/BbsMomentAttachmentsMapper.xml
+7
-0
safe-campus-moment/src/main/resources/mapper/BbsMomentLikeMapper.xml
...-moment/src/main/resources/mapper/BbsMomentLikeMapper.xml
+7
-0
safe-campus-moment/src/main/resources/mapper/BbsMomentMapper.xml
...mpus-moment/src/main/resources/mapper/BbsMomentMapper.xml
+31
-0
safe-campus-moment/src/main/resources/mapper/BbsMomentVoteMapper.xml
...-moment/src/main/resources/mapper/BbsMomentVoteMapper.xml
+7
-0
safe-campus-moment/src/main/resources/mapper/BbsMomentVoteOptionMapper.xml
...t/src/main/resources/mapper/BbsMomentVoteOptionMapper.xml
+7
-0
No files found.
safe-campus-bbs-ui/.env.development
View file @
79fc45f3
...
...
@@ -5,7 +5,7 @@ VUE_APP_TITLE = 一站式高校轻享平台
ENV = 'development'
# 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://1
92.168.5.177
:8080'
VUE_APP_BASE_API = 'http://1
27.0.0.1
:8080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
safe-campus-moment/src/main/java/com/tangguo/controller/BbsGradeController.java
View file @
79fc45f3
...
...
@@ -34,7 +34,7 @@ public class BbsGradeController extends BaseController {
* 查询用户等级列表
*/
@ApiOperation
(
"查询用户等级列表"
)
@PreAuthorize
(
"@ss.hasPermi('
grade
:grade:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:grade:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
BbsGrade
bbsGrade
)
{
startPage
();
...
...
@@ -47,7 +47,7 @@ public class BbsGradeController extends BaseController {
* 获取用户等级详细信息
*/
@ApiOperation
(
"获取用户等级详细信息"
)
@PreAuthorize
(
"@ss.hasPermi('
grade
:grade:query')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:grade:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
bbsGradeService
.
getById
(
id
));
...
...
@@ -58,7 +58,7 @@ public class BbsGradeController extends BaseController {
* 新增用户等级
*/
@ApiOperation
(
"新增用户等级"
)
@PreAuthorize
(
"@ss.hasPermi('
grade
:grade:add')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:grade:add')"
)
@Log
(
title
=
"用户等级"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
BbsGrade
grade
)
{
...
...
@@ -71,7 +71,7 @@ public class BbsGradeController extends BaseController {
* 修改用户等级
*/
@ApiOperation
(
"修改用户等级"
)
@PreAuthorize
(
"@ss.hasPermi('
grade
:grade:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:grade:edit')"
)
@Log
(
title
=
"用户等级"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
BbsGrade
grade
)
{
...
...
@@ -84,7 +84,7 @@ public class BbsGradeController extends BaseController {
* 删除用户等级
*/
@ApiOperation
(
"删除用户等级"
)
@PreAuthorize
(
"@ss.hasPermi('
grade
:grade:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:grade:remove')"
)
@Log
(
title
=
"用户等级"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{id}"
)
public
AjaxResult
remove
(
@PathVariable
Long
id
)
{
...
...
safe-campus-moment/src/main/java/com/tangguo/controller/BbsMomentCommentController.java
View file @
79fc45f3
...
...
@@ -34,7 +34,7 @@ public class BbsMomentCommentController extends BaseController {
* 查询动态评论记录列表
*/
@ApiOperation
(
"查询动态评论记录列表"
)
@PreAuthorize
(
"@ss.hasPermi('
com
ment:comment:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
mo
ment:comment:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
BbsMomentComment
comment
)
{
startPage
();
...
...
@@ -47,7 +47,7 @@ public class BbsMomentCommentController extends BaseController {
* 获取动态评论记录详细信息
*/
@ApiOperation
(
"获取动态评论记录详细信息"
)
@PreAuthorize
(
"@ss.hasPermi('
com
ment:comment:query')"
)
@PreAuthorize
(
"@ss.hasPermi('
mo
ment:comment:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
BbsMomentComment
comment
=
this
.
bbsMomentCommentService
.
getBbsMomentComment
(
id
);
...
...
@@ -59,7 +59,7 @@ public class BbsMomentCommentController extends BaseController {
* 删除动态评论记录
*/
@ApiOperation
(
"删除动态评论记录"
)
@PreAuthorize
(
"@ss.hasPermi('
com
ment:comment:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('
mo
ment:comment:remove')"
)
@Log
(
title
=
"动态评论记录"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{id}"
)
public
AjaxResult
remove
(
@PathVariable
Long
id
)
{
...
...
safe-campus-moment/src/main/java/com/tangguo/controller/BbsMomentController.java
View file @
79fc45f3
...
...
@@ -6,6 +6,7 @@ import com.tangguo.common.core.domain.AjaxResult;
import
com.tangguo.common.core.page.TableDataInfo
;
import
com.tangguo.common.enums.BusinessType
;
import
com.tangguo.domain.BbsMoment
;
import
com.tangguo.domain.BbsMomentComment
;
import
com.tangguo.service.IBbsMomentService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -23,7 +24,7 @@ import java.util.List;
*/
@Api
(
tags
=
"动态管理"
)
@RestController
@RequestMapping
(
"/
points/points
"
)
@RequestMapping
(
"/
bbs/moment
"
)
public
class
BbsMomentController
extends
BaseController
{
@Resource
...
...
@@ -34,7 +35,7 @@ public class BbsMomentController extends BaseController {
* 查询动态列表
*/
@ApiOperation
(
"查询动态列表"
)
@PreAuthorize
(
"@ss.hasPermi('
points:points
:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs:moment
:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
BbsMoment
bbsMoment
)
{
startPage
();
...
...
@@ -43,11 +44,23 @@ public class BbsMomentController extends BaseController {
}
/**
* 获取动态详细信息
*/
@ApiOperation
(
"获取动态详细信息"
)
@PreAuthorize
(
"@ss.hasPermi('bbs:moment:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
BbsMoment
moment
=
this
.
bbsMomentService
.
getById
(
id
);
return
success
(
moment
);
}
/**
* 删除动态
*/
@ApiOperation
(
"删除动态"
)
@PreAuthorize
(
"@ss.hasPermi('
points:points
:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs:moment
:remove')"
)
@Log
(
title
=
"动态"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{id}"
)
public
AjaxResult
remove
(
@PathVariable
Long
id
)
{
...
...
safe-campus-moment/src/main/java/com/tangguo/controller/BbsSensitiveWordController.java
View file @
79fc45f3
...
...
@@ -36,7 +36,7 @@ public class BbsSensitiveWordController extends BaseController {
* 查询敏感词库列表
*/
@ApiOperation
(
"查询敏感词库列表"
)
@PreAuthorize
(
"@ss.hasPermi('
word
:word:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:word:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
BbsSensitiveWord
bbsSensitiveWord
)
{
startPage
();
...
...
@@ -49,7 +49,7 @@ public class BbsSensitiveWordController extends BaseController {
* 获取敏感词库详细信息
*/
@ApiOperation
(
"获取敏感词库详细信息"
)
@PreAuthorize
(
"@ss.hasPermi('
word
:word:query')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:word:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
bbsSensitiveWordService
.
getById
(
id
));
...
...
@@ -60,7 +60,7 @@ public class BbsSensitiveWordController extends BaseController {
* 新增敏感词库
*/
@ApiOperation
(
"新增敏感词库"
)
@PreAuthorize
(
"@ss.hasPermi('
word
:word:add')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:word:add')"
)
@Log
(
title
=
"敏感词库"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
BbsSensitiveWord
word
)
{
...
...
@@ -73,7 +73,7 @@ public class BbsSensitiveWordController extends BaseController {
* 修改敏感词库
*/
@ApiOperation
(
"修改敏感词库"
)
@PreAuthorize
(
"@ss.hasPermi('
word
:word:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:word:edit')"
)
@Log
(
title
=
"敏感词库"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
BbsSensitiveWord
word
)
{
...
...
@@ -86,7 +86,7 @@ public class BbsSensitiveWordController extends BaseController {
* 删除敏感词库
*/
@ApiOperation
(
"删除敏感词库"
)
@PreAuthorize
(
"@ss.hasPermi('
word
:word:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:word:remove')"
)
@Log
(
title
=
"敏感词库"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{id}"
)
public
AjaxResult
remove
(
@PathVariable
Long
id
)
{
...
...
@@ -99,7 +99,7 @@ public class BbsSensitiveWordController extends BaseController {
* 修改敏感词库
*/
@ApiOperation
(
"修改敏感词库"
)
@PreAuthorize
(
"@ss.hasPermi('
word
:word:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:word:edit')"
)
@Log
(
title
=
"敏感词库"
,
businessType
=
BusinessType
.
IMPORT
)
@PostMapping
(
"/import"
)
public
AjaxResult
importWords
(
MultipartFile
file
)
{
...
...
@@ -112,7 +112,7 @@ public class BbsSensitiveWordController extends BaseController {
* 刷新敏感词库缓存
*/
@ApiOperation
(
"刷新敏感词库缓存"
)
@PreAuthorize
(
"@ss.hasPermi('
word
:word:refresh')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:word:refresh')"
)
@Log
(
title
=
"敏感词库"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/refresh"
)
public
AjaxResult
refresh
()
{
...
...
safe-campus-moment/src/main/java/com/tangguo/controller/BbsTopicController.java
View file @
79fc45f3
...
...
@@ -34,7 +34,7 @@ public class BbsTopicController extends BaseController {
* 查询话题列表
*/
@ApiOperation
(
"查询话题列表"
)
@PreAuthorize
(
"@ss.hasPermi('
topic
:topic:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:topic:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
BbsTopic
bbsTopic
)
{
startPage
();
...
...
@@ -47,7 +47,7 @@ public class BbsTopicController extends BaseController {
* 获取话题详细信息
*/
@ApiOperation
(
"获取话题详细信息"
)
@PreAuthorize
(
"@ss.hasPermi('
topic
:topic:query')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:topic:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
bbsTopicService
.
getById
(
id
));
...
...
@@ -58,7 +58,7 @@ public class BbsTopicController extends BaseController {
* 新增话题
*/
@ApiOperation
(
"新增话题"
)
@PreAuthorize
(
"@ss.hasPermi('
topic
:topic:add')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:topic:add')"
)
@Log
(
title
=
"话题"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
BbsTopic
bbsTopic
)
{
...
...
@@ -71,7 +71,7 @@ public class BbsTopicController extends BaseController {
* 修改话题
*/
@ApiOperation
(
"修改话题"
)
@PreAuthorize
(
"@ss.hasPermi('
topic
:topic:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:topic:edit')"
)
@Log
(
title
=
"话题"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
BbsTopic
bbsTopic
)
{
...
...
@@ -84,7 +84,7 @@ public class BbsTopicController extends BaseController {
* 置顶话题
*/
@ApiOperation
(
"置顶话题"
)
@PreAuthorize
(
"@ss.hasPermi('
topic
:topic:top')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:topic:top')"
)
@Log
(
title
=
"话题"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/top"
)
public
AjaxResult
top
(
@RequestBody
BbsTopic
bbsTopic
)
{
...
...
@@ -97,7 +97,7 @@ public class BbsTopicController extends BaseController {
* 删除话题
*/
@ApiOperation
(
"删除话题"
)
@PreAuthorize
(
"@ss.hasPermi('
topic
:topic:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('
bbs
:topic:remove')"
)
@Log
(
title
=
"话题"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{id}"
)
public
AjaxResult
remove
(
@PathVariable
Long
id
)
{
...
...
safe-campus-moment/src/main/java/com/tangguo/domain/BbsMoment.java
View file @
79fc45f3
package
com
.
tangguo
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
...
@@ -117,4 +118,13 @@ public class BbsMoment extends BaseEntity {
@ApiModelProperty
(
"动态投票人数"
)
private
Integer
voteCount
;
/** 用户姓名 */
@TableField
(
exist
=
false
)
private
String
nikeName
;
/** 用户部门 */
@TableField
(
exist
=
false
)
private
String
deptName
;
}
safe-campus-moment/src/main/java/com/tangguo/mapper/BbsMomentMapper.java
View file @
79fc45f3
...
...
@@ -2,6 +2,9 @@ package com.tangguo.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.tangguo.domain.BbsMoment
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 动态Mapper接口
...
...
@@ -10,4 +13,7 @@ import com.tangguo.domain.BbsMoment;
* @date 2025-09-01
*/
public
interface
BbsMomentMapper
extends
BaseMapper
<
BbsMoment
>
{
List
<
BbsMoment
>
selectBbsMomentList
(
@Param
(
"moment"
)
BbsMoment
moment
);
}
safe-campus-moment/src/main/java/com/tangguo/service/impl/BbsMomentServiceImpl.java
View file @
79fc45f3
...
...
@@ -21,15 +21,16 @@ public class BbsMomentServiceImpl extends ServiceImpl<BbsMomentMapper, BbsMoment
@Resource
private
BbsMomentMapper
bbsMomentMapper
;
/**
* 查询动态列表
*
* @param
bbsM
oment 动态
* @param
m
oment 动态
* @return 动态
*/
@Override
public
List
<
BbsMoment
>
selectBbsMomentList
(
BbsMoment
bbsM
oment
)
{
return
bbsMomentMapper
.
selectList
(
null
);
public
List
<
BbsMoment
>
selectBbsMomentList
(
BbsMoment
m
oment
)
{
return
this
.
baseMapper
.
selectBbsMomentList
(
moment
);
}
}
safe-campus-moment/src/main/resources/mapper/BbsMomentAttachmentsMapper.xml
0 → 100644
View file @
79fc45f3
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.tangguo.mapper.BbsMomentAttachmentsMapper"
>
</mapper>
safe-campus-moment/src/main/resources/mapper/BbsMomentLikeMapper.xml
0 → 100644
View file @
79fc45f3
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.tangguo.mapper.BbsMomentLikeMapper"
>
</mapper>
safe-campus-moment/src/main/resources/mapper/BbsMomentMapper.xml
0 → 100644
View file @
79fc45f3
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.tangguo.mapper.BbsMomentMapper"
>
<select
id=
"selectBbsMomentList"
resultType=
"com.tangguo.domain.BbsMoment"
>
SELECT
m.*,
uv.nike_name,
uv.dept_name
FROM
bbs_moment m
LEFT JOIN
qwmh_sys_user_view uv ON uv.user_name = m.user_name
<where>
<if
test=
"moment.content != null and moment.content != ''"
>
m.content LIKE CONCAT('%', #{moment.content}, '%')
</if>
<if
test=
"moment.params.startTime != null and moment.params.startTime != ''"
>
AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{moment.params.startTime}
</if>
<if
test=
"moment.params.endTime != null and moment.params.endTime != ''"
>
AND DATE_FORMAT(create_time, '%Y-%m-%d')
<
= #{moment.params.endTime}
</if>
</where>
ORDER BY
m.create_time DESC
</select>
</mapper>
safe-campus-moment/src/main/resources/mapper/BbsMomentVoteMapper.xml
0 → 100644
View file @
79fc45f3
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.tangguo.mapper.BbsMomentVoteMapper"
>
</mapper>
safe-campus-moment/src/main/resources/mapper/BbsMomentVoteOptionMapper.xml
0 → 100644
View file @
79fc45f3
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.tangguo.mapper.BbsMomentVoteOptionMapper"
>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment