Commit 7f508153 authored by 刘基明's avatar 刘基明

主题被删时删除id

parent 1a0dbd23
......@@ -43,7 +43,6 @@ public class CallBackController {
@PostMapping(value = "/picCheck/callback")
public String picCheck(String checksum, String content) {
log.info("checksum:{}", checksum);
Map<String, Object> response = JsonUtil.toMap(content);
String fileKey = (String) response.get("object");
boolean freezed = (boolean) response.get("freezed");
......
......@@ -31,7 +31,6 @@ import com.tanpu.community.service.NotificationService;
import com.tanpu.community.service.ThemeService;
import com.tanpu.community.service.TopicService;
import com.tanpu.community.util.ConvertUtil;
import com.tanpu.community.util.TimeUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -102,6 +101,7 @@ public class NotificationManager {
themeNotifyQo.setFormerThemeId(commentEntity.getThemeId());
}
ThemeEntity former = themeService.queryByThemeId(themeNotifyQo.getFormerThemeId());
if (former != null) {
themeNotifyQo.setFormerUserName(currentUser.getNickName());
if (StringUtils.isNotBlank(former.getTopicId())){
......@@ -117,6 +117,9 @@ public class NotificationManager {
if (ThemeTypeEnum.LONG_TEXT.getCode().equals(former.getThemeType())) {
themeNotifyQo.setFormerContent(former.getTitle());
}
}else {
// 引用主题已被删除
themeNotifyQo.setForwardThemeId(null);
}
}
// 外部话题
......
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