被封禁时消息通知功能更新,封禁通知样式更新
This commit is contained in:
parent
8092599fbd
commit
efea9d25a0
@ -2,6 +2,7 @@ package com.inspur.community.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.inspur.common.utils.DateUtils;
|
||||
import com.inspur.common.utils.uuid.IdUtils;
|
||||
import com.inspur.community.domain.CommunityPostReply;
|
||||
import com.inspur.community.mapper.CommunityPostReplyMapper;
|
||||
@ -69,6 +70,7 @@ public class CommunityNoticeServiceImpl implements ICommunityNoticeService
|
||||
{
|
||||
communityNotice.setNoticeId(IdUtils.simpleUUID());
|
||||
communityNotice.setStatus("0");
|
||||
communityNotice.setRemark(DateUtils.getTime());
|
||||
return communityNoticeMapper.insertCommunityNotice(communityNotice);
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,15 @@ import java.util.List;
|
||||
import com.inspur.common.utils.DateUtils;
|
||||
import com.inspur.common.utils.SecurityUtils;
|
||||
import com.inspur.common.utils.uuid.IdUtils;
|
||||
import com.inspur.community.domain.CommunityNotice;
|
||||
import com.inspur.community.domain.CommunityPostInfo;
|
||||
import com.inspur.community.domain.CommunityPostReply;
|
||||
import com.inspur.community.domain.vo.CommunityPostInfoVO;
|
||||
import com.inspur.community.domain.vo.CommunityPostReportVO;
|
||||
import com.inspur.community.mapper.CommunityNoticeMapper;
|
||||
import com.inspur.community.mapper.CommunityPostInfoMapper;
|
||||
import com.inspur.community.mapper.CommunityPostReplyMapper;
|
||||
import com.inspur.community.service.ICommunityNoticeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.community.mapper.CommunityPostReportMapper;
|
||||
@ -36,6 +40,8 @@ public class CommunityPostReportServiceImpl implements ICommunityPostReportServi
|
||||
@Autowired
|
||||
private CommunityPostReplyMapper communityPostReplyMapper;
|
||||
|
||||
@Autowired
|
||||
private ICommunityNoticeService communityNoticeService;
|
||||
/**
|
||||
* 查询社区帖子举报
|
||||
*
|
||||
@ -87,19 +93,34 @@ public class CommunityPostReportServiceImpl implements ICommunityPostReportServi
|
||||
public int updateCommunityPostReport(CommunityPostReport communityPostReport)
|
||||
{
|
||||
Integer processStatus = communityPostReport.getResult().split(":")[0] != null ? Integer.parseInt(communityPostReport.getResult().split(":")[0]) : 0;
|
||||
if(processStatus != 0){
|
||||
CommunityNotice communityNotice = new CommunityNotice();
|
||||
//找到贴子或者评论
|
||||
if("0".equals(communityPostReport.getReportType())){//帖子
|
||||
if(processStatus != 0) {//只有封禁或者删除才通知
|
||||
communityNotice.setPostId(communityPostReport.getReportContentId());
|
||||
CommunityPostInfoVO post = communityPostInfoMapper.selectCommunityPostInfoByPostId(communityPostReport.getReportContentId());
|
||||
communityNotice.setPostName(post.getPostTitle());
|
||||
communityNotice.setUserId(post.getUserId());
|
||||
}
|
||||
CommunityPostInfo communityPostInfo = new CommunityPostInfo();
|
||||
communityPostInfo.setPostId(communityPostReport.getReportContentId());
|
||||
communityPostInfo.setStatus(String.valueOf(processStatus));
|
||||
communityPostInfoMapper.updateCommunityPostInfo(communityPostInfo);
|
||||
}else{//回复
|
||||
if(processStatus != 0) {
|
||||
CommunityPostReply reply = communityPostReplyMapper.selectCommunityPostReplyByReplyId(communityPostReport.getReportContentId());
|
||||
communityNotice.setReplyId(communityPostReport.getReportContentId());
|
||||
communityNotice.setUserId(reply.getUserId());
|
||||
communityNotice.setReplyContent(reply.getReplyContent());
|
||||
}
|
||||
CommunityPostReply communityPostReply = new CommunityPostReply();
|
||||
communityPostReply.setReplyId(communityPostReport.getReportContentId());
|
||||
communityPostReply.setStatus(String.valueOf(processStatus));
|
||||
communityPostReplyMapper.updateCommunityPostReply(communityPostReply);
|
||||
}
|
||||
if(processStatus != 0) {
|
||||
communityNotice.setNoticeType(processStatus == 1 ? "3" : "4");
|
||||
communityNoticeService.insertCommunityNotice(communityNotice);
|
||||
}
|
||||
communityPostReport.setStatus("1");
|
||||
return communityPostReportMapper.updateCommunityPostReport(communityPostReport);
|
||||
|
@ -87,7 +87,7 @@
|
||||
class="notice-content"
|
||||
v-if="notice.replyId != null"
|
||||
>您的评论 <div
|
||||
class="word-link"
|
||||
:class="notice.noticeType == '1' || notice.noticeType == '2' ? 'word-link' : 'word-mark'"
|
||||
@click="toPost(notice)"
|
||||
>{{ notice.replyContent }}</div> 被<template>
|
||||
<dict-tag
|
||||
@ -99,7 +99,7 @@
|
||||
class="notice-content"
|
||||
v-else
|
||||
>您的贴子<div
|
||||
class="word-link"
|
||||
:class="notice.noticeType == '1' || notice.noticeType == '2' ? 'word-link' : 'word-mark'"
|
||||
@click="toPost(notice)"
|
||||
>{{ notice.postName }}</div>被<template>
|
||||
<dict-tag
|
||||
@ -576,6 +576,10 @@ export default {
|
||||
font-size: medium;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.word-mark {
|
||||
color: red;
|
||||
font-size: medium;
|
||||
}
|
||||
.border {
|
||||
width: 812px;
|
||||
height: 112px;
|
||||
|
Loading…
Reference in New Issue
Block a user