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