Commit 79fc45f3 authored by 万成波's avatar 万成波

动态

parent 64f2e23e
......@@ -5,7 +5,7 @@ VUE_APP_TITLE = 一站式高校轻享平台
ENV = 'development'
# 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.5.177:8080'
VUE_APP_BASE_API = 'http://127.0.0.1:8080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
......@@ -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) {
......
......@@ -34,7 +34,7 @@ public class BbsMomentCommentController extends BaseController {
* 查询动态评论记录列表
*/
@ApiOperation("查询动态评论记录列表")
@PreAuthorize("@ss.hasPermi('comment:comment:list')")
@PreAuthorize("@ss.hasPermi('moment:comment:list')")
@GetMapping("/list")
public TableDataInfo list(BbsMomentComment comment) {
startPage();
......@@ -47,7 +47,7 @@ public class BbsMomentCommentController extends BaseController {
* 获取动态评论记录详细信息
*/
@ApiOperation("获取动态评论记录详细信息")
@PreAuthorize("@ss.hasPermi('comment:comment:query')")
@PreAuthorize("@ss.hasPermi('moment: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('comment:comment:remove')")
@PreAuthorize("@ss.hasPermi('moment:comment:remove')")
@Log(title = "动态评论记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{id}")
public AjaxResult remove(@PathVariable Long id) {
......
......@@ -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) {
......
......@@ -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() {
......
......@@ -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) {
......
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;
}
......@@ -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);
}
......@@ -21,15 +21,16 @@ public class BbsMomentServiceImpl extends ServiceImpl<BbsMomentMapper, BbsMoment
@Resource
private BbsMomentMapper bbsMomentMapper;
/**
* 查询动态列表
*
* @param bbsMoment 动态
* @param moment 动态
* @return 动态
*/
@Override
public List<BbsMoment> selectBbsMomentList(BbsMoment bbsMoment) {
return bbsMomentMapper.selectList(null);
public List<BbsMoment> selectBbsMomentList(BbsMoment moment) {
return this.baseMapper.selectBbsMomentList(moment);
}
}
<?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>
<?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>
<?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') &lt;= #{moment.params.endTime}
</if>
</where>
ORDER BY
m.create_time DESC
</select>
</mapper>
<?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>
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment