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

主题被删时删除id

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